Reviewers: ,
Description:
Add an option to the tickprocessor to specify the directory for lib lookup
This is usefull when generating a profile on one architecture and analyzing
it
on another architecture or system version.
Please review this at https://chromiumcodereview.appspot.com/10704128/
SVN Base: git://github.com/v8/v8.git
Affected files:
M tools/tickprocessor-driver.js
M tools/tickprocessor.js
Index: tools/tickprocessor-driver.js
diff --git a/tools/tickprocessor-driver.js b/tools/tickprocessor-driver.js
index
9af5ab6c797dffb64685934396b21febad6d1302..ead3c1ee5a9326853e07e7f0c36e36dce0081ba0
100644
--- a/tools/tickprocessor-driver.js
+++ b/tools/tickprocessor-driver.js
@@ -50,7 +50,7 @@ if (params.snapshotLogFileName) {
snapshotLogProcessor.processLogFile(params.snapshotLogFileName);
}
var tickProcessor = new TickProcessor(
- new (entriesProviders[params.platform])(params.nm),
+ new (entriesProviders[params.platform])(params.nm, params.targetRootFS),
params.separateIc,
params.callGraphSize,
params.ignoreUnknown,
Index: tools/tickprocessor.js
diff --git a/tools/tickprocessor.js b/tools/tickprocessor.js
index
05a3369255e4c14c0827a505023be13a618408da..2e7b5560dab08d9a29739e2d3d7bd78cdf59cd4b
100644
--- a/tools/tickprocessor.js
+++ b/tools/tickprocessor.js
@@ -608,10 +608,11 @@ CppEntriesProvider.prototype.parseNextLine =
function() {
};
-function UnixCppEntriesProvider(nmExec) {
+function UnixCppEntriesProvider(nmExec, targetRootFS) {
this.symbols = [];
this.parsePos = 0;
this.nmExec = nmExec;
+ this.targetRootFS = targetRootFS;
this.FUNC_RE = /^([0-9a-fA-F]{8,16}) ([0-9a-fA-F]{8,16} )?[tTwW] (.*)$/;
};
inherits(UnixCppEntriesProvider, CppEntriesProvider);
@@ -619,6 +620,7 @@ inherits(UnixCppEntriesProvider, CppEntriesProvider);
UnixCppEntriesProvider.prototype.loadSymbols = function(libName) {
this.parsePos = 0;
+ libName = this.targetRootFS + libName;
try {
this.symbols = [
os.system(this.nmExec, ['-C', '-n', '-S', libName], -1, -1),
@@ -785,6 +787,8 @@ function ArgumentsProcessor(args) {
'Specify that we are running on Mac OS X platform'],
'--nm': ['nm', 'nm',
'Specify the \'nm\' executable to use (e.g. --nm=/my_dir/nm)'],
+ '--target': ['targetRootFS', '',
+ 'Specify the target root directory for cross environment'],
'--snapshot-log': ['snapshotLogFileName', 'snapshot.log',
'Specify snapshot log file to use (e.g.
--snapshot-log=snapshot.log)']
};
@@ -804,6 +808,7 @@ ArgumentsProcessor.DEFAULTS = {
callGraphSize: 5,
ignoreUnknown: false,
separateIc: false,
+ targetRootFS: '',
nm: 'nm'
};
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev