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

Unified Diff: base/allocator/allocator.gyp

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 side-by-side diff with in-line comments
Download patch
Index: base/allocator/allocator.gyp
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp
index b85dd516dca2e20ba71e584b15e3b12272bc15c5..41940d7c12f744d7ada13a46aec4f571ffdedf7d 100644
--- a/base/allocator/allocator.gyp
+++ b/base/allocator/allocator.gyp
@@ -8,6 +8,19 @@
'tcmalloc_dir': '../../third_party/tcmalloc/chromium',
'use_vtable_verify%': 0,
},
+ 'target_defaults': {
+ 'conditions': [
+ ['OS=="linux" and clang_profiling_allocated_type==1', {
+ 'dependencies!': [
+ 'allocated_type_profiler',
+ ],
+ 'cflags_cc!': [
+ '-fintercept-allocation-functions',
+ '-include ../../base/allocator/allocated_type_profiler.h',
+ ],
+ }],
+ ],
+ },
'targets': [
{
'target_name': 'allocator',
@@ -303,6 +316,11 @@
},
},
'conditions': [
+ ['OS=="linux" and clang_profiling_allocated_type==1', {
+ 'dependencies': [
+ 'allocated_type_profiler_tcmalloc',
+ ],
+ }],
['OS=="win"', {
'defines': [
'PERFTOOLS_DLL_DECL=',
@@ -541,5 +559,40 @@
},
],
}],
+ ['OS=="linux" and clang_profiling_allocated_type==1', {
+ 'targets': [
+ {
+ 'target_name': 'allocated_type_profiler',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '.',
+ '<(tcmalloc_dir)/src/base',
+ '<(tcmalloc_dir)/src',
+ '../..',
+ ],
+ 'sources': [
+ 'allocated_type_profiler.cc',
+ 'allocated_type_profiler.h',
+ 'allocated_type_profiler_control.h',
+ ],
+ },
+ {
+ 'target_name': 'allocated_type_profiler_tcmalloc',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '.',
+ '<(tcmalloc_dir)/src/base',
+ '<(tcmalloc_dir)/src',
+ '../..',
+ ],
+ 'sources': [
+ 'allocated_type_profiler_tcmalloc.cc',
+ 'allocated_type_profiler_tcmalloc.h',
+ '<(tcmalloc_dir)/src/allocated_type_map.cc',
+ '<(tcmalloc_dir)/src/gperftools/allocated_type_map.h',
+ ],
+ },
+ ],
+ }],
],
}

Powered by Google App Engine
This is Rietveld 408576698