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

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 maruel's comment. Ready for review. 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. clang_profiling_allocated_type=1 implies clang=1.
258 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-t ype-identifier
259 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
260 'clang_profiling_allocated_type%': 0,
261
256 # Set to true to instrument the code with function call logger. 262 # Set to true to instrument the code with function call logger.
257 # See src/third_party/cygprofile/cyg-profile.cc for details. 263 # See src/third_party/cygprofile/cyg-profile.cc for details.
258 'order_profiling%': 0, 264 'order_profiling%': 0,
259 265
260 # Use the provided profiled order file to link Chrome image with it. 266 # 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. 267 # This makes Chrome faster by better using CPU cache when executing code.
262 # This is known as PGO (profile guided optimization). 268 # 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 269 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-e ffort
264 'order_text_section%' : "", 270 'order_text_section%' : "",
265 271
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 'enable_one_click_signin%': '<(enable_one_click_signin)', 584 'enable_one_click_signin%': '<(enable_one_click_signin)',
579 'enable_webrtc%': '<(enable_webrtc)', 585 'enable_webrtc%': '<(enable_webrtc)',
580 'chromium_win_pch%': '<(chromium_win_pch)', 586 'chromium_win_pch%': '<(chromium_win_pch)',
581 'configuration_policy%': '<(configuration_policy)', 587 'configuration_policy%': '<(configuration_policy)',
582 'safe_browsing%': '<(safe_browsing)', 588 'safe_browsing%': '<(safe_browsing)',
583 'input_speech%': '<(input_speech)', 589 'input_speech%': '<(input_speech)',
584 'notifications%': '<(notifications)', 590 'notifications%': '<(notifications)',
585 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', 591 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
586 'asan%': '<(asan)', 592 'asan%': '<(asan)',
587 'tsan%': '<(tsan)', 593 'tsan%': '<(tsan)',
594 'clang_profiling_allocated_type%': '<(clang_profiling_allocated_type)',
588 'order_profiling%': '<(order_profiling)', 595 'order_profiling%': '<(order_profiling)',
589 'order_text_section%': '<(order_text_section)', 596 'order_text_section%': '<(order_text_section)',
590 'enable_extensions%': '<(enable_extensions)', 597 'enable_extensions%': '<(enable_extensions)',
591 'enable_web_intents%': '<(enable_web_intents)', 598 'enable_web_intents%': '<(enable_web_intents)',
592 'enable_web_intents_tag%': '<(enable_web_intents_tag)', 599 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
593 'ios_sdk%': '<(ios_sdk)', 600 'ios_sdk%': '<(ios_sdk)',
594 'ios_deployment_target%': '<(ios_deployment_target)', 601 'ios_deployment_target%': '<(ios_deployment_target)',
595 'enable_plugin_installation%': '<(enable_plugin_installation)', 602 'enable_plugin_installation%': '<(enable_plugin_installation)',
596 'enable_protector_service%': '<(enable_protector_service)', 603 'enable_protector_service%': '<(enable_protector_service)',
597 'enable_session_service%': '<(enable_session_service)', 604 'enable_session_service%': '<(enable_session_service)',
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 # third_party/asan may be different from the default one. 1202 # third_party/asan may be different from the default one.
1196 # TODO(glider): this isn't true anymore, need to check if we can use the 1203 # TODO(glider): this isn't true anymore, need to check if we can use the
1197 # plugins now. 1204 # plugins now.
1198 'clang_use_chrome_plugins%': 0, 1205 'clang_use_chrome_plugins%': 0,
1199 }], 1206 }],
1200 1207
1201 ['tsan==1', { 1208 ['tsan==1', {
1202 'clang%': 1, 1209 'clang%': 1,
1203 }], 1210 }],
1204 1211
1212 ['OS=="linux" and clang_profiling_allocated_type==1', {
1213 'clang%': 1,
1214 'clang_use_chrome_plugins%': 0,
1215 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1216 }],
1217
1205 # On valgrind bots, override the optimizer settings so we don't inline too 1218 # On valgrind bots, override the optimizer settings so we don't inline too
1206 # much and make the stacks harder to figure out. 1219 # much and make the stacks harder to figure out.
1207 # 1220 #
1208 # TODO(rnk): Kill off variables that no one else uses and just implement 1221 # TODO(rnk): Kill off variables that no one else uses and just implement
1209 # them under a build_for_tool== condition. 1222 # them under a build_for_tool== condition.
1210 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { 1223 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1211 # gcc flags 1224 # gcc flags
1212 'mac_debug_optimization': '1', 1225 'mac_debug_optimization': '1',
1213 'mac_release_optimization': '1', 1226 'mac_release_optimization': '1',
1214 'release_optimize': '1', 1227 'release_optimize': '1',
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 'mac_release_optimization%': 's', # Use -Os unless overridden 1356 'mac_release_optimization%': 's', # Use -Os unless overridden
1344 'mac_debug_optimization%': '0', # Use -O0 unless overridden 1357 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1345 }, { 1358 }, {
1346 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.htm l 1359 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.htm l
1347 'mac_release_optimization%': '3', # Use -O3 unless overridden 1360 'mac_release_optimization%': '3', # Use -O3 unless overridden
1348 'mac_debug_optimization%': '0', # Use -O0 unless overridden 1361 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1349 }], 1362 }],
1350 ], 1363 ],
1351 }, 1364 },
1352 'conditions': [ 1365 'conditions': [
1366 ['OS=="linux" and linux_use_tcmalloc==1 and clang_profiling_allocated_type ==1', {
1367 'cflags_cc!': ['-fno-rtti'],
1368 'cflags_cc+': [
1369 '-frtti',
1370 '-gline-tables-only',
1371 '-fintercept-allocation-functions',
1372 '-include ../../base/allocator/allocated_type_profiler.h',
1373 ],
1374 'defines': ['PROFILING_ALLOCATED_TYPE'],
1375 'dependencies': [
1376 '<(DEPTH)/base/allocator/allocator.gyp:allocated_type_profiler',
1377 ],
1378 }],
1353 ['OS=="win" and "<(msbuild_toolset)"!=""', { 1379 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1354 'msbuild_toolset': '<(msbuild_toolset)', 1380 'msbuild_toolset': '<(msbuild_toolset)',
1355 }], 1381 }],
1356 ['branding=="Chrome"', { 1382 ['branding=="Chrome"', {
1357 'defines': ['GOOGLE_CHROME_BUILD'], 1383 'defines': ['GOOGLE_CHROME_BUILD'],
1358 }, { # else: branding!="Chrome" 1384 }, { # else: branding!="Chrome"
1359 'defines': ['CHROMIUM_BUILD'], 1385 'defines': ['CHROMIUM_BUILD'],
1360 }], 1386 }],
1361 ['OS=="mac" and component=="shared_library"', { 1387 ['OS=="mac" and component=="shared_library"', {
1362 'xcode_settings': { 1388 'xcode_settings': {
(...skipping 2027 matching lines...) Expand 10 before | Expand all | Expand 10 after
3390 # settings in target dicts. SYMROOT is a special case, because many other 3416 # settings in target dicts. SYMROOT is a special case, because many other
3391 # Xcode variables depend on it, including variables such as 3417 # Xcode variables depend on it, including variables such as
3392 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 3418 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3393 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 3419 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3394 # files to appear (when present) in the UI as actual files and not red 3420 # files to appear (when present) in the UI as actual files and not red
3395 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 3421 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3396 # and therefore SYMROOT, needs to be set at the project level. 3422 # and therefore SYMROOT, needs to be set at the project level.
3397 'SYMROOT': '<(DEPTH)/xcodebuild', 3423 'SYMROOT': '<(DEPTH)/xcodebuild',
3398 }, 3424 },
3399 } 3425 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698