Commit 58fe4d3a authored by jgruber's avatar jgruber Committed by Commit Bot

Let RelocInfo::Print print the name of code targets

For builtin and stub code targets, we can be a bit more descriptive and
print their name along with the code kind.

Before:
0x1fafde09c5cf  code target (BUILTIN)  (0x1fafde088280)
0x1fafde09c5f0  code target (STUB)  (0x1fafde084060)

After:
0x1fafde09c5cf  code target (BUILTIN Abort)  (0x1fafde088280)
0x1fafde09c5f0  code target (STUB CEntryStub)  (0x1fafde084060)


Bug: v8:6666
Change-Id: I27d205361748c6bae5e69e14f65efb7f85f23da7
Reviewed-on: https://chromium-review.googlesource.com/928766Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51459}
parent 3c62f7ae
......@@ -678,7 +678,13 @@ void RelocInfo::Print(Isolate* isolate, std::ostream& os) { // NOLINT
} else {
Code* code = Code::GetCodeFromTargetAddress(code_target);
DCHECK(code->IsCode());
os << " (" << Code::Kind2String(code->kind()) << ") ";
os << " (" << Code::Kind2String(code->kind());
if (Builtins::IsBuiltinId(code->builtin_index())) {
os << " " << Builtins::name(code->builtin_index());
} else if (code->kind() == Code::STUB) {
os << " " << CodeStub::MajorName(CodeStub::GetMajorKey(code));
}
os << ") ";
}
os << " (" << static_cast<const void*>(target_address()) << ")";
} else if (IsRuntimeEntry(rmode_) && isolate->deoptimizer_data() != nullptr) {
......
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