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

Side by Side Diff: tools/dumpcpp-driver.js

Issue 2006813002: [prof] Add slide offset in dumpcpp script (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add unit test for dumpcpp script Created 4 years, 7 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 unified diff | Download patch
« test/mjsunit/mjsunit.isolate ('K') | « tools/dumpcpp.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Dump C++ symbols of shared library if possible
6
7 function processArguments(args) {
8 var processor = new ArgumentsProcessor(args);
9 if (processor.parse()) {
10 return processor.result();
11 } else {
12 processor.printUsageAndExit();
13 }
14 }
15
16 function initSourceMapSupport() {
17 // Pull dev tools source maps into our name space.
18 SourceMap = WebInspector.SourceMap;
19
20 // Overwrite the load function to load scripts synchronously.
21 SourceMap.load = function(sourceMapURL) {
22 var content = readFile(sourceMapURL);
23 var sourceMapObject = (JSON.parse(content));
24 return new SourceMap(sourceMapURL, sourceMapObject);
25 };
26 }
27
28 var entriesProviders = {
29 'unix': UnixCppEntriesProvider,
30 'windows': WindowsCppEntriesProvider,
31 'mac': MacCppEntriesProvider
32 };
33
34 var params = processArguments(arguments);
35 var sourceMap = null;
36 if (params.sourceMap) {
37 initSourceMapSupport();
38 sourceMap = SourceMap.load(params.sourceMap);
39 }
40
41 var cppProcessor = new CppProcessor(
42 new (entriesProviders[params.platform])(params.nm, params.targetRootFS),
43 params.timedRange, params.pairwiseTimedRange);
44 cppProcessor.processLogFile(params.logFileName);
45 cppProcessor.dumpCppSymbols();
OLDNEW
« test/mjsunit/mjsunit.isolate ('K') | « tools/dumpcpp.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698