Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
67 lines (59 loc) · 2.06 KB

File metadata and controls

67 lines (59 loc) · 2.06 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import { LogReader, parseString } from "./logreader.mjs";
import { CodeMap, CodeEntry } from "./codemap.mjs";
export {
ArgumentsProcessor, LinuxCppEntriesProvider,
WindowsCppEntriesProvider, MacOSCppEntriesProvider,
} from "./tickprocessor.mjs";
export class CppProcessor extends LogReader {
constructor(cppEntriesProvider, timedRange, pairwiseTimedRange) {
super({}, timedRange, pairwiseTimedRange);
this.dispatchTable_ = {
'shared-library': {
parsers: [parseString, parseInt, parseInt, parseInt],
processor: this.processSharedLibrary }
};
this.cppEntriesProvider_ = cppEntriesProvider;
this.codeMap_ = new CodeMap();
this.lastLogFileName_ = null;
}
/**
* @override
*/
printError(str) {
console.log(str);
}
processLogFile(fileName) {
this.lastLogFileName_ = fileName;
let line;
while (line = readline()) {
this.processLogLine(line);
}
}
processLogFileInTest(fileName) {
// Hack file name to avoid dealing with platform specifics.
this.lastLogFileName_ = 'v8.log';
const contents = d8.file.read(fileName);
this.processLogChunk(contents);
}
processSharedLibrary(name, startAddr, endAddr, aslrSlide) {
const self = this;
const libFuncs = this.cppEntriesProvider_.parseVmSymbols(
name, startAddr, endAddr, aslrSlide, function(fName, fStart, fEnd) {
const entry = new CodeEntry(fEnd - fStart, fName, 'CPP');
self.codeMap_.addStaticCode(fStart, entry);
});
}
dumpCppSymbols() {
const staticEntries = this.codeMap_.getAllStaticEntriesWithAddresses();
const total = staticEntries.length;
for (let i = 0; i < total; ++i) {
const entry = staticEntries[i];
const printValues = ['cpp', `0x${entry[0].toString(16)}`, entry[1].size,
`"${entry[1].name}"`];
console.log(printValues.join(','));
}
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.