There shouldn't be any performance difference between the two if that's what you're concerned about. I just ran a series of tests booting Linux on ARM using tcmalloc and tcmalloc-minimal and there is no measurable difference between the two. (tcmalloc was on average 0.3% faster, but that's hardly significant.)

I could certainly rewrite the build script to link with tcmalloc_minimal if that's available if building the fast version, but I really don't think it is worth the extra mess in the SConsscript.

//Andreas

On 03/18/2013 05:04 PM, Nilay wrote:
I think we should link we tcmalloc only if opt / debug version is being
compiled. For fast, we should still link with tcmalloc_minimal.

--
Nilay

On Mon, March 18, 2013 5:21 am, Andreas Sandberg wrote:
changeset b6a47b43f4df in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=b6a47b43f4df
description:
        scons: Try to use 'tcmalloc' before 'tcmalloc_minimal'

        tcmalloc_minimal doesn't support the heap checker on Debian, while
        tcmalloc does. Instead of always linking with tcmalloc_minimal, if it
        exists, we first check for tcmalloc and then use tcmalloc_minimal as a
        fallback.

diffstat:

  SConstruct |  4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 699f4ee61445 -r b6a47b43f4df SConstruct
--- a/SConstruct        Mon Mar 18 10:57:26 2013 +0100
+++ b/SConstruct        Mon Mar 18 11:24:56 2013 +0100
@@ -925,7 +925,9 @@
      conf.CheckLibWithHeader('rt', 'time.h', 'C',
                              'clock_nanosleep(0,0,NULL,NULL);')

-if conf.CheckLib('tcmalloc_minimal'):
+if conf.CheckLib('tcmalloc'):
+    main.Append(CCFLAGS=main['TCMALLOC_CCFLAGS'])
+elif conf.CheckLib('tcmalloc_minimal'):
      main.Append(CCFLAGS=main['TCMALLOC_CCFLAGS'])
  else:
      print termcap.Yellow + termcap.Bold + \
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to