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

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: reflected the comments #17-#19. 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
Alexander Potapenko 2012/08/08 11:27:14 Nit: period at the end of the line.
Dai Mikurube (NOT FULLTIME) 2012/08/09 10:23:54 Done.
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 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 # third_party/asan may be different from the default one. 1189 # third_party/asan may be different from the default one.
1182 # TODO(glider): this isn't true anymore, need to check if we can use the 1190 # TODO(glider): this isn't true anymore, need to check if we can use the
1183 # plugins now. 1191 # plugins now.
1184 'clang_use_chrome_plugins%': 0, 1192 'clang_use_chrome_plugins%': 0,
1185 }], 1193 }],
1186 1194
1187 ['tsan==1', { 1195 ['tsan==1', {
1188 'clang%': 1, 1196 'clang%': 1,
1189 }], 1197 }],
1190 1198
1199 ['clang_use_allocated_type==1', {
1200 'clang%': 1,
1201 'clang_use_chrome_plugins%': 0,
1202 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1203 }],
1204
1191 # On valgrind bots, override the optimizer settings so we don't inline too 1205 # On valgrind bots, override the optimizer settings so we don't inline too
1192 # much and make the stacks harder to figure out. 1206 # much and make the stacks harder to figure out.
1193 # 1207 #
1194 # TODO(rnk): Kill off variables that no one else uses and just implement 1208 # TODO(rnk): Kill off variables that no one else uses and just implement
1195 # them under a build_for_tool== condition. 1209 # them under a build_for_tool== condition.
1196 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { 1210 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1197 # gcc flags 1211 # gcc flags
1198 'mac_debug_optimization': '1', 1212 'mac_debug_optimization': '1',
1199 'mac_release_optimization': '1', 1213 'mac_release_optimization': '1',
1200 'release_optimize': '1', 1214 'release_optimize': '1',
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 'defines': ['ENABLE_AUTOMATION=1'], 1600 'defines': ['ENABLE_AUTOMATION=1'],
1587 }], 1601 }],
1588 ['enable_printing==1', { 1602 ['enable_printing==1', {
1589 'defines': ['ENABLE_PRINTING=1'], 1603 'defines': ['ENABLE_PRINTING=1'],
1590 }], 1604 }],
1591 ['enable_captive_portal_detection==1', { 1605 ['enable_captive_portal_detection==1', {
1592 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], 1606 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
1593 }], 1607 }],
1594 ], # conditions for 'target_defaults' 1608 ], # conditions for 'target_defaults'
1595 'target_conditions': [ 1609 'target_conditions': [
1610 ['_type=="executable" or _type=="loadable_module"', {
1611 'target_conditions': [
1612 # Some binaries doesn't use tcmalloc. We use empty interceptors
1613 # for these binaries since the allocated type mapping is recorded
1614 # in a tcmalloc-dependent data structure.
1615 ['_target_name=="mksnapshot" or _target_name=="protoc" or _target_name =="ppGoogleNaClPluginChrome"', {
1616 # Ignore allocated types.
1617 'conditions': [
1618 ['clang_use_allocated_type==1', {
1619 'dependencies': [
1620 '<!(realpath <(DEPTH)/base/allocator/allocator.gyp)' + ':alloc ated_type_ignore#target',
1621 ]},
1622 ],
1623 ]}, {
1624 # Store allocated types in TCMalloc's allocated_type_map (extended).
1625 'conditions': [
1626 ['clang_use_allocated_type==1', {
1627 'dependencies': [
1628 '<!(realpath <(DEPTH)/base/allocator/allocator.gyp)' + ':alloc ated_type_tcmalloc#target',
1629 ]},
1630 ],
1631 ]},
1632 ]
1633 ]},
1634 ],
1596 ['enable_wexit_time_destructors==1', { 1635 ['enable_wexit_time_destructors==1', {
1597 'conditions': [ 1636 'conditions': [
1598 [ 'clang==1', { 1637 [ 'clang==1', {
1599 'cflags': [ 1638 'cflags': [
1600 '-Wexit-time-destructors', 1639 '-Wexit-time-destructors',
1601 ], 1640 ],
1602 'xcode_settings': { 1641 'xcode_settings': {
1603 'WARNING_CFLAGS': [ 1642 'WARNING_CFLAGS': [
1604 '-Wexit-time-destructors', 1643 '-Wexit-time-destructors',
1605 ], 1644 ],
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
2332 'cflags': [ 2371 'cflags': [
2333 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', 2372 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2334 ], 2373 ],
2335 }], 2374 }],
2336 ['clang==1 and "<(GENERATOR)"=="ninja"', { 2375 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2337 'cflags': [ 2376 'cflags': [
2338 # See http://crbug.com/110262 2377 # See http://crbug.com/110262
2339 '-fcolor-diagnostics', 2378 '-fcolor-diagnostics',
2340 ], 2379 ],
2341 }], 2380 }],
2381 ['clang_use_allocated_type==1', {
2382 'cflags_cc!': ['-fno-rtti'],
2383 'cflags_cc+': ['-gline-tables-only'],
2384 'target_conditions': [
2385 ['_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"', {
2386 'cflags_cc+': [
2387 '-frtti',
2388 '-fintercept-allocation-functions',
2389 '-I../../base/allocator',
2390 '-include',
2391 'allocated_type.h',
2392 ],
2393 }],
2394 ],
2395 'defines': ['USE_ALLOCATED_TYPE'],
2396 }],
2342 ['asan==1', { 2397 ['asan==1', {
2343 'target_conditions': [ 2398 'target_conditions': [
2344 ['_toolset=="target"', { 2399 ['_toolset=="target"', {
2345 'cflags': [ 2400 'cflags': [
2346 '-faddress-sanitizer', 2401 '-faddress-sanitizer',
2347 '-fno-omit-frame-pointer', 2402 '-fno-omit-frame-pointer',
2348 ], 2403 ],
2349 'ldflags': [ 2404 'ldflags': [
2350 '-faddress-sanitizer', 2405 '-faddress-sanitizer',
2351 ], 2406 ],
(...skipping 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
3346 # settings in target dicts. SYMROOT is a special case, because many other 3401 # settings in target dicts. SYMROOT is a special case, because many other
3347 # Xcode variables depend on it, including variables such as 3402 # Xcode variables depend on it, including variables such as
3348 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 3403 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3349 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 3404 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3350 # files to appear (when present) in the UI as actual files and not red 3405 # files to appear (when present) in the UI as actual files and not red
3351 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 3406 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3352 # and therefore SYMROOT, needs to be set at the project level. 3407 # and therefore SYMROOT, needs to be set at the project level.
3353 'SYMROOT': '<(DEPTH)/xcodebuild', 3408 'SYMROOT': '<(DEPTH)/xcodebuild',
3354 }, 3409 },
3355 } 3410 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698