Skip to content

Commit

Permalink
[tools] Format tickprocessor.mjs and friends
Browse files Browse the repository at this point in the history
Bug: v8:10667
Change-Id: Ie11b21f6610ad5e5be81e12191207ac85680a1ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2622213
Commit-Queue: Camillo Bruni <[email protected]>
Reviewed-by: Sathya Gunasekaran  <[email protected]>
Cr-Commit-Position: refs/heads/master@{#72043}
  • Loading branch information
camillobruni authored and Commit Bot committed Jan 12, 2021
1 parent a23adbb commit 35da8e0
Show file tree
Hide file tree
Showing 2 changed files with 637 additions and 687 deletions.
36 changes: 18 additions & 18 deletions tools/profile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class SourcePosition {
}

toString() {
return `${this.script.name}:${this.line}:${this.column}`;
return `${this.script.name}:${this.line}:${this.column}`;
}

toStringLong() {
Expand Down Expand Up @@ -79,7 +79,7 @@ export class Script {
addSourcePosition(line, column, entry) {
let sourcePosition = this.lineToColumn.get(line)?.get(column);
if (sourcePosition === undefined) {
sourcePosition = new SourcePosition(this, line, column, )
sourcePosition = new SourcePosition(this, line, column,)
this._addSourcePosition(line, column, sourcePosition);
}
sourcePosition.addEntry(entry);
Expand Down Expand Up @@ -110,13 +110,13 @@ export class Script {


class SourceInfo {
script;
start;
end;
positions;
inlined ;
fns;
disassemble;
script;
start;
end;
positions;
inlined;
fns;
disassemble;

setSourcePositionInfo(script, startPos, endPos, sourcePositionTable, inliningPositions, inlinedFunctions) {
this.script = script;
Expand Down Expand Up @@ -232,7 +232,7 @@ export class Profile {
* during stack strace processing, specifies a position of the frame
* containing the address.
*/
handleUnknownCode(operation, addr, opt_stackPos) {}
handleUnknownCode(operation, addr, opt_stackPos) { }

/**
* Registers a library.
Expand All @@ -255,7 +255,7 @@ export class Profile {
* @param {number} endAddr Ending address.
*/
addStaticCode(name, startAddr, endAddr) {
const entry = new CodeEntry(endAddr - startAddr, name, 'CPP');
const entry = new CodeEntry(endAddr - startAddr, name, 'CPP');
this.codeMap_.addStaticCode(startAddr, entry);
return entry;
}
Expand Down Expand Up @@ -370,8 +370,8 @@ export class Profile {
}

this.getOrCreateSourceInfo(entry).setSourcePositionInfo(
script, startPos, endPos, sourcePositionTable, inliningPositions,
inlinedFunctions);
script, startPos, endPos, sourcePositionTable, inliningPositions,
inlinedFunctions);
}

addDisassemble(start, kind, disassemble) {
Expand Down Expand Up @@ -646,7 +646,7 @@ class DynamicCodeEntry extends CodeEntry {
constructor(size, type, name) {
super(size, name, type);
}

getName() {
return this.type + ': ' + this.name;
}
Expand Down Expand Up @@ -726,7 +726,7 @@ class DynamicFuncCodeEntry extends CodeEntry {
* @constructor
*/
class FunctionEntry extends CodeEntry {

// Contains the list of generated code for this function.
_codeEntries = new Set();

Expand Down Expand Up @@ -754,7 +754,7 @@ class FunctionEntry extends CodeEntry {
getName() {
let name = this.name;
if (name.length == 0) {
return '<anonymous>';
return '<anonymous>';
} else if (name.charAt(0) == ' ') {
// An anonymous function with location: " aaa.js:10".
return `<anonymous>${name}`;
Expand Down Expand Up @@ -888,7 +888,7 @@ class CallTree {
* @param {function(CallTreeNode)} exit A function called
* after visiting node's children.
*/
traverseInDepth(enter, exit) {
traverseInDepth(enter, exit) {
function traverse(node) {
enter(node);
node.forEachChild(traverse);
Expand All @@ -905,7 +905,7 @@ class CallTree {
* @param {string} label Node label.
* @param {CallTreeNode} opt_parent Node parent.
*/
class CallTreeNode {
class CallTreeNode {
/**
* Node self weight (how many times this node was the last node in
* a call path).
Expand Down
Loading

0 comments on commit 35da8e0

Please sign in to comment.