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

Function buildCategoryTreeAndLookup

deps/v8/tools/profview/profile-utils.js:265–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

263}
264
265function buildCategoryTreeAndLookup() {
266 let root = createEmptyNode("root");
267 let categories = {};
268 function addCategory(name, types) {
269 let n = createEmptyNode(name);
270 for (let i = 0; i < types.length; i++) {
271 categories[types[i]] = n;
272 }
273 root.children.push(n);
274 }
275 addCategory("JS Ignition", [ "JS_IGNITION", "BC" ]);
276 addCategory("JS Sparkplug", [ "JS_SPARKPLUG" ]);
277 addCategory("JS Maglev", [ "JS_MAGLEV" ]);
278 addCategory("JS Turbofan", [ "JS_TURBOFAN" ]);
279 addCategory("IC", [ "IC" ]);
280 addCategory("RegExp", [ "REGEXP" ]);
281 addCategory("Other generated", [ "STUB", "BUILTIN" ]);
282 addCategory("C++", [ "CPP", "LIB" ]);
283 addCategory("C++/GC", [ "CPP_GC" ]);
284 addCategory("C++/Parser", [ "CPP_PARSE" ]);
285 addCategory("C++/Bytecode Compiler", [ "CPP_COMP_BC" ]);
286 addCategory("C++/Baseline Compiler", [ "CPP_COMP_BASELINE" ]);
287 addCategory("C++/Compiler", [ "CPP_COMP" ]);
288 addCategory("C++/External", [ "CPP_EXT" ]);
289 addCategory("C++/Logging", [ "CPP_LOGGING" ]);
290 addCategory("Unknown", [ "UNKNOWN" ]);
291
292 return { categories, root };
293}
294
295class CategorizedCallTreeProcessor {
296 constructor(filter, isBottomUp) {

Callers 2

constructorMethod · 0.85
constructorMethod · 0.85

Calls 2

createEmptyNodeFunction · 0.85
addCategoryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…