diff options
author | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 08:04:03 +0000 |
---|---|---|
committer | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 08:04:03 +0000 |
commit | 39ca7de68778d0987c7308d5e6c19886c2bbcfc6 (patch) | |
tree | c1dd9e137178b17b2400954f5a2e3a9123f6a76d /base/allocator | |
parent | 15e678a9d2010ae0332713bc0f9d0be002a9a32e (diff) | |
download | chromium_src-39ca7de68778d0987c7308d5e6c19886c2bbcfc6.zip chromium_src-39ca7de68778d0987c7308d5e6c19886c2bbcfc6.tar.gz chromium_src-39ca7de68778d0987c7308d5e6c19886c2bbcfc6.tar.bz2 |
Add the linux_use_debugallocation flag.
Setting this flag to 1 shall force the use of debugallocation.cc instead of
tcmalloc.cc
The flag is off by default because it still needs testing.
BUG=30715
Review URL: http://codereview.chromium.org/1513043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44759 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/allocator')
-rw-r--r-- | base/allocator/allocator.gyp | 44 |
1 files changed, 30 insertions, 14 deletions
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp index b8df28f..a4a4edd 100644 --- a/base/allocator/allocator.gyp +++ b/base/allocator/allocator.gyp @@ -206,7 +206,6 @@ '<(tcmalloc_dir)/src/base/spinlock_win32-inl.h', '<(tcmalloc_dir)/src/base/stl_allocator.h', '<(tcmalloc_dir)/src/base/thread_annotations.h', - '<(tcmalloc_dir)/src/debugallocation.cc', '<(tcmalloc_dir)/src/getpc.h', '<(tcmalloc_dir)/src/google/heap-checker.h', '<(tcmalloc_dir)/src/google/heap-profiler.h', @@ -301,6 +300,9 @@ '<(tcmalloc_dir)/src/profile-handler.cc', '<(tcmalloc_dir)/src/profile-handler.h', '<(tcmalloc_dir)/src/profiler.cc', + + # debugallocation + '<(tcmalloc_dir)/src/debugallocation.cc', ], }], ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { @@ -332,19 +334,33 @@ # Do the same for heap leak checker. '-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapPKvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi', '-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapPKvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl', - ]}, - }], - [ 'linux_use_heapchecker==0', { - # Do not compile and link the heapchecker source. - 'sources!': [ - '<(tcmalloc_dir)/src/heap-checker-bcad.cc', - '<(tcmalloc_dir)/src/heap-checker.cc', - ], - # Disable the heap checker in tcmalloc. - 'cflags': [ - '-DNO_HEAP_CHECK', - ], - }], + ]}, + }], + [ 'linux_use_debugallocation==1', { + 'sources!': [ + # debugallocation.cc #includes tcmalloc.cc, + # so only one of them should be used. + '<(tcmalloc_dir)/src/tcmalloc.cc', + ], + 'cflags': [ + '-DTCMALLOC_FOR_DEBUGALLOCATION', + ], + }, { # linux_use_debugallocation != 1 + 'sources!': [ + '<(tcmalloc_dir)/src/debugallocation.cc', + ], + }], + [ 'linux_use_heapchecker==0', { + # Do not compile and link the heapchecker source. + 'sources!': [ + '<(tcmalloc_dir)/src/heap-checker-bcad.cc', + '<(tcmalloc_dir)/src/heap-checker.cc', + ], + # Disable the heap checker in tcmalloc. + 'cflags': [ + '-DNO_HEAP_CHECK', + ], + }], ], }, { |