Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Side by Side Diff: base/allocator/allocator.gyp

Issue 11266019: Use tcmalloc's debugallocation for Debug builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable by default Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/allocator/allocator_shim.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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',
206 'generic_allocators.cc', 207 'generic_allocators.cc',
207 'win_allocator.cc', 208 'win_allocator.cc',
208 ], 209 ],
209 # sources! means that these are not compiled directly. 210 # sources! means that these are not compiled directly.
210 'sources!': [ 211 'sources!': [
211 # Included by allocator_shim.cc for maximal inlining. 212 # Included by allocator_shim.cc for maximal inlining.
212 'generic_allocators.cc', 213 'generic_allocators.cc',
213 'win_allocator.cc', 214 'win_allocator.cc',
214 215
216 # Included by debugallocation_shim.cc.
217 '<(tcmalloc_dir)/src/debugallocation.cc',
218 '<(tcmalloc_dir)/src/tcmalloc.cc',
219
215 # We simply don't use these, but list them above so that IDE 220 # We simply don't use these, but list them above so that IDE
216 # users can view the full available source for reference, etc. 221 # users can view the full available source for reference, etc.
217 '<(tcmalloc_dir)/src/addressmap-inl.h', 222 '<(tcmalloc_dir)/src/addressmap-inl.h',
218 '<(tcmalloc_dir)/src/base/atomicops-internals-linuxppc.h', 223 '<(tcmalloc_dir)/src/base/atomicops-internals-linuxppc.h',
219 '<(tcmalloc_dir)/src/base/atomicops-internals-macosx.h', 224 '<(tcmalloc_dir)/src/base/atomicops-internals-macosx.h',
220 '<(tcmalloc_dir)/src/base/atomicops-internals-x86-msvc.h', 225 '<(tcmalloc_dir)/src/base/atomicops-internals-x86-msvc.h',
221 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.cc', 226 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.cc',
222 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.h', 227 '<(tcmalloc_dir)/src/base/atomicops-internals-x86.h',
223 '<(tcmalloc_dir)/src/base/atomicops.h', 228 '<(tcmalloc_dir)/src/base/atomicops.h',
224 '<(tcmalloc_dir)/src/base/basictypes.h', 229 '<(tcmalloc_dir)/src/base/basictypes.h',
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 'AdditionalOptions': ['/ignore:4006'], 298 'AdditionalOptions': ['/ignore:4006'],
294 }, 299 },
295 }, 300 },
296 'configurations': { 301 'configurations': {
297 'Debug_Base': { 302 'Debug_Base': {
298 'msvs_settings': { 303 'msvs_settings': {
299 'VCCLCompilerTool': { 304 'VCCLCompilerTool': {
300 'RuntimeLibrary': '0', 305 'RuntimeLibrary': '0',
301 }, 306 },
302 }, 307 },
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%': 1,
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 ],
303 }, 323 },
304 }, 324 },
305 'conditions': [ 325 'conditions': [
306 ['OS=="linux" and clang_type_profiler==1', { 326 ['OS=="linux" and clang_type_profiler==1', {
307 'dependencies': [ 327 'dependencies': [
308 'type_profiler_tcmalloc', 328 'type_profiler_tcmalloc',
309 ], 329 ],
310 # It is undoing dependencies and cflags_cc for type_profiler which 330 # It is undoing dependencies and cflags_cc for type_profiler which
311 # build/common.gypi injects into all targets. 331 # build/common.gypi injects into all targets.
312 'dependencies!': [ 332 'dependencies!': [
(...skipping 26 matching lines...) Expand all
339 '<(tcmalloc_dir)/src/base/linuxthreads.h', 359 '<(tcmalloc_dir)/src/base/linuxthreads.h',
340 '<(tcmalloc_dir)/src/base/vdso_support.cc', 360 '<(tcmalloc_dir)/src/base/vdso_support.cc',
341 '<(tcmalloc_dir)/src/base/vdso_support.h', 361 '<(tcmalloc_dir)/src/base/vdso_support.h',
342 '<(tcmalloc_dir)/src/maybe_threads.cc', 362 '<(tcmalloc_dir)/src/maybe_threads.cc',
343 '<(tcmalloc_dir)/src/maybe_threads.h', 363 '<(tcmalloc_dir)/src/maybe_threads.h',
344 '<(tcmalloc_dir)/src/symbolize.h', 364 '<(tcmalloc_dir)/src/symbolize.h',
345 '<(tcmalloc_dir)/src/system-alloc.cc', 365 '<(tcmalloc_dir)/src/system-alloc.cc',
346 '<(tcmalloc_dir)/src/system-alloc.h', 366 '<(tcmalloc_dir)/src/system-alloc.h',
347 367
348 # included by allocator_shim.cc 368 # included by allocator_shim.cc
349 '<(tcmalloc_dir)/src/tcmalloc.cc', 369 'debugallocation_shim.cc',
350 370
351 # heap-profiler/checker/cpuprofiler 371 # heap-profiler/checker/cpuprofiler
352 '<(tcmalloc_dir)/src/base/thread_lister.c', 372 '<(tcmalloc_dir)/src/base/thread_lister.c',
353 '<(tcmalloc_dir)/src/base/thread_lister.h', 373 '<(tcmalloc_dir)/src/base/thread_lister.h',
354 '<(tcmalloc_dir)/src/deep-heap-profile.cc', 374 '<(tcmalloc_dir)/src/deep-heap-profile.cc',
355 '<(tcmalloc_dir)/src/deep-heap-profile.h', 375 '<(tcmalloc_dir)/src/deep-heap-profile.h',
356 '<(tcmalloc_dir)/src/heap-checker-bcad.cc', 376 '<(tcmalloc_dir)/src/heap-checker-bcad.cc',
357 '<(tcmalloc_dir)/src/heap-checker.cc', 377 '<(tcmalloc_dir)/src/heap-checker.cc',
358 '<(tcmalloc_dir)/src/heap-profiler.cc', 378 '<(tcmalloc_dir)/src/heap-profiler.cc',
359 '<(tcmalloc_dir)/src/heap-profile-table.cc', 379 '<(tcmalloc_dir)/src/heap-profile-table.cc',
360 '<(tcmalloc_dir)/src/heap-profile-table.h', 380 '<(tcmalloc_dir)/src/heap-profile-table.h',
361 '<(tcmalloc_dir)/src/memory_region_map.cc', 381 '<(tcmalloc_dir)/src/memory_region_map.cc',
362 '<(tcmalloc_dir)/src/memory_region_map.h', 382 '<(tcmalloc_dir)/src/memory_region_map.h',
363 '<(tcmalloc_dir)/src/profiledata.cc', 383 '<(tcmalloc_dir)/src/profiledata.cc',
364 '<(tcmalloc_dir)/src/profiledata.h', 384 '<(tcmalloc_dir)/src/profiledata.h',
365 '<(tcmalloc_dir)/src/profile-handler.cc', 385 '<(tcmalloc_dir)/src/profile-handler.cc',
366 '<(tcmalloc_dir)/src/profile-handler.h', 386 '<(tcmalloc_dir)/src/profile-handler.h',
367 '<(tcmalloc_dir)/src/profiler.cc', 387 '<(tcmalloc_dir)/src/profiler.cc',
368
369 # debugallocation
370 '<(tcmalloc_dir)/src/debugallocation.cc',
371 ], 388 ],
372 }], 389 }],
373 ['OS=="linux" or OS=="freebsd" or OS=="solaris"', { 390 ['OS=="linux" or OS=="freebsd" or OS=="solaris"', {
374 'sources!': [ 391 'sources!': [
375 '<(tcmalloc_dir)/src/system-alloc.h', 392 '<(tcmalloc_dir)/src/system-alloc.h',
376 '<(tcmalloc_dir)/src/windows/port.cc', 393 '<(tcmalloc_dir)/src/windows/port.cc',
377 '<(tcmalloc_dir)/src/windows/port.h', 394 '<(tcmalloc_dir)/src/windows/port.h',
378 395
379 # TODO(willchan): Support allocator shim later on. 396 # TODO(willchan): Support allocator shim later on.
380 'allocator_shim.cc', 397 'allocator_shim.cc',
(...skipping 26 matching lines...) Expand all
407 '-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapP KvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi', 424 '-Wl,-u_Z21InitialMallocHook_NewPKvj,-u_Z22InitialMallocHook_MMapP KvS0_jiiix,-u_Z22InitialMallocHook_SbrkPKvi',
408 '-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapP KvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl', 425 '-Wl,-u_Z21InitialMallocHook_NewPKvm,-u_Z22InitialMallocHook_MMapP KvS0_miiil,-u_Z22InitialMallocHook_SbrkPKvl',
409 '-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakCheck er14UnIgnoreObjectEPKv', 426 '-Wl,-u_ZN15HeapLeakChecker12IgnoreObjectEPKv,-u_ZN15HeapLeakCheck er14UnIgnoreObjectEPKv',
410 ]}, 427 ]},
411 }], 428 }],
412 [ 'use_vtable_verify==1', { 429 [ 'use_vtable_verify==1', {
413 'cflags': [ 430 'cflags': [
414 '-fvtable-verify=preinit', 431 '-fvtable-verify=preinit',
415 ], 432 ],
416 }], 433 }],
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 }],
431 [ 'linux_keep_shadow_stacks==1', { 434 [ 'linux_keep_shadow_stacks==1', {
432 'sources': [ 435 'sources': [
433 '<(tcmalloc_dir)/src/linux_shadow_stacks.cc', 436 '<(tcmalloc_dir)/src/linux_shadow_stacks.cc',
434 '<(tcmalloc_dir)/src/linux_shadow_stacks.h', 437 '<(tcmalloc_dir)/src/linux_shadow_stacks.h',
435 '<(tcmalloc_dir)/src/stacktrace_shadow-inl.h', 438 '<(tcmalloc_dir)/src/stacktrace_shadow-inl.h',
436 ], 439 ],
437 'cflags': [ 440 'cflags': [
438 '-finstrument-functions', 441 '-finstrument-functions',
439 ], 442 ],
440 'defines': [ 443 'defines': [
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 'sources': [ 659 'sources': [
657 'type_profiler_map_unittests.cc', 660 'type_profiler_map_unittests.cc',
658 '<(tcmalloc_dir)/src/gperftools/type_profiler_map.h', 661 '<(tcmalloc_dir)/src/gperftools/type_profiler_map.h',
659 '<(tcmalloc_dir)/src/type_profiler_map.cc', 662 '<(tcmalloc_dir)/src/type_profiler_map.cc',
660 ], 663 ],
661 }, 664 },
662 ], 665 ],
663 }], 666 }],
664 ], 667 ],
665 } 668 }
OLDNEW
« no previous file with comments | « no previous file | base/allocator/allocator_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698