bug 417066. disable jemalloc when we're building with trace-malloc. r=ted
authorpavlov@pavlov.net
Tue, 12 Feb 2008 16:47:43 -0800
changeset 11612 258f5cf5dc2e89c8e9a9058ca1fc282feb87ff65
parent 11611 51c30c42fc23bee916c7360dce2986ed50a0d8a1
child 11613 f9bb7e9a5a18ab6804d62fa1a292005cdc9994c1
push idunknown
push userunknown
push dateunknown
reviewersted
bugs417066
milestone1.9b4pre
bug 417066. disable jemalloc when we're building with trace-malloc. r=ted
configure.in
--- a/configure.in
+++ b/configure.in
@@ -5965,22 +5965,43 @@ MOZ_ARG_ENABLE_BOOL(logrefcnt,
     _ENABLE_LOGREFCNT= )
 if test "$_ENABLE_LOGREFCNT" = "1"; then
     AC_DEFINE(FORCE_BUILD_REFCNT_LOGGING)
 elif test -z "$_ENABLE_LOGREFCNT"; then
     AC_DEFINE(NO_BUILD_REFCNT_LOGGING)
 fi
 
 dnl ========================================================
-dnl = memory
+dnl = Enable trace malloc
+dnl ========================================================
+NS_TRACE_MALLOC=${MOZ_TRACE_MALLOC}
+MOZ_ARG_ENABLE_BOOL(trace-malloc,
+[  --enable-trace-malloc   Enable malloc tracing],
+    NS_TRACE_MALLOC=1,
+    NS_TRACE_MALLOC= )
+if test "$NS_TRACE_MALLOC"; then
+  # Please, Mr. Linker Man, don't take away our symbol names
+  MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
+  USE_ELF_DYNSTR_GC=
+  AC_DEFINE(NS_TRACE_MALLOC)
+fi
+AC_SUBST(NS_TRACE_MALLOC)
+
+dnl ========================================================
+dnl = Enable jemalloc
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(jemalloc,
 [  --enable-jemalloc         Replace memory allocator with jemalloc],
     MOZ_MEMORY=1,
     MOZ_MEMORY=)
+
+if test "$NS_TRACE_MALLOC"; then
+    MOZ_MEMORY=
+fi
+
 if test "$MOZ_MEMORY"; then
 
   dnl Don't try to run compiler tests on Windows  
   if test "$OS_ARCH" = "WINNT"; then
     if test -z "$HAVE_64BIT_OS"; then
       AC_DEFINE_UNQUOTED([MOZ_MEMORY_SIZEOF_PTR_2POW], 2)
     else
       AC_DEFINE_UNQUOTED([MOZ_MEMORY_SIZEOF_PTR_2POW], 3)
@@ -6235,32 +6256,16 @@ if test -n "$_ENABLE_CODESIGHS"; then
     if test -d $srcdir/tools/codesighs; then 
         MOZ_MAPINFO=1
     else
         AC_MSG_ERROR([Codesighs directory $srcdir/tools/codesighs required.])
     fi
 fi
 
 dnl ========================================================
-dnl = Enable trace malloc
-dnl ========================================================
-NS_TRACE_MALLOC=${MOZ_TRACE_MALLOC}
-MOZ_ARG_ENABLE_BOOL(trace-malloc,
-[  --enable-trace-malloc   Enable malloc tracing],
-    NS_TRACE_MALLOC=1,
-    NS_TRACE_MALLOC= )
-if test "$NS_TRACE_MALLOC"; then
-  # Please, Mr. Linker Man, don't take away our symbol names
-  MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS=
-  USE_ELF_DYNSTR_GC=
-  AC_DEFINE(NS_TRACE_MALLOC)
-fi
-AC_SUBST(NS_TRACE_MALLOC)
-
-dnl ========================================================
 dnl = Add support for Eazel profiler
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(eazel-profiler-support,
 [  --enable-eazel-profiler-support
                           Enable Corel/Eazel profiler support],
     ENABLE_EAZEL_PROFILER=1,
     ENABLE_EAZEL_PROFILER= )
 if test -n "$ENABLE_EAZEL_PROFILER"; then