[disassembler] Better support for roots
In particular, output root name instead of root value when detecting accesses to roots table. For example: REX.W cmpq [r13+0x80] (root (0x391473a00569 <Map[16]>)),rbx REX.W movq rdi,[r13+0x18] (root (0x391473a007b9 <Map>)) REX.W movq rdi,[r13-0x20] (root (0x391473a005b9 <the_hole>)) turns into REX.W cmpq [r13+0x80] (root (heap_number_map)),rbx REX.W movq rdi,[r13+0x18] (root (fixed_array_map)) REX.W movq rdi,[r13-0x20] (root (the_hole_value)) Bug: v8:8238 Change-Id: I0f7bdcb7774a2fe450f930c1bc2f3ccd03064201 Reviewed-on: https://chromium-review.googlesource.com/c/1317823 Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#57262}
This commit is contained in:
parent
0483e9a9ab
commit
47304413cb
@ -132,12 +132,7 @@ const char* V8NameConverter::RootRelativeName(int offset) const {
|
||||
RootIndex root_index =
|
||||
static_cast<RootIndex>(offset_in_roots_table / kPointerSize);
|
||||
|
||||
HeapStringAllocator allocator;
|
||||
StringStream accumulator(&allocator);
|
||||
isolate_->root(root_index)->ShortPrint(&accumulator);
|
||||
std::unique_ptr<char[]> obj_name = accumulator.ToCString();
|
||||
|
||||
SNPrintF(v8_buffer_, "root (%s)", obj_name.get());
|
||||
SNPrintF(v8_buffer_, "root (%s)", RootsTable::name(root_index));
|
||||
return v8_buffer_.start();
|
||||
|
||||
} else if (static_cast<unsigned>(offset - kExtRefsTableStart) <
|
||||
|
Loading…
Reference in New Issue
Block a user