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

Side by Side Diff: build/common.gypi

Issue 10411047: Type profiler by intercepting 'new' and 'delete' expressions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: stop interceptors in an entire child process Created 8 years, 4 months 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
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 # IMPORTANT: 5 # IMPORTANT:
6 # Please don't directly include this file if you are building via gyp_chromium, 6 # Please don't directly include this file if you are building via gyp_chromium,
7 # since gyp_chromium is automatically forcing its inclusion. 7 # since gyp_chromium is automatically forcing its inclusion.
8 { 8 {
9 # Variables expected to be overriden on the GYP command line (-D) or by 9 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi. 10 # ~/.gyp/include.gypi.
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 # Enable building with ASAN (Clang's -faddress-sanitizer option). 246 # Enable building with ASAN (Clang's -faddress-sanitizer option).
247 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1 247 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
248 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addre sssanitizer 248 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addre sssanitizer
249 'asan%': 0, 249 'asan%': 0,
250 250
251 # Enable building with TSAN (Clang's -fthread-sanitizer option). 251 # Enable building with TSAN (Clang's -fthread-sanitizer option).
252 # -fthread-sanitizer only works with clang, but tsan=1 implies clang=1 252 # -fthread-sanitizer only works with clang, but tsan=1 implies clang=1
253 # See http://clang.llvm.org/docs/ThreadSanitizer.html 253 # See http://clang.llvm.org/docs/ThreadSanitizer.html
254 'tsan%': 0, 254 'tsan%': 0,
255 255
256 # Use a modified version of Clang to intercept allocated types and sizes
257 # for allocated objects. -fintercept-allocated-type only works with the
258 # modified clang, but clang_use_allocated_type=1 implies clang=1
259 # TODO(dmikurube): Add a link to a description page.
260 # TODO(dmikurube): Support mac with another AllocatedTypeMap store.
261 'clang_use_allocated_type%': 0,
262
256 # Set to true to instrument the code with function call logger. 263 # Set to true to instrument the code with function call logger.
257 # See src/third_party/cygprofile/cyg-profile.cc for details. 264 # See src/third_party/cygprofile/cyg-profile.cc for details.
258 'order_profiling%': 0, 265 'order_profiling%': 0,
259 266
260 # Use the provided profiled order file to link Chrome image with it. 267 # Use the provided profiled order file to link Chrome image with it.
261 # This makes Chrome faster by better using CPU cache when executing code. 268 # This makes Chrome faster by better using CPU cache when executing code.
262 # This is known as PGO (profile guided optimization). 269 # This is known as PGO (profile guided optimization).
263 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-e ffort 270 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-e ffort
264 'order_text_section%' : "", 271 'order_text_section%' : "",
265 272
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 'enable_one_click_signin%': '<(enable_one_click_signin)', 588 'enable_one_click_signin%': '<(enable_one_click_signin)',
582 'enable_webrtc%': '<(enable_webrtc)', 589 'enable_webrtc%': '<(enable_webrtc)',
583 'chromium_win_pch%': '<(chromium_win_pch)', 590 'chromium_win_pch%': '<(chromium_win_pch)',
584 'configuration_policy%': '<(configuration_policy)', 591 'configuration_policy%': '<(configuration_policy)',
585 'safe_browsing%': '<(safe_browsing)', 592 'safe_browsing%': '<(safe_browsing)',
586 'input_speech%': '<(input_speech)', 593 'input_speech%': '<(input_speech)',
587 'notifications%': '<(notifications)', 594 'notifications%': '<(notifications)',
588 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', 595 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
589 'asan%': '<(asan)', 596 'asan%': '<(asan)',
590 'tsan%': '<(tsan)', 597 'tsan%': '<(tsan)',
598 'clang_use_allocated_type%': '<(clang_use_allocated_type)',
591 'order_profiling%': '<(order_profiling)', 599 'order_profiling%': '<(order_profiling)',
592 'order_text_section%': '<(order_text_section)', 600 'order_text_section%': '<(order_text_section)',
593 'enable_extensions%': '<(enable_extensions)', 601 'enable_extensions%': '<(enable_extensions)',
594 'enable_web_intents%': '<(enable_web_intents)', 602 'enable_web_intents%': '<(enable_web_intents)',
595 'enable_web_intents_tag%': '<(enable_web_intents_tag)', 603 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
596 'ios_sdk%': '<(ios_sdk)', 604 'ios_sdk%': '<(ios_sdk)',
597 'ios_deployment_target%': '<(ios_deployment_target)', 605 'ios_deployment_target%': '<(ios_deployment_target)',
598 'enable_plugin_installation%': '<(enable_plugin_installation)', 606 'enable_plugin_installation%': '<(enable_plugin_installation)',
599 'enable_protector_service%': '<(enable_protector_service)', 607 'enable_protector_service%': '<(enable_protector_service)',
600 'enable_session_service%': '<(enable_session_service)', 608 'enable_session_service%': '<(enable_session_service)',
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 # third_party/asan may be different from the default one. 1192 # third_party/asan may be different from the default one.
1185 # TODO(glider): this isn't true anymore, need to check if we can use the 1193 # TODO(glider): this isn't true anymore, need to check if we can use the
1186 # plugins now. 1194 # plugins now.
1187 'clang_use_chrome_plugins%': 0, 1195 'clang_use_chrome_plugins%': 0,
1188 }], 1196 }],
1189 1197
1190 ['tsan==1', { 1198 ['tsan==1', {
1191 'clang%': 1, 1199 'clang%': 1,
1192 }], 1200 }],
1193 1201
1202 ['clang_use_allocated_type==1', {
1203 'clang%': 1,
1204 'clang_use_chrome_plugins%': 0,
1205 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1206 }],
1207
1194 # On valgrind bots, override the optimizer settings so we don't inline too 1208 # On valgrind bots, override the optimizer settings so we don't inline too
1195 # much and make the stacks harder to figure out. 1209 # much and make the stacks harder to figure out.
1196 # 1210 #
1197 # TODO(rnk): Kill off variables that no one else uses and just implement 1211 # TODO(rnk): Kill off variables that no one else uses and just implement
1198 # them under a build_for_tool== condition. 1212 # them under a build_for_tool== condition.
1199 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { 1213 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1200 # gcc flags 1214 # gcc flags
1201 'mac_debug_optimization': '1', 1215 'mac_debug_optimization': '1',
1202 'mac_release_optimization': '1', 1216 'mac_release_optimization': '1',
1203 'release_optimize': '1', 1217 'release_optimize': '1',
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1589 'defines': ['ENABLE_AUTOMATION=1'], 1603 'defines': ['ENABLE_AUTOMATION=1'],
1590 }], 1604 }],
1591 ['enable_printing==1', { 1605 ['enable_printing==1', {
1592 'defines': ['ENABLE_PRINTING=1'], 1606 'defines': ['ENABLE_PRINTING=1'],
1593 }], 1607 }],
1594 ['enable_captive_portal_detection==1', { 1608 ['enable_captive_portal_detection==1', {
1595 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], 1609 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
1596 }], 1610 }],
1597 ], # conditions for 'target_defaults' 1611 ], # conditions for 'target_defaults'
1598 'target_conditions': [ 1612 'target_conditions': [
1613 ['_type=="executable" or _type=="loadable_module"', {
1614 'target_conditions': [
1615 # Some binaries doesn't use tcmalloc. We use empty interceptors
1616 # for these binaries since the allocated type mapping is recorded
1617 # in a tcmalloc-dependent data structure.
1618 ['_target_name=="mksnapshot" or _target_name=="protoc" or _target_name =="ppGoogleNaClPluginChrome"', {
1619 # Ignore allocated types.
1620 'conditions': [
1621 ['clang_use_allocated_type==1', {
1622 'dependencies': [
1623 '<!(realpath <(DEPTH)/base/allocator/allocator.gyp)' + ':alloc ated_type_ignore#target',
1624 ]},
1625 ],
1626 ]}, {
1627 # Store allocated types in TCMalloc's allocated_type_map (extended).
1628 'conditions': [
1629 ['clang_use_allocated_type==1', {
1630 'dependencies': [
1631 '<!(realpath <(DEPTH)/base/allocator/allocator.gyp)' + ':alloc ated_type_tcmalloc#target',
1632 ]},
1633 ],
1634 ]},
1635 ]
1636 ]},
1637 ],
1599 ['enable_wexit_time_destructors==1', { 1638 ['enable_wexit_time_destructors==1', {
1600 'conditions': [ 1639 'conditions': [
1601 [ 'clang==1', { 1640 [ 'clang==1', {
1602 'cflags': [ 1641 'cflags': [
1603 '-Wexit-time-destructors', 1642 '-Wexit-time-destructors',
1604 ], 1643 ],
1605 'xcode_settings': { 1644 'xcode_settings': {
1606 'WARNING_CFLAGS': [ 1645 'WARNING_CFLAGS': [
1607 '-Wexit-time-destructors', 1646 '-Wexit-time-destructors',
1608 ], 1647 ],
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
2335 'cflags': [ 2374 'cflags': [
2336 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', 2375 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2337 ], 2376 ],
2338 }], 2377 }],
2339 ['clang==1 and "<(GENERATOR)"=="ninja"', { 2378 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2340 'cflags': [ 2379 'cflags': [
2341 # See http://crbug.com/110262 2380 # See http://crbug.com/110262
2342 '-fcolor-diagnostics', 2381 '-fcolor-diagnostics',
2343 ], 2382 ],
2344 }], 2383 }],
2384 ['clang_use_allocated_type==1', {
2385 'cflags_cc!': ['-fno-rtti'],
2386 'cflags_cc+': ['-gline-tables-only'],
2387 'target_conditions': [
2388 ['_target_name!="allocator" and _target_name!="allocator_extensi on_thunks" and _target_name!="libcmt" and _target_name!="allocator_extension_thu nks_win64" and _target_name!="allocated_type_log" and _target_name!="allocated_t ype_ignore" and _target_name!="allocated_type_tcmalloc"', {
2389 'cflags_cc+': [
2390 '-frtti',
2391 '-fintercept-allocation-functions',
2392 '-I../../base/allocator',
2393 '-include',
2394 'allocated_type.h',
2395 ],
2396 }],
2397 ],
2398 'defines': ['USE_ALLOCATED_TYPE'],
2399 }],
2345 ['asan==1', { 2400 ['asan==1', {
2346 'target_conditions': [ 2401 'target_conditions': [
2347 ['_toolset=="target"', { 2402 ['_toolset=="target"', {
2348 'cflags': [ 2403 'cflags': [
2349 '-faddress-sanitizer', 2404 '-faddress-sanitizer',
2350 '-fno-omit-frame-pointer', 2405 '-fno-omit-frame-pointer',
2351 ], 2406 ],
2352 'ldflags': [ 2407 'ldflags': [
2353 '-faddress-sanitizer', 2408 '-faddress-sanitizer',
2354 ], 2409 ],
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
3349 # settings in target dicts. SYMROOT is a special case, because many other 3404 # settings in target dicts. SYMROOT is a special case, because many other
3350 # Xcode variables depend on it, including variables such as 3405 # Xcode variables depend on it, including variables such as
3351 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 3406 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3352 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 3407 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3353 # files to appear (when present) in the UI as actual files and not red 3408 # files to appear (when present) in the UI as actual files and not red
3354 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 3409 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3355 # and therefore SYMROOT, needs to be set at the project level. 3410 # and therefore SYMROOT, needs to be set at the project level.
3356 'SYMROOT': '<(DEPTH)/xcodebuild', 3411 'SYMROOT': '<(DEPTH)/xcodebuild',
3357 }, 3412 },
3358 } 3413 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698