Index: build/common.gypi |
diff --git a/build/common.gypi b/build/common.gypi |
index 6044b5276044f314d6536c7861b052edb6dbdfe1..a7ec53e1e4b8d8919ea3369f6a8e6c5c86f3ad14 100644 |
--- a/build/common.gypi |
+++ b/build/common.gypi |
@@ -279,6 +279,10 @@ |
'clang_load%': '', |
'clang_add_plugin%': '', |
+ # Enable sampling based profiler. |
+ # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html |
+ 'profiling%': '0', |
+ |
# Override whether we should use Breakpad on Linux. I.e. for Chrome bot. |
'linux_breakpad%': 0, |
# And if we want to dump symbols for Breakpad-enabled builds. |
@@ -536,6 +540,9 @@ |
['touchui==1', { |
'defines': ['TOUCH_UI=1'], |
}], |
+ ['profiling==1', { |
+ 'defines': ['ENABLE_PROFILING=1'], |
+ }], |
['remoting==1', { |
'defines': ['ENABLE_REMOTING=1'], |
}], |
@@ -1014,6 +1021,12 @@ |
'-fno-ident', |
], |
}], |
+ ['profiling==1', { |
+ 'cflags': [ |
+ '-fno-omit-frame-pointer', |
+ '-g', |
+ ], |
+ }], |
] |
}, |
}, |