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

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 Jim's comments. 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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 # third_party/asan may be different from the default one. 1210 # third_party/asan may be different from the default one.
1204 # TODO(glider): this isn't true anymore, need to check if we can use the 1211 # TODO(glider): this isn't true anymore, need to check if we can use the
1205 # plugins now. 1212 # plugins now.
1206 'clang_use_chrome_plugins%': 0, 1213 'clang_use_chrome_plugins%': 0,
1207 }], 1214 }],
1208 1215
1209 ['tsan==1', { 1216 ['tsan==1', {
1210 'clang%': 1, 1217 'clang%': 1,
1211 }], 1218 }],
1212 1219
1220 ['OS=="linux" and clang_profiling_allocated_type==1', {
1221 'clang%': 1,
1222 'clang_use_chrome_plugins%': 0,
1223 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1224 }],
1225
1213 # On valgrind bots, override the optimizer settings so we don't inline too 1226 # On valgrind bots, override the optimizer settings so we don't inline too
1214 # much and make the stacks harder to figure out. 1227 # much and make the stacks harder to figure out.
1215 # 1228 #
1216 # TODO(rnk): Kill off variables that no one else uses and just implement 1229 # TODO(rnk): Kill off variables that no one else uses and just implement
1217 # them under a build_for_tool== condition. 1230 # them under a build_for_tool== condition.
1218 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { 1231 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1219 # gcc flags 1232 # gcc flags
1220 'mac_debug_optimization': '1', 1233 'mac_debug_optimization': '1',
1221 'mac_release_optimization': '1', 1234 'mac_release_optimization': '1',
1222 'release_optimize': '1', 1235 'release_optimize': '1',
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 'mac_release_optimization%': 's', # Use -Os unless overridden 1364 'mac_release_optimization%': 's', # Use -Os unless overridden
1352 'mac_debug_optimization%': '0', # Use -O0 unless overridden 1365 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1353 }, { 1366 }, {
1354 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.htm l 1367 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.htm l
1355 'mac_release_optimization%': '3', # Use -O3 unless overridden 1368 'mac_release_optimization%': '3', # Use -O3 unless overridden
1356 'mac_debug_optimization%': '0', # Use -O0 unless overridden 1369 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1357 }], 1370 }],
1358 ], 1371 ],
1359 }, 1372 },
1360 'conditions': [ 1373 'conditions': [
1374 ['OS=="linux" and linux_use_tcmalloc==1 and clang_profiling_allocated_type ==1', {
1375 'cflags_cc!': ['-fno-rtti'],
1376 'cflags_cc+': [
1377 '-frtti',
1378 '-gline-tables-only',
1379 '-fintercept-allocation-functions',
1380 '-include ../../base/allocator/allocated_type_profiler.h',
1381 ],
1382 'defines': ['PROFILING_ALLOCATED_TYPE'],
1383 'dependencies': [
1384 '<(DEPTH)/base/allocator/allocator.gyp:allocated_type_profiler',
1385 ],
1386 }],
1361 ['OS=="win" and "<(msbuild_toolset)"!=""', { 1387 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1362 'msbuild_toolset': '<(msbuild_toolset)', 1388 'msbuild_toolset': '<(msbuild_toolset)',
1363 }], 1389 }],
1364 ['branding=="Chrome"', { 1390 ['branding=="Chrome"', {
1365 'defines': ['GOOGLE_CHROME_BUILD'], 1391 'defines': ['GOOGLE_CHROME_BUILD'],
1366 }, { # else: branding!="Chrome" 1392 }, { # else: branding!="Chrome"
1367 'defines': ['CHROMIUM_BUILD'], 1393 'defines': ['CHROMIUM_BUILD'],
1368 }], 1394 }],
1369 ['OS=="mac" and component=="shared_library"', { 1395 ['OS=="mac" and component=="shared_library"', {
1370 'xcode_settings': { 1396 'xcode_settings': {
(...skipping 2032 matching lines...) Expand 10 before | Expand all | Expand 10 after
3403 # settings in target dicts. SYMROOT is a special case, because many other 3429 # settings in target dicts. SYMROOT is a special case, because many other
3404 # Xcode variables depend on it, including variables such as 3430 # Xcode variables depend on it, including variables such as
3405 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 3431 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3406 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 3432 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3407 # files to appear (when present) in the UI as actual files and not red 3433 # files to appear (when present) in the UI as actual files and not red
3408 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 3434 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3409 # and therefore SYMROOT, needs to be set at the project level. 3435 # and therefore SYMROOT, needs to be set at the project level.
3410 'SYMROOT': '<(DEPTH)/xcodebuild', 3436 'SYMROOT': '<(DEPTH)/xcodebuild',
3411 }, 3437 },
3412 } 3438 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698