OLD | NEW |
1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | 6 'variables': { |
7 'jemalloc_dir': '../../third_party/jemalloc/chromium', | 7 'jemalloc_dir': '../../third_party/jemalloc/chromium', |
8 'tcmalloc_dir': '../../third_party/tcmalloc/chromium', | 8 'tcmalloc_dir': '../../third_party/tcmalloc/chromium', |
9 }, | 9 }, |
10 'targets': [ | 10 'targets': [ |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 '<(tcmalloc_dir)/src/base/cycleclock.h', | 199 '<(tcmalloc_dir)/src/base/cycleclock.h', |
200 '<(tcmalloc_dir)/src/base/elfcore.h', | 200 '<(tcmalloc_dir)/src/base/elfcore.h', |
201 '<(tcmalloc_dir)/src/base/googleinit.h', | 201 '<(tcmalloc_dir)/src/base/googleinit.h', |
202 '<(tcmalloc_dir)/src/base/linux_syscall_support.h', | 202 '<(tcmalloc_dir)/src/base/linux_syscall_support.h', |
203 '<(tcmalloc_dir)/src/base/simple_mutex.h', | 203 '<(tcmalloc_dir)/src/base/simple_mutex.h', |
204 '<(tcmalloc_dir)/src/base/spinlock_linux-inl.h', | 204 '<(tcmalloc_dir)/src/base/spinlock_linux-inl.h', |
205 '<(tcmalloc_dir)/src/base/spinlock_posix-inl.h', | 205 '<(tcmalloc_dir)/src/base/spinlock_posix-inl.h', |
206 '<(tcmalloc_dir)/src/base/spinlock_win32-inl.h', | 206 '<(tcmalloc_dir)/src/base/spinlock_win32-inl.h', |
207 '<(tcmalloc_dir)/src/base/stl_allocator.h', | 207 '<(tcmalloc_dir)/src/base/stl_allocator.h', |
208 '<(tcmalloc_dir)/src/base/thread_annotations.h', | 208 '<(tcmalloc_dir)/src/base/thread_annotations.h', |
209 '<(tcmalloc_dir)/src/debugallocation.cc', | |
210 '<(tcmalloc_dir)/src/getpc.h', | 209 '<(tcmalloc_dir)/src/getpc.h', |
211 '<(tcmalloc_dir)/src/google/heap-checker.h', | 210 '<(tcmalloc_dir)/src/google/heap-checker.h', |
212 '<(tcmalloc_dir)/src/google/heap-profiler.h', | 211 '<(tcmalloc_dir)/src/google/heap-profiler.h', |
213 '<(tcmalloc_dir)/src/google/malloc_extension_c.h', | 212 '<(tcmalloc_dir)/src/google/malloc_extension_c.h', |
214 '<(tcmalloc_dir)/src/google/malloc_hook.h', | 213 '<(tcmalloc_dir)/src/google/malloc_hook.h', |
215 '<(tcmalloc_dir)/src/google/malloc_hook_c.h', | 214 '<(tcmalloc_dir)/src/google/malloc_hook_c.h', |
216 '<(tcmalloc_dir)/src/google/profiler.h', | 215 '<(tcmalloc_dir)/src/google/profiler.h', |
217 '<(tcmalloc_dir)/src/google/stacktrace.h', | 216 '<(tcmalloc_dir)/src/google/stacktrace.h', |
218 '<(tcmalloc_dir)/src/memfs_malloc.cc', | 217 '<(tcmalloc_dir)/src/memfs_malloc.cc', |
219 '<(tcmalloc_dir)/src/packed-cache-inl.h', | 218 '<(tcmalloc_dir)/src/packed-cache-inl.h', |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 '<(tcmalloc_dir)/src/heap-checker-bcad.cc', | 293 '<(tcmalloc_dir)/src/heap-checker-bcad.cc', |
295 '<(tcmalloc_dir)/src/heap-checker.cc', | 294 '<(tcmalloc_dir)/src/heap-checker.cc', |
296 '<(tcmalloc_dir)/src/heap-profiler.cc', | 295 '<(tcmalloc_dir)/src/heap-profiler.cc', |
297 '<(tcmalloc_dir)/src/memory_region_map.cc', | 296 '<(tcmalloc_dir)/src/memory_region_map.cc', |
298 '<(tcmalloc_dir)/src/memory_region_map.h', | 297 '<(tcmalloc_dir)/src/memory_region_map.h', |
299 '<(tcmalloc_dir)/src/profiledata.cc', | 298 '<(tcmalloc_dir)/src/profiledata.cc', |
300 '<(tcmalloc_dir)/src/profiledata.h', | 299 '<(tcmalloc_dir)/src/profiledata.h', |
301 '<(tcmalloc_dir)/src/profile-handler.cc', | 300 '<(tcmalloc_dir)/src/profile-handler.cc', |
302 '<(tcmalloc_dir)/src/profile-handler.h', | 301 '<(tcmalloc_dir)/src/profile-handler.h', |
303 '<(tcmalloc_dir)/src/profiler.cc', | 302 '<(tcmalloc_dir)/src/profiler.cc', |
| 303 |
| 304 # debugallocation |
| 305 '<(tcmalloc_dir)/src/debugallocation.cc', |
304 ], | 306 ], |
305 }], | 307 }], |
306 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { | 308 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
307 'sources!': [ | 309 'sources!': [ |
308 '<(tcmalloc_dir)/src/system-alloc.h', | 310 '<(tcmalloc_dir)/src/system-alloc.h', |
309 '<(tcmalloc_dir)/src/windows/port.cc', | 311 '<(tcmalloc_dir)/src/windows/port.cc', |
310 '<(tcmalloc_dir)/src/windows/port.h', | 312 '<(tcmalloc_dir)/src/windows/port.h', |
311 | 313 |
312 # TODO(willchan): Support allocator shim later on. | 314 # TODO(willchan): Support allocator shim later on. |
313 'allocator_shim.cc', | 315 'allocator_shim.cc', |
(...skipping 11 matching lines...) Expand all Loading... |
325 '-fvisibility=hidden', | 327 '-fvisibility=hidden', |
326 ], | 328 ], |
327 'link_settings': { | 329 'link_settings': { |
328 'ldflags': [ | 330 'ldflags': [ |
329 # Don't let linker rip this symbol out, otherwise the heap&cpu | 331 # Don't let linker rip this symbol out, otherwise the heap&cpu |
330 # profilers will not initialize properly on startup. | 332 # profilers will not initialize properly on startup. |
331 '-Wl,-uIsHeapProfilerRunning,-uProfilerStart', | 333 '-Wl,-uIsHeapProfilerRunning,-uProfilerStart', |
332 # Do the same for heap leak checker. | 334 # Do the same for heap leak checker. |
333 '-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapP
KvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi', | 335 '-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapP
KvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi', |
334 '-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapP
KvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl', | 336 '-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapP
KvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl', |
335 ]}, | 337 ]}, |
336 }], | 338 }], |
337 [ 'linux_use_heapchecker==0', { | 339 [ 'linux_use_debugallocation==1', { |
338 # Do not compile and link the heapchecker source. | 340 'sources!': [ |
339 'sources!': [ | 341 # debugallocation.cc #includes tcmalloc.cc, |
340 '<(tcmalloc_dir)/src/heap-checker-bcad.cc', | 342 # so only one of them should be used. |
341 '<(tcmalloc_dir)/src/heap-checker.cc', | 343 '<(tcmalloc_dir)/src/tcmalloc.cc', |
342 ], | 344 ], |
343 # Disable the heap checker in tcmalloc. | 345 'cflags': [ |
344 'cflags': [ | 346 '-DTCMALLOC_FOR_DEBUGALLOCATION', |
345 '-DNO_HEAP_CHECK', | 347 ], |
346 ], | 348 }, { # linux_use_debugallocation != 1 |
347 }], | 349 'sources!': [ |
| 350 '<(tcmalloc_dir)/src/debugallocation.cc', |
| 351 ], |
| 352 }], |
| 353 [ 'linux_use_heapchecker==0', { |
| 354 # Do not compile and link the heapchecker source. |
| 355 'sources!': [ |
| 356 '<(tcmalloc_dir)/src/heap-checker-bcad.cc', |
| 357 '<(tcmalloc_dir)/src/heap-checker.cc', |
| 358 ], |
| 359 # Disable the heap checker in tcmalloc. |
| 360 'cflags': [ |
| 361 '-DNO_HEAP_CHECK', |
| 362 ], |
| 363 }], |
348 ], | 364 ], |
349 }, | 365 }, |
350 { | 366 { |
351 'target_name': 'allocator_unittests', | 367 'target_name': 'allocator_unittests', |
352 'type': 'executable', | 368 'type': 'executable', |
353 'dependencies': [ | 369 'dependencies': [ |
354 'allocator', | 370 'allocator', |
355 '../../testing/gtest.gyp:gtest', | 371 '../../testing/gtest.gyp:gtest', |
356 ], | 372 ], |
357 'include_dirs': [ | 373 'include_dirs': [ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 ], | 409 ], |
394 }], | 410 }], |
395 ], | 411 ], |
396 } | 412 } |
397 | 413 |
398 # Local Variables: | 414 # Local Variables: |
399 # tab-width:2 | 415 # tab-width:2 |
400 # indent-tabs-mode:nil | 416 # indent-tabs-mode:nil |
401 # End: | 417 # End: |
402 # vim: set expandtab tabstop=2 shiftwidth=2: | 418 # vim: set expandtab tabstop=2 shiftwidth=2: |
OLD | NEW |