]> git.pld-linux.org Git - packages/xfsprogs.git/blob - xfsprogs-repair-tcmalloc.patch
- drop initrd stuff
[packages/xfsprogs.git] / xfsprogs-repair-tcmalloc.patch
1 From hch@infradead.org Mon Nov 14 16:57:45 2011
2 Delivered-To: arekm@maven.pl
3 Received: from gmail-pop.l.google.com [74.125.39.108]
4         by localhost with POP3 (fetchmail-6.3.21)
5         for <arekm@localhost> (single-drop); Mon, 14 Nov 2011 18:12:06 +0100 (CET)
6 Received: by 10.142.223.21 with SMTP id v21cs23581wfg;
7         Mon, 14 Nov 2011 08:02:21 -0800 (PST)
8 Received: by 10.229.247.139 with SMTP id mc11mr3086235qcb.238.1321286539560;
9         Mon, 14 Nov 2011 08:02:19 -0800 (PST)
10 Return-Path: <BATV+f273fab3737168e2a79b+3004+infradead.org+hch@bombadil.srs.infradead.org>
11 Received: from bombadil.infradead.org (173-166-109-252-newengland.hfc.comcastbusiness.net. [173.166.109.252])
12         by mx.google.com with ESMTPS id l7si5065356qcw.108.2011.11.14.08.02.18
13         (version=TLSv1/SSLv3 cipher=OTHER);
14         Mon, 14 Nov 2011 08:02:18 -0800 (PST)
15 Received-SPF: neutral (google.com: 173.166.109.252 is neither permitted nor denied by best guess record for domain of BATV+f273fab3737168e2a79b+3004+infradead.org+hch@bombadil.srs.infradead.org) client-ip=173.166.109.252;
16 Authentication-Results: mx.google.com; spf=neutral (google.com: 173.166.109.252 is neither permitted nor denied by best guess record for domain of BATV+f273fab3737168e2a79b+3004+infradead.org+hch@bombadil.srs.infradead.org) smtp.mail=BATV+f273fab3737168e2a79b+3004+infradead.org+hch@bombadil.srs.infradead.org
17 Received: from hch by bombadil.infradead.org with local (Exim 4.76 #1 (Red Hat Linux))
18         id 1RPyzB-00079E-KT; Mon, 14 Nov 2011 16:02:17 +0000
19 Message-Id: <20111114160217.591812422@bombadil.infradead.org>
20 User-Agent: quilt/0.48-1
21 Date: Mon, 14 Nov 2011 10:57:45 -0500
22 From: Christoph Hellwig <hch@infradead.org>
23 To: xfs@oss.sgi.com
24 Cc: arekm@maven.pl
25 Subject: [PATCH 3/3] xfsprogs: allow linking against libtcmalloc
26 References: <20111114155742.285135418@bombadil.infradead.org>
27 Content-Disposition: inline; filename=xfsprogs-use-tcmalloc
28 X-SRS-Rewrite: SMTP reverse-path rewritten from <hch@infradead.org> by bombadil.infradead.org
29         See http://www.infradead.org/rpr.html
30 Status: R
31 X-Status: NT
32 X-KMail-EncryptionState:  
33 X-KMail-SignatureState:  
34 X-KMail-MDN-Sent:  
35
36 Allow linking against the libtcmalloc library from Google's performance
37 tools, which at least for repair reduces the memory usage dramatically.
38
39 Signed-off-by: Christoph Hellwig <hch@lst.de>
40
41 --- xfsprogs-3.1.7/configure.ac.org     2011-11-18 07:58:49.815439699 +0100
42 +++ xfsprogs-3.1.7/configure.ac 2011-11-18 07:59:49.360093001 +0100
43 @@ -31,6 +31,26 @@
44  AC_SUBST(libeditline)
45  AC_SUBST(enable_editline)
46  
47 +AC_ARG_ENABLE(tcmalloc,
48 +[ --enable-tcmalloc=[yes/no] Enable tcmalloc [default=no]],,
49 +       enable_tcmalloc=check)
50 +
51 +if test x$enable_tcmalloc != xno; then
52 +    saved_CPPFLAGS="$CPPFLAGS"
53 +    CPPFLAGS="$CPPFLAGS -fno-builtin-malloc"
54 +    AC_CHECK_LIB([tcmalloc_minimal], [malloc], [libtcmalloc="-ltcmalloc_minimal"],
55 +      [AC_CHECK_LIB([tcmalloc], [malloc], [libtcmalloc="-ltcmalloc"], [
56 +       if test x$enable_tcmalloc = xyes; then
57 +               AC_MSG_ERROR([libtcmalloc_minimal or libtcmalloc library not found], 1)
58 +       fi]
59 +      )]
60 +    )
61 +    if test x$libtcmalloc = x; then
62 +       CPPFLAGS="$saved_CPPFLAGS"
63 +    fi
64 +fi
65 +AC_SUBST(libtcmalloc)
66 +
67  AC_ARG_ENABLE(termcap,
68  [ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]],
69         test $enable_termcap = yes && libtermcap="-ltermcap",)
70 Index: xfsprogs-dev/include/builddefs.in
71 ===================================================================
72 --- xfsprogs-dev.orig/include/builddefs.in      2011-08-14 17:00:02.000000000 +0000
73 +++ xfsprogs-dev/include/builddefs.in   2011-11-14 12:09:52.000000000 +0000
74 @@ -22,7 +22,7 @@ _BUILDDEFS_INCLUDED_ = 1
75  
76  DEBUG = @debug_build@
77  OPTIMIZER = @opt_build@
78 -MALLOCLIB = @malloc_lib@
79 +MALLOCLIB = @malloc_lib@ @libtcmalloc@
80  LOADERFLAGS = @LDFLAGS@
81  LTLDFLAGS = @LDFLAGS@
82  CFLAGS = @CFLAGS@
83
This page took 0.03565 seconds and 3 git commands to generate.