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

Function dp

deps/v8/tools/windbg.js:752–786  ·  view source on GitHub ↗
(addr, count = 10)

Source from the content-addressed store, hash-verified

750
751// TODO irinayat: would be nice to identify handles and smi as well
752function dp(addr, count = 10) {
753 if (isolate_address == 0) {
754 print(`To see where objects are located, run !set_iso.`);
755 }
756
757 if (!Number.isSafeInteger(int(addr))) {
758 print(`${hex(addr)} doesn't look like a valid address`);
759 return;
760 }
761
762 const ptr_size = tagged_size();
763 let aligned_addr = addr - (addr % ptr_size);
764 let val = poim(aligned_addr);
765 let iter = 0;
766 while (val && iter < count) {
767 const map = is_map(val);
768 const obj = is_likely_object(val) && !map;
769
770 const augm_map = map ? "map" : "";
771 const augm_obj = obj ? "obj" : "";
772 const augm_other = !map && !obj ? "val" : "";
773
774 let c = find_chunk(decomp(val));
775 const augm_space = c ? ` in ${c.space}` : "";
776 const augm = `${augm_map}${augm_obj}${augm_other}${augm_space}`;
777
778 const full_ptr = using_ptr_compr ?
779 pad_right((map || obj) ? decomp(val) : val) : "";
780 print(`${pad_right(aligned_addr)} ${pad_right(val)} ${full_ptr} ${augm}`);
781
782 aligned_addr += ptr_size;
783 val = poim(aligned_addr);
784 iter++;
785 }
786}
787
788/*-----------------------------------------------------------------------------
789 Remembered Sets

Callers

nothing calls this directly

Calls 10

intFunction · 0.85
tagged_sizeFunction · 0.85
poimFunction · 0.85
is_mapFunction · 0.85
is_likely_objectFunction · 0.85
find_chunkFunction · 0.85
decompFunction · 0.85
pad_rightFunction · 0.85
printFunction · 0.70
hexFunction · 0.70

Tested by

no test coverage detected