Commit 5ca9632e authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[tools] Improve grokdump.py

- Add new address markers:
   T: tagged pointer in the minidump
   C: address into a module in the minidump
   S: pointer into the exception stack in the minidump
   *: other address in the minidump
- Show ASCII decoding of address in dd
- Display potential frame markers on the exception stack:
   00000032212fdae8: 0000000300000000   ........ Smi(3) EXIT frame marker
- Display relative addresses, useful to detect stack frames:
   00000032212fdb68: 00000032212fdb98 S ........  [+6]=00000032212fdcb0 S
   00000032212fdb70: 0000010ff5ca0a84   ........
   00000032212fdb78: 000001064c1fa881   ........
   00000032212fdb80: 0000016a8e52fcb1   ........
   00000032212fdb88: 0000010ff5ca0981   ........
   00000032212fdb90: 0000000d00000000   ........ Smi(13) INTERNAL frame marker
   00000032212fdb98: 00000032212fdcb0 S ........  [+35]=00000032212fdd61 S

Change-Id: I56bd7e6723a34bcb668719246dd5ff2898224928
Reviewed-on: https://chromium-review.googlesource.com/461862Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44269}
parent 4024e6a1
......@@ -2836,7 +2836,10 @@ void Shell::CleanupWorkers() {
static void DumpHeapConstants(i::Isolate* isolate) {
i::Heap* heap = isolate->heap();
printf(
"# Copyright 2017 the V8 project authors. All rights reserved.\n"
"# Use of this source code is governed by a BSD-style license that can\n"
"# be found in the LICENSE file.\n\n");
// Dump the INSTANCE_TYPES table to the console.
printf("# List of known V8 instance types.\n");
#define DUMP_TYPE(T) printf(" %d: \"%s\",\n", i::T, #T);
......@@ -2886,6 +2889,14 @@ static void DumpHeapConstants(i::Isolate* isolate) {
}
printf("}\n");
#undef ROOT_LIST_CASE
// Dump frame markers
printf("\n# List of known V8 Frame Markers.\n");
#define DUMP_MARKER(T, class) printf(" \"%s\",\n", #T);
printf("FRAME_MARKERS = (\n");
STACK_FRAME_TYPE_LIST(DUMP_MARKER)
printf(")\n");
#undef DUMP_TYPE
}
......
This diff is collapsed.
# Copyright 2017 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Use of this source code is governed by a BSD-style license that can
# be found in the LICENSE file.
# List of known V8 instance types.
INSTANCE_TYPES = {
......@@ -309,13 +309,34 @@ KNOWN_OBJECTS = {
("OLD_SPACE", 0x07969): "ExperimentalExtraNativesSourceCache",
("OLD_SPACE", 0x07981): "EmptyPropertiesDictionary",
("OLD_SPACE", 0x079d1): "ScriptList",
("OLD_SPACE", 0x23709): "CodeStubs",
("OLD_SPACE", 0x30781): "WeakObjectToCodeTable",
("OLD_SPACE", 0x309a9): "WeakNewSpaceObjectToCodeList",
("OLD_SPACE", 0x30a39): "NoScriptSharedFunctionInfos",
("OLD_SPACE", 0x4cb11): "MessageListeners",
("OLD_SPACE", 0x4cb31): "NoOpInterceptorInfo",
("OLD_SPACE", 0x550e1): "StringTable",
("CODE_SPACE", 0x2c4e1): "JsEntryCode",
("CODE_SPACE", 0x30941): "JsConstructEntryCode",
("OLD_SPACE", 0x22019): "CodeStubs",
("OLD_SPACE", 0x2f199): "WeakObjectToCodeTable",
("OLD_SPACE", 0x2f3c1): "WeakNewSpaceObjectToCodeList",
("OLD_SPACE", 0x2f451): "NoScriptSharedFunctionInfos",
("OLD_SPACE", 0x4abd9): "MessageListeners",
("OLD_SPACE", 0x4abf9): "NoOpInterceptorInfo",
("OLD_SPACE", 0x531d1): "StringTable",
("CODE_SPACE", 0x2cde1): "JsEntryCode",
("CODE_SPACE", 0x31241): "JsConstructEntryCode",
}
# List of known V8 Frame Markers.
FRAME_MARKERS = (
"ENTRY",
"ENTRY_CONSTRUCT",
"EXIT",
"JAVA_SCRIPT",
"OPTIMIZED",
"WASM_COMPILED",
"WASM_TO_JS",
"JS_TO_WASM",
"WASM_INTERPRETER_ENTRY",
"INTERPRETED",
"STUB",
"STUB_FAILURE_TRAMPOLINE",
"INTERNAL",
"CONSTRUCT",
"ARGUMENTS_ADAPTOR",
"BUILTIN",
"BUILTIN_EXIT",
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment