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

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: fixed for jar's comments #72 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
« no previous file with comments | « no previous file | base/allocator/type_profiler.h » ('j') | base/allocator/type_profiler.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator.gyp
diff --git a/base/allocator/allocator.gyp b/base/allocator/allocator.gyp
index 002ce2185a67e8ec6c600908075602565138511c..4a1b6af7ddcb3ea0cf29b3801787fffb7b53426d 100644
--- a/base/allocator/allocator.gyp
+++ b/base/allocator/allocator.gyp
@@ -303,6 +303,17 @@
},
},
'conditions': [
+ ['OS=="linux" and clang_type_profiler==1', {
+ 'dependencies': [
+ 'type_profiler_tcmalloc',
+ ],
+ 'dependencies!': [
+ 'type_profiler',
+ ],
+ 'cflags_cc!': [
+ '-fintercept-allocation-functions',
+ ],
+ }],
['OS=="win"', {
'defines': [
'PERFTOOLS_DLL_DECL=',
@@ -466,6 +477,16 @@
'include_dirs': [
'../../'
],
+ 'conditions': [
+ ['OS=="linux" and clang_type_profiler==1', {
+ 'dependencies!': [
+ 'type_profiler',
+ ],
+ 'cflags_cc!': [
+ '-fintercept-allocation-functions',
+ ],
+ }],
+ ],
},
],
'conditions': [
@@ -548,5 +569,99 @@
},
],
}],
+ ['OS=="linux" and clang_type_profiler==1', {
+ 'targets': [
Ryan Sleevi 2012/09/12 19:13:34 I think it would be helpful to have a comment abov
Dai Mikurube (NOT FULLTIME) 2012/09/13 04:00:12 Done.
+ {
+ 'target_name': 'type_profiler',
+ 'type': 'static_library',
+ 'dependencies!': [
+ 'type_profiler',
+ ],
+ 'cflags_cc!': [
+ '-fintercept-allocation-functions',
+ ],
+ 'include_dirs': [
+ '.',
+ '<(tcmalloc_dir)/src/base',
+ '<(tcmalloc_dir)/src',
+ '../..',
Ryan Sleevi 2012/09/12 19:13:34 I don't believe any of the include_dirs are necess
Dai Mikurube (NOT FULLTIME) 2012/09/13 04:00:12 Good catch. Removed unnecessary dirs.
+ ],
+ 'sources': [
+ 'type_profiler.cc',
+ 'type_profiler.h',
+ 'type_profiler_control.h',
+ ],
+ },
+ {
+ 'target_name': 'type_profiler_tcmalloc',
+ 'type': 'static_library',
+ 'dependencies!': [
+ 'type_profiler',
+ ],
+ 'cflags_cc!': [
+ '-fintercept-allocation-functions',
+ ],
+ 'include_dirs': [
+ '.',
+ '<(tcmalloc_dir)/src/base',
+ '<(tcmalloc_dir)/src',
+ '../..',
+ ],
+ 'sources': [
+ 'type_profiler_tcmalloc.cc',
+ 'type_profiler_tcmalloc.h',
+ '<(tcmalloc_dir)/src/type_profiler_map.cc',
+ '<(tcmalloc_dir)/src/gperftools/type_profiler_map.h',
+ ],
+ },
+ {
+ 'target_name': 'type_profiler_unittests',
+ 'type': 'executable',
+ 'dependencies': [
+ '../../testing/gtest.gyp:gtest',
+ '../base.gyp:base',
+ 'allocator',
+ 'type_profiler_tcmalloc',
+ ],
+ 'include_dirs': [
+ '.',
+ '<(tcmalloc_dir)/src/base',
+ '<(tcmalloc_dir)/src',
+ '../..',
+ ],
+ 'sources': [
+ 'type_profiler_control.cc',
+ 'type_profiler_control.h',
+ 'type_profiler_unittests.cc',
+ ],
+ },
+ {
+ 'target_name': 'type_profiler_map_unittests',
+ 'type': 'executable',
+ 'dependencies': [
+ '../../testing/gtest.gyp:gtest',
+ '../base.gyp:base',
+ 'allocator',
+ ],
+ 'dependencies!': [
+ 'type_profiler',
+ ],
+ 'cflags_cc!': [
+ '-fintercept-allocation-functions',
+ ],
+ 'include_dirs': [
+ '.',
+ '<(tcmalloc_dir)/src/base',
+ '<(tcmalloc_dir)/src',
+ '../..',
+ ],
+ 'sources': [
+ 'type_profiler_map_unittests.cc',
+ '<(tcmalloc_dir)/src/type_profiler_map.cc',
+ '<(tcmalloc_dir)/src/gperftools/type_profiler_map.h',
+ ],
+ },
+ ],
+ }],
],
}
« no previous file with comments | « no previous file | base/allocator/type_profiler.h » ('j') | base/allocator/type_profiler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698