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

Function expandTreeNode

deps/v8/tools/profview/profile-utils.js:188–207  ·  view source on GitHub ↗
(file, node, filter)

Source from the content-addressed store, hash-verified

186
187// This expands a tree node (direct children only).
188function expandTreeNode(file, node, filter) {
189 let { frameList, ascending } = node.delayedExpansion;
190
191 let step = ascending ? 2 : -2;
192
193 for (let i = 0; i < frameList.length; i+= 3) {
194 let firstStackIndex = frameList[i];
195 let depth = frameList[i + 1];
196 let count = frameList[i + 2];
197 for (let j = 0; j < count; j++) {
198 let stackIndex = firstStackIndex + j;
199 let stack = file.ticks[stackIndex].s;
200
201 // Get to the next frame that has not been filtered out.
202 let stackPos = findNextFrame(file, stack, depth + step, step, filter);
203 addOrUpdateChildNode(node, file, stackIndex, stackPos, ascending);
204 }
205 }
206 node.delayedExpansion = null;
207}
208
209function createEmptyNode(name) {
210 return {

Callers 1

expandTreeMethod · 0.85

Calls 2

findNextFrameFunction · 0.85
addOrUpdateChildNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…