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

Method processHeapSampleEnd

deps/v8/tools/tickprocessor.mjs:882–897  ·  view source on GitHub ↗
(space, state)

Source from the content-addressed store, hash-verified

880 }
881
882 processHeapSampleEnd(space, state) {
883 if (space != 'Heap' || !this.currentProducerProfile_) return;
884
885 print(`Generation ${this.generation_}:`);
886 const tree = this.currentProducerProfile_;
887 tree.computeTotalWeights();
888 const producersView = this.viewBuilder_.buildView(tree);
889 // Sort by total time, desc, then by name, desc.
890 producersView.sort((rec1, rec2) =>
891 rec2.totalTime - rec1.totalTime ||
892 (rec2.internalFuncName < rec1.internalFuncName ? -1 : 1));
893 this.printHeavyProfile(producersView.head.children);
894
895 this.currentProducerProfile_ = null;
896 this.generation_++;
897 }
898
899 printVMSymbols() {
900 console.log(

Callers

nothing calls this directly

Calls 4

printHeavyProfileMethod · 0.95
computeTotalWeightsMethod · 0.80
sortMethod · 0.80
printFunction · 0.70

Tested by

no test coverage detected