Commit ff5c323e authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[printing] Show stub address and details for embedded stub when disassembling

Change-Id: Ie35e9f07b3936e975f5072c0508889c4a6a622da
Reviewed-on: https://chromium-review.googlesource.com/768812Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49356}
parent 7a0d098c
......@@ -3467,7 +3467,11 @@ void HeapObject::HeapObjectShortPrint(std::ostream& os) { // NOLINT
#undef MAKE_STRUCT_CASE
case CODE_TYPE: {
Code* code = Code::cast(this);
os << "<Code " << Code::Kind2String(code->kind()) << ">";
os << "<Code " << Code::Kind2String(code->kind());
if (code->is_stub()) {
os << " " << CodeStub::MajorName(CodeStub::GetMajorKey(code));
}
os << ">";
break;
}
case ODDBALL_TYPE: {
......@@ -14422,6 +14426,7 @@ void Code::Disassemble(const char* name, std::ostream& os) { // NOLINT
if (is_stub()) {
const char* n = CodeStub::MajorName(CodeStub::GetMajorKey(this));
os << "major_key = " << (n == nullptr ? "null" : n) << "\n";
os << "minor_key = " << CodeStub::MinorKeyFromKey(this->stub_key()) << "\n";
}
if ((name != nullptr) && (name[0] != '\0')) {
os << "name = " << name << "\n";
......@@ -14442,6 +14447,7 @@ void Code::Disassemble(const char* name, std::ostream& os) { // NOLINT
os << "stack_slots = " << stack_slots() << "\n";
}
os << "compiler = " << (is_turbofanned() ? "turbofan" : "unknown") << "\n";
os << "address = " << static_cast<const void*>(this) << "\n";
os << "Instructions (size = " << instruction_size() << ")\n";
{
......
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