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

Unified 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: fix IsAvailable Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index ae9c4611c3638d913fb7b7315c487ee114675a75..83f2c91767889c7d1ccc47f79de58e8680895be0 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -253,6 +253,12 @@
# See http://clang.llvm.org/docs/ThreadSanitizer.html
'tsan%': 0,
+ # Use a modified version of Clang to intercept allocated types and sizes
+ # for allocated objects. clang_type_profiler=1 implies clang=1.
+ # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
+ # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
+ 'clang_type_profiler%': 0,
+
# Set to true to instrument the code with function call logger.
# See src/third_party/cygprofile/cyg-profile.cc for details.
'order_profiling%': 0,
@@ -594,6 +600,7 @@
'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
'asan%': '<(asan)',
'tsan%': '<(tsan)',
+ 'clang_type_profiler%': '<(clang_type_profiler)',
'order_profiling%': '<(order_profiling)',
'order_text_section%': '<(order_text_section)',
'enable_extensions%': '<(enable_extensions)',
@@ -1219,6 +1226,12 @@
'clang%': 1,
}],
+ ['OS=="linux" and clang_type_profiler==1', {
+ 'clang%': 1,
+ 'clang_use_chrome_plugins%': 0,
+ 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
+ }],
+
# On valgrind bots, override the optimizer settings so we don't inline too
# much and make the stacks harder to figure out.
#
@@ -1367,6 +1380,19 @@
],
},
'conditions': [
+ ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
+ 'cflags_cc!': ['-fno-rtti'],
+ 'cflags_cc+': [
+ '-frtti',
+ '-gline-tables-only',
+ '-fintercept-allocation-functions',
+ '-include ../../base/allocator/type_profiler.h',
+ ],
+ 'defines': ['TYPE_PROFILING'],
+ 'dependencies': [
+ '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
+ ],
+ }],
['OS=="win" and "<(msbuild_toolset)"!=""', {
'msbuild_toolset': '<(msbuild_toolset)',
}],

Powered by Google App Engine
This is Rietveld 408576698