Bug 1057754 (follow-up) - Allow Valgrind + jemalloc to be combined, because it makes sense when running Cachegrind. r=me.
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 25 Aug 2014 20:38:29 -0700
changeset 223243 8d937c3db92bb26524c7817b6937eb7152d98b44
parent 223242 775a14a8e1903322c425e051448925ccc13125a0
child 223244 f595c29365b8514cf6199442401a1833fb65f68c
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1057754
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1057754 (follow-up) - Allow Valgrind + jemalloc to be combined, because it makes sense when running Cachegrind. r=me.
memory/mozjemalloc/jemalloc.c
--- a/memory/mozjemalloc/jemalloc.c
+++ b/memory/mozjemalloc/jemalloc.c
@@ -188,20 +188,16 @@
 
 /*
  * MALLOC_VALIDATE causes malloc_usable_size() to perform some pointer
  * validation.  There are many possible errors that validation does not even
  * attempt to detect.
  */
 #define MALLOC_VALIDATE
 
-#ifdef MOZ_VALGRIND
-#  include <valgrind/valgrind.h>
-#endif
-
 /*
  * MALLOC_BALANCE enables monitoring of arena lock contention and dynamically
  * re-balances arena load if exponentially averaged contention exceeds a
  * certain threshold.
  */
 /* #define	MALLOC_BALANCE */
 
 /*
@@ -3374,25 +3370,16 @@ arena_run_split(arena_t *arena, arena_ru
 }
 
 static void
 arena_chunk_init(arena_t *arena, arena_chunk_t *chunk)
 {
 	arena_run_t *run;
 	size_t i;
 
-#ifdef MOZ_VALGRIND
-	if (RUNNING_ON_VALGRIND) {
-		fprintf(stderr, "ERROR: Cannot run Valgrind with jemalloc enabled.\n");
-		fprintf(stderr, "Please build with --disable-jemalloc, or run Valgrind with\n");
-		fprintf(stderr, "--soname-synonyms=somalloc=NONE.\n");
-		jemalloc_crash();
-	}
-#endif
-
 #ifdef MALLOC_STATS
 	arena->stats.mapped += chunksize;
 #endif
 
 	chunk->arena = arena;
 
 	/*
 	 * Claim that no pages are in use, since the header is merely overhead.