From: "Arkadiusz Miśkiewicz" <arekm@maven.pl>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH 3/3] xfsprogs: allow linking against libtcmalloc
Date: Fri, 18 Nov 2011 08:04:06 +0100 [thread overview]
Message-ID: <201111180804.06413.arekm@maven.pl> (raw)
In-Reply-To: <20111114160217.591812422@bombadil.infradead.org>
On Monday 14 of November 2011, Christoph Hellwig wrote:
> Allow linking against the libtcmalloc library from Google's performance
> tools, which at least for repair reduces the memory usage dramatically.
Should -fno-builtin-malloc be also used?
--- xfsprogs-3.1.7/configure.in.org 2011-11-18 07:58:49.815439699 +0100
+++ xfsprogs-3.1.7/configure.in 2011-11-18 07:59:49.360093001 +0100
@@ -31,6 +31,26 @@
AC_SUBST(libeditline)
AC_SUBST(enable_editline)
+AC_ARG_ENABLE(tcmalloc,
+[ --enable-tcmalloc=[yes/no] Enable tcmalloc [default=no]],,
+ enable_tcmalloc=check)
+
+if test x$enable_tcmalloc != xno; then
+ saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -fno-builtin-malloc"
+ AC_CHECK_LIB([tcmalloc_minimal], [malloc], [libtcmalloc="-ltcmalloc_minimal"],
+ [AC_CHECK_LIB([tcmalloc], [malloc], [libtcmalloc="-ltcmalloc"], [
+ if test x$enable_tcmalloc = xyes; then
+ AC_MSG_ERROR([libtcmalloc_minimal or libtcmalloc library not found], 1)
+ fi]
+ )]
+ )
+ if test x$libtcmalloc = x; then
+ CPPFLAGS="$saved_CPPFLAGS"
+ fi
+fi
+AC_SUBST(libtcmalloc)
+
AC_ARG_ENABLE(termcap,
[ --enable-termcap=[yes/no] Enable terminal capabilities library [default=no]],
test $enable_termcap = yes && libtermcap="-ltermcap",)
Index: xfsprogs-dev/include/builddefs.in
===================================================================
--- xfsprogs-dev.orig/include/builddefs.in 2011-08-14 17:00:02.000000000 +0000
+++ xfsprogs-dev/include/builddefs.in 2011-11-14 12:09:52.000000000 +0000
@@ -22,7 +22,7 @@ _BUILDDEFS_INCLUDED_ = 1
DEBUG = @debug_build@
OPTIMIZER = @opt_build@
-MALLOCLIB = @malloc_lib@
+MALLOCLIB = @malloc_lib@ @libtcmalloc@
LOADERFLAGS = @LDFLAGS@
LTLDFLAGS = @LDFLAGS@
CFLAGS = @CFLAGS@
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-11-18 7:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-14 15:57 [PATCH 0/3] xfs_repair malloc optimizations Christoph Hellwig
2011-11-14 15:57 ` [PATCH 1/3] repair: allocate and free inode records individually Christoph Hellwig
2011-11-14 15:57 ` [PATCH 2/3] repair: allocate and free extent " Christoph Hellwig
2011-11-14 15:57 ` [PATCH 3/3] xfsprogs: allow linking against libtcmalloc Christoph Hellwig
2011-11-18 7:04 ` Arkadiusz Miśkiewicz [this message]
2011-11-19 18:45 ` Christoph Hellwig
2011-11-21 11:59 ` [PATCH 3/3 v2] " Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201111180804.06413.arekm@maven.pl \
--to=arekm@maven.pl \
--cc=hch@infradead.org \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox