MCPcopy Index your code
hub / github.com/nodejs/node / addStack

Method addStack

deps/v8/tools/profview/profile-utils.js:305–322  ·  view source on GitHub ↗
(file, tickIndex)

Source from the content-addressed store, hash-verified

303 }
304
305 addStack(file, tickIndex) {
306 let stack = file.ticks[tickIndex].s;
307 let vmState = file.ticks[tickIndex].vm;
308 if (stack.length === 0) return;
309 let codeId = stack[0];
310 let code = codeId >= 0 ? file.code[codeId] : undefined;
311 let kind = resolveCodeKindAndVmState(code, vmState);
312 let node = this.categories[kind];
313
314 this.tree.ticks++;
315 node.ticks++;
316
317 let step = this.isBottomUp ? 2 : -2;
318 let start = this.isBottomUp ? 0 : stack.length - 2;
319
320 let stackPos = findNextFrame(file, stack, start, step, this.filter);
321 addOrUpdateChildNode(node, file, tickIndex, stackPos, this.isBottomUp);
322 }
323}
324
325class FunctionListTree {

Callers

nothing calls this directly

Calls 3

findNextFrameFunction · 0.85
addOrUpdateChildNodeFunction · 0.85

Tested by

no test coverage detected