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

Method cleanUpFuncEntries

deps/v8/tools/profile.mjs:858–877  ·  view source on GitHub ↗

* Cleans up function entries that are not referenced by code entries.

()

Source from the content-addressed store, hash-verified

856 * Cleans up function entries that are not referenced by code entries.
857 */
858 cleanUpFuncEntries() {
859 const referencedFuncEntries = [];
860 const entries = this.codeMap_.getAllDynamicEntriesWithAddresses();
861 for (let i = 0, l = entries.length; i < l; ++i) {
862 if (entries[i][1].constructor === SharedFunctionInfoEntry) {
863 entries[i][1].used = false;
864 }
865 }
866 for (let i = 0, l = entries.length; i < l; ++i) {
867 if ("sfi" in entries[i][1]) {
868 entries[i][1].sfi.used = true;
869 }
870 }
871 for (let i = 0, l = entries.length; i < l; ++i) {
872 if (entries[i][1].constructor === SharedFunctionInfoEntry &&
873 !entries[i][1].used) {
874 this.codeMap_.deleteCode(entries[i][0]);
875 }
876 }
877 }
878}
879
880class CEntryNode {

Callers

nothing calls this directly

Calls 2

deleteCodeMethod · 0.45

Tested by

no test coverage detected