Lines Matching defs:print
15 print("--------------------------------------------------------------------");
16 print(" LIVE debugging only");
17 print("--------------------------------------------------------------------");
18 print(" !jlh(\"local_handle_var_name\")");
19 print(" prints object held by the handle");
20 print(" e.g. !jlh(\"key\") or !jlh(\"this->receiver_\")");
21 print(" !job(address_or_taggedint)");
22 print(" prints object at the address, e.g. !job(0x235cb869f9)");
23 print(" !jst() or !jst");
24 print(" prints javascript stack (output goes into the console)");
25 print(" !jsbp() or !jsbp");
26 print(" sets bp in v8::internal::Execution::Call");
27 print("");
30 print("--------------------------------------------------------------------");
31 print(" Setup of the script");
32 print("--------------------------------------------------------------------");
33 print(" !set_module(\"module_name_no_extension\")");
34 print(" we'll try the usual suspects for where v8's code might have");
35 print(" been linked into, but you can also set it manually,");
36 print(" e.g. !set_module(\"v8_for_testing\")");
37 print(" !set_iso(isolate_address)");
38 print(" call this function before using !mem or other heap routines");
39 print("");
41 print("--------------------------------------------------------------------");
42 print(" Managed heap");
43 print("--------------------------------------------------------------------");
44 print(" !mem or !mem(\"space1[ space2 ...]\")");
45 print(" prints memory chunks from the 'space' owned by the heap in the");
46 print(" isolate set by !set_iso; valid values for 'space' are:");
47 print(" new, old, map, code, lo [large], nlo [newlarge], ro [readonly]");
48 print(" if no 'space' specified prints memory chunks for all spaces,");
49 print(" e.g. !mem(\"code\"), !mem(\"ro new old\")");
50 print(" !where(address)");
51 print(" prints name of the space and address of the MemoryChunk the");
52 print(" 'address' is from, e.g. !where(0x235cb869f9)");
53 print(" !rs(chunk_address, set_id = 0)");
54 print(" prints slots from the remembered set in the MemoryChunk. If");
55 print(" 'chunk_address' isn't specified, prints for all chunks in the");
56 print(" old space; 'set_id' should match RememberedSetType enum,");
57 print(" e.g. !rs, !rs 0x2fb14780000, !rs(0x2fb14780000, 1)");
58 print("");
60 print("--------------------------------------------------------------------");
61 print(" Managed objects");
62 print("--------------------------------------------------------------------");
63 print(" !jot(tagged_addr, depth)");
64 print(" dumps the tree of objects using 'tagged_addr' as a root,");
65 print(" assumes that pointer fields are aligned at ptr_size boundary,");
66 print(" unspecified depth means 'unlimited',");
67 print(" e.g. !jot(0x235cb869f9, 2), !jot 0x235cb869f9");
68 print(" !jo_in_range(start_addr, end_addr)");
69 print(" prints address/map pointers of objects found inside the range");
70 print(" specified by 'start_addr' and 'end_addr', assumes the object");
71 print(" pointers to be aligned at ptr_size boundary,");
72 print(" e.g. !jo_in_range(0x235cb869f8 - 0x100, 0x235cb869f8 + 0x1a0");
73 print(" !jo_prev(address, max_slots = 100)");
74 print(" prints address and map pointer of the nearest object within");
75 print(" 'max_slots' before the given 'address', assumes the object");
76 print(" pointers to be aligned at ptr_size boundary,");
77 print(" e.g. !jo_prev 0x235cb869f8, !jo_prev(0x235cb869f9, 16)");
78 print(" !jo_next(address, max_slots = 100)");
79 print(" prints address and map pointer of the nearest object within");
80 print(" 'max_slots' following the given 'address', assumes the object");
81 print(" pointers to be aligned at ptr_size boundary,");
82 print(" e.g. !jo_next 0x235cb869f8, !jo_next(0x235cb869f9, 20)");
83 print("");
85 print("--------------------------------------------------------------------");
86 print(" Miscellaneous");
87 print("--------------------------------------------------------------------");
88 print(" !dp(address, count = 10)");
89 print(" similar to the built-in 'dp' command but augments output with");
90 print(" more data for values that are managed pointers, note that it");
91 print(" aligns the given 'address' at ptr_sized boundary,");
92 print(" e.g. !dp 0x235cb869f9, !dp(0x235cb869f9, 500), !dp @rsp");
93 print(" !handles(print_handles = false)");
94 print(" prints stats for handles, if 'print_handles' is true will");
95 print(" output all handles as well,");
96 print(" e.g. !handles, !handles(), !handles(true)");
97 print("");
99 print("--------------------------------------------------------------------");
100 print(" To run any function from this script (live or postmortem):");
101 print("");
102 print(" dx @$scriptContents.function_name(args)");
103 print(" e.g. dx @$scriptContents.pointer_size()");
104 print(" e.g. dx @$scriptContents.is_map(0x235cb869f9)");
105 print("--------------------------------------------------------------------");
115 function print(s) {
121 // Attempting to print either of:
126 print(`${k} => ${typeof s[k]}`);
267 print(`ERROR. Couldn't determine module name for v8's symbols.`);
268 print(`Please run !set_module (e.g. "!set_module \"v8_for_testing\"")`);
284 print("The target is using pointer compression.");
294 print("ERROR: This command is supported in live sessions only!");
314 print(line);
441 print(
445 print(
453 print(
457 print(
473 print(`===============================================`);
474 print(`objects in range ${hex(start)} - ${hex(end)}`);
475 print(`===============================================`);
481 print(`${hex(obj + 1)} : ${hex(poim(obj))}`);
486 print(`===============================================`);
487 print(`found ${count} objects in range ${hex(start)} - ${hex(end)}`)
488 print(`===============================================`);
494 print(`${hex(root)} doesn't look like an object`);
502 // print the current object and its map pointer
506 print(`${this_obj}${cutoff ? " (...)" : ""}`);
522 print(
532 print(`===============================================`);
534 print(`===============================================`);
545 print(`${space_type}${alloc_pos}${age_mark_pos}:`);
547 print("<empty>\n");
557 print(`${imm} ${addr}:\t ${area} (${hex(cur.size_)}) : ${dt}`);
560 print("");
613 print("Please call !set_iso(isolate_address) first.");
619 print(`Heap at ${h.targetLocation}`);
623 print("Im address:\t object area start - end (size)");
665 print("Please call !set_iso(isolate_address) first.");
672 print(`${hex(address)} is in ${c.space} (chunk: ${hex(c.address)})`);
675 print(`Address ${hex(address)} is not in managed heap`);
684 print("Please call !set_iso(isolate_address) first.");
693 print(`Nested depth level: ${hsd.level}`);
708 print(`Currently tracking ${count} local handles`);
710 // print the handles
714 print(`Handles in block at ${hex(block)}`);
717 print(` ${hex(location)}->${hex(poi(location))}`);
722 print(`Handles in block at ${hex(last_block)}`);
725 print(` ${hex(location)}->${hex(poi(location))}`);
732 print(`${prefix} at ${hex(hsd.next.address)}`);
736 print(`${prefix} from the spare block at ${hex(location)}`);
739 print(`${prefix} from a new block to be allocated`);
754 print(`To see where objects are located, run !set_iso.`);
758 print(`${hex(addr)} doesn't look like a valid address`);
780 print(`${pad_right(aligned_addr)} ${pad_right(val)} ${full_ptr} ${augm}`);
795 print("Please call !set_iso(isolate_address) or provide chunk address.");
809 print(`failed to process chunk ${hex(c.address)} due to ${e.message}`);
815 print(`Remembered set in chunk ${hex(chunk_addr)}`);
824 print(` <empty>`);
828 print(`page_start_ [${hex(rs.page_start_)}] doesn't match chunk_addr!`);
840 print(` bucket ${hex(bucket.address.asNumber())}:`);
852 print(` ${hex(slot)} -> ${hex(poim(slot))}`);
860 if (count == 0) print(` <empty>`);
861 else print(` ${count} remembered pointers in chunk ${hex(chunk_addr)}`);