OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 'use_vtable_verify%': 0, | 9 'use_vtable_verify%': 0, |
10 }, | 10 }, |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 196 |
197 # jemalloc files | 197 # jemalloc files |
198 '<(jemalloc_dir)/jemalloc.c', | 198 '<(jemalloc_dir)/jemalloc.c', |
199 '<(jemalloc_dir)/jemalloc.h', | 199 '<(jemalloc_dir)/jemalloc.h', |
200 '<(jemalloc_dir)/ql.h', | 200 '<(jemalloc_dir)/ql.h', |
201 '<(jemalloc_dir)/qr.h', | 201 '<(jemalloc_dir)/qr.h', |
202 '<(jemalloc_dir)/rb.h', | 202 '<(jemalloc_dir)/rb.h', |
203 | 203 |
204 'allocator_shim.cc', | 204 'allocator_shim.cc', |
205 'allocator_shim.h', | 205 'allocator_shim.h', |
206 'debugallocation_shim.cc', | |
207 'generic_allocators.cc', | 206 'generic_allocators.cc', |
208 'win_allocator.cc', | 207 'win_allocator.cc', |
209 ], | 208 ], |
210 # sources! means that these are not compiled directly. | 209 # sources! means that these are not compiled directly. |
211 'sources!': [ | 210 'sources!': [ |
212 # Included by allocator_shim.cc for maximal inlining. | 211 # Included by allocator_shim.cc for maximal inlining. |
213 'generic_allocators.cc', | 212 'generic_allocators.cc', |
214 'win_allocator.cc', | 213 'win_allocator.cc', |
215 | 214 |
216 # Included by debugallocation_shim.cc. | |
217 '<(tcmalloc_dir)/src/debugallocation.cc', | |
218 '<(tcmalloc_dir)/src/tcmalloc.cc', | |
219 | |
220 # We simply don't use these, but list them above so that IDE | 215 # We simply don't use these, but list them above so that IDE |
221 # users can view the full available source for reference, etc. | 216 # users can view the full available source for reference, etc. |
222 '<(tcmalloc_dir)/src/addressmap-inl.h', | 217 '<(tcmalloc_dir)/src/addressmap-inl.h', |
223 '<(tcmalloc_dir)/src/base/atomicops-internals-linuxppc.h', | 218 '<(tcmalloc_dir)/src/base/atomicops-internals-linuxppc.h', |
224 '<(tcmalloc_dir)/src/base/atomicops-internals-macosx.h', | 219 '<(tcmalloc_dir)/src/base/atomicops-internals-macosx.h', |
225 '<(tcmalloc_dir)/src/base/atomicops-internals-x86-msvc.h', | 220 '<(tcmalloc_dir)/src/base/atomicops-internals-x86-msvc.h', |
226 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.cc', | 221 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.cc', |
227 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.h', | 222 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.h', |
228 '<(tcmalloc_dir)/src/base/atomicops.h', | 223 '<(tcmalloc_dir)/src/base/atomicops.h', |
229 '<(tcmalloc_dir)/src/base/basictypes.h', | 224 '<(tcmalloc_dir)/src/base/basictypes.h', |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 'AdditionalOptions': ['/ignore:4006'], | 293 'AdditionalOptions': ['/ignore:4006'], |
299 }, | 294 }, |
300 }, | 295 }, |
301 'configurations': { | 296 'configurations': { |
302 'Debug_Base': { | 297 'Debug_Base': { |
303 'msvs_settings': { | 298 'msvs_settings': { |
304 'VCCLCompilerTool': { | 299 'VCCLCompilerTool': { |
305 'RuntimeLibrary': '0', | 300 'RuntimeLibrary': '0', |
306 }, | 301 }, |
307 }, | 302 }, |
308 'variables': { | |
309 # Provide a way to force disable debugallocation in Debug builds, | |
310 # e.g. for profiling (it's more rare to profile Debug builds, | |
311 # but people sometimes need to do that). | |
312 'disable_debugallocation%': 0, | |
313 }, | |
314 'conditions': [ | |
315 ['disable_debugallocation==0', { | |
316 'defines': [ | |
317 # Use debugallocation for Debug builds to catch problems early | |
318 # and cleanly, http://crbug.com/30715 . | |
319 'TCMALLOC_FOR_DEBUGALLOCATION', | |
320 ], | |
321 }], | |
322 ], | |
323 }, | 303 }, |
324 }, | 304 }, |
325 'conditions': [ | 305 'conditions': [ |
326 ['OS=="linux" and clang_type_profiler==1', { | 306 ['OS=="linux" and clang_type_profiler==1', { |
327 'dependencies': [ | 307 'dependencies': [ |
328 'type_profiler_tcmalloc', | 308 'type_profiler_tcmalloc', |
329 ], | 309 ], |
330 # It is undoing dependencies and cflags_cc for type_profiler which | 310 # It is undoing dependencies and cflags_cc for type_profiler which |
331 # build/common.gypi injects into all targets. | 311 # build/common.gypi injects into all targets. |
332 'dependencies!': [ | 312 'dependencies!': [ |
(...skipping 26 matching lines...) Expand all Loading... |
359 '<(tcmalloc_dir)/src/base/linuxthreads.h', | 339 '<(tcmalloc_dir)/src/base/linuxthreads.h', |
360 '<(tcmalloc_dir)/src/base/vdso_support.cc', | 340 '<(tcmalloc_dir)/src/base/vdso_support.cc', |
361 '<(tcmalloc_dir)/src/base/vdso_support.h', | 341 '<(tcmalloc_dir)/src/base/vdso_support.h', |
362 '<(tcmalloc_dir)/src/maybe_threads.cc', | 342 '<(tcmalloc_dir)/src/maybe_threads.cc', |
363 '<(tcmalloc_dir)/src/maybe_threads.h', | 343 '<(tcmalloc_dir)/src/maybe_threads.h', |
364 '<(tcmalloc_dir)/src/symbolize.h', | 344 '<(tcmalloc_dir)/src/symbolize.h', |
365 '<(tcmalloc_dir)/src/system-alloc.cc', | 345 '<(tcmalloc_dir)/src/system-alloc.cc', |
366 '<(tcmalloc_dir)/src/system-alloc.h', | 346 '<(tcmalloc_dir)/src/system-alloc.h', |
367 | 347 |
368 # included by allocator_shim.cc | 348 # included by allocator_shim.cc |
369 'debugallocation_shim.cc', | 349 '<(tcmalloc_dir)/src/tcmalloc.cc', |
370 | 350 |
371 # heap-profiler/checker/cpuprofiler | 351 # heap-profiler/checker/cpuprofiler |
372 '<(tcmalloc_dir)/src/base/thread_lister.c', | 352 '<(tcmalloc_dir)/src/base/thread_lister.c', |
373 '<(tcmalloc_dir)/src/base/thread_lister.h', | 353 '<(tcmalloc_dir)/src/base/thread_lister.h', |
374 '<(tcmalloc_dir)/src/deep-heap-profile.cc', | 354 '<(tcmalloc_dir)/src/deep-heap-profile.cc', |
375 '<(tcmalloc_dir)/src/deep-heap-profile.h', | 355 '<(tcmalloc_dir)/src/deep-heap-profile.h', |
376 '<(tcmalloc_dir)/src/heap-checker-bcad.cc', | 356 '<(tcmalloc_dir)/src/heap-checker-bcad.cc', |
377 '<(tcmalloc_dir)/src/heap-checker.cc', | 357 '<(tcmalloc_dir)/src/heap-checker.cc', |
378 '<(tcmalloc_dir)/src/heap-profiler.cc', | 358 '<(tcmalloc_dir)/src/heap-profiler.cc', |
379 '<(tcmalloc_dir)/src/heap-profile-table.cc', | 359 '<(tcmalloc_dir)/src/heap-profile-table.cc', |
380 '<(tcmalloc_dir)/src/heap-profile-table.h', | 360 '<(tcmalloc_dir)/src/heap-profile-table.h', |
381 '<(tcmalloc_dir)/src/memory_region_map.cc', | 361 '<(tcmalloc_dir)/src/memory_region_map.cc', |
382 '<(tcmalloc_dir)/src/memory_region_map.h', | 362 '<(tcmalloc_dir)/src/memory_region_map.h', |
383 '<(tcmalloc_dir)/src/profiledata.cc', | 363 '<(tcmalloc_dir)/src/profiledata.cc', |
384 '<(tcmalloc_dir)/src/profiledata.h', | 364 '<(tcmalloc_dir)/src/profiledata.h', |
385 '<(tcmalloc_dir)/src/profile-handler.cc', | 365 '<(tcmalloc_dir)/src/profile-handler.cc', |
386 '<(tcmalloc_dir)/src/profile-handler.h', | 366 '<(tcmalloc_dir)/src/profile-handler.h', |
387 '<(tcmalloc_dir)/src/profiler.cc', | 367 '<(tcmalloc_dir)/src/profiler.cc', |
| 368 |
| 369 # debugallocation |
| 370 '<(tcmalloc_dir)/src/debugallocation.cc', |
388 ], | 371 ], |
389 }], | 372 }], |
390 ['OS=="linux" or OS=="freebsd" or OS=="solaris"', { | 373 ['OS=="linux" or OS=="freebsd" or OS=="solaris"', { |
391 'sources!': [ | 374 'sources!': [ |
392 '<(tcmalloc_dir)/src/system-alloc.h', | 375 '<(tcmalloc_dir)/src/system-alloc.h', |
393 '<(tcmalloc_dir)/src/windows/port.cc', | 376 '<(tcmalloc_dir)/src/windows/port.cc', |
394 '<(tcmalloc_dir)/src/windows/port.h', | 377 '<(tcmalloc_dir)/src/windows/port.h', |
395 | 378 |
396 # TODO(willchan): Support allocator shim later on. | 379 # TODO(willchan): Support allocator shim later on. |
397 'allocator_shim.cc', | 380 'allocator_shim.cc', |
(...skipping 26 matching lines...) Expand all Loading... |
424 '-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapP
KvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi', | 407 '-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapP
KvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi', |
425 '-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapP
KvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl', | 408 '-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapP
KvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl', |
426 '-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakCheck
er14UnIgnoreObjectEPKv', | 409 '-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakCheck
er14UnIgnoreObjectEPKv', |
427 ]}, | 410 ]}, |
428 }], | 411 }], |
429 [ 'use_vtable_verify==1', { | 412 [ 'use_vtable_verify==1', { |
430 'cflags': [ | 413 'cflags': [ |
431 '-fvtable-verify=preinit', | 414 '-fvtable-verify=preinit', |
432 ], | 415 ], |
433 }], | 416 }], |
| 417 [ 'linux_use_debugallocation==1', { |
| 418 'sources!': [ |
| 419 # debugallocation.cc #includes tcmalloc.cc, |
| 420 # so only one of them should be used. |
| 421 '<(tcmalloc_dir)/src/tcmalloc.cc', |
| 422 ], |
| 423 'defines': [ |
| 424 'TCMALLOC_FOR_DEBUGALLOCATION', |
| 425 ], |
| 426 }, { # linux_use_debugallocation != 1 |
| 427 'sources!': [ |
| 428 '<(tcmalloc_dir)/src/debugallocation.cc', |
| 429 ], |
| 430 }], |
434 [ 'linux_keep_shadow_stacks==1', { | 431 [ 'linux_keep_shadow_stacks==1', { |
435 'sources': [ | 432 'sources': [ |
436 '<(tcmalloc_dir)/src/linux_shadow_stacks.cc', | 433 '<(tcmalloc_dir)/src/linux_shadow_stacks.cc', |
437 '<(tcmalloc_dir)/src/linux_shadow_stacks.h', | 434 '<(tcmalloc_dir)/src/linux_shadow_stacks.h', |
438 '<(tcmalloc_dir)/src/stacktrace_shadow-inl.h', | 435 '<(tcmalloc_dir)/src/stacktrace_shadow-inl.h', |
439 ], | 436 ], |
440 'cflags': [ | 437 'cflags': [ |
441 '-finstrument-functions', | 438 '-finstrument-functions', |
442 ], | 439 ], |
443 'defines': [ | 440 'defines': [ |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 'sources': [ | 656 'sources': [ |
660 'type_profiler_map_unittests.cc', | 657 'type_profiler_map_unittests.cc', |
661 '<(tcmalloc_dir)/src/gperftools/type_profiler_map.h', | 658 '<(tcmalloc_dir)/src/gperftools/type_profiler_map.h', |
662 '<(tcmalloc_dir)/src/type_profiler_map.cc', | 659 '<(tcmalloc_dir)/src/type_profiler_map.cc', |
663 ], | 660 ], |
664 }, | 661 }, |
665 ], | 662 ], |
666 }], | 663 }], |
667 ], | 664 ], |
668 } | 665 } |
OLD | NEW |