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

Unified Diff: SConstruct

Issue 39179: Adding support for reporting addresses of JIT compiled code to OProfile (Closed)
Patch Set: Fixes according to Kasper's comments Created 11 years, 10 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 | src/SConscript » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: SConstruct
diff --git a/SConstruct b/SConstruct
index 43293e6eb753c939c9cc72344d688a2e5e8b7820..d9dbda07694dfed53709ab4028aef8397f7a324c 100644
--- a/SConstruct
+++ b/SConstruct
@@ -68,6 +68,9 @@ LIBRARY_FLAGS = {
'wordsize:64': {
'CCFLAGS': ['-m32'],
'LINKFLAGS': ['-m32']
+ },
+ 'prof:oprofile': {
+ 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT']
}
},
'msvc': {
@@ -249,6 +252,10 @@ SAMPLE_FLAGS = {
},
'mode:debug': {
'CCFLAGS': ['-g', '-O0']
+ },
+ 'prof:oprofile': {
+ 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'],
+ 'LIBS': ['opagent']
}
},
'msvc': {
@@ -362,7 +369,7 @@ SIMPLE_OPTIONS = {
'help': 'build using snapshots for faster start-up'
},
'prof': {
- 'values': ['on', 'off'],
+ 'values': ['on', 'off', 'oprofile'],
'default': 'off',
'help': 'enable profiling of build target'
},
@@ -435,6 +442,8 @@ def VerifyOptions(env):
return False
if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on':
Abort("Profiling on windows only supported for static library.")
+ if env['prof'] == 'oprofile' and env['os'] != 'linux':
+ Abort("OProfile is only supported on Linux.")
for (name, option) in SIMPLE_OPTIONS.iteritems():
if (not option.get('default')) and (name not in ARGUMENTS):
message = ("A value for option %s must be specified (%s)." %
« no previous file with comments | « no previous file | src/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698