Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(871)

Unified Diff: src/disassembler.cc

Issue 2757263002: [disasm] Make jump target printing perf friendly (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/objdump-v8 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/disassembler.cc
diff --git a/src/disassembler.cc b/src/disassembler.cc
index 29262f411b50f0071160d45987a9d3f890ed20dc..6c0542ec90369a4da54c140611bbcc446171806b 100644
--- a/src/disassembler.cc
+++ b/src/disassembler.cc
@@ -41,7 +41,7 @@ const char* V8NameConverter::NameOfAddress(byte* pc) const {
code_ == NULL ? NULL : code_->GetIsolate()->builtins()->Lookup(pc);
if (name != NULL) {
- SNPrintF(v8_buffer_, "%s (%p)", name, static_cast<void*>(pc));
+ SNPrintF(v8_buffer_, "%p (%s)", static_cast<void*>(pc), name);
return v8_buffer_.start();
}
@@ -49,7 +49,7 @@ const char* V8NameConverter::NameOfAddress(byte* pc) const {
int offs = static_cast<int>(pc - code_->instruction_start());
// print as code offset, if it seems reasonable
if (0 <= offs && offs < code_->instruction_size()) {
- SNPrintF(v8_buffer_, "%d (%p)", offs, static_cast<void*>(pc));
+ SNPrintF(v8_buffer_, "%p <+0x%x>", static_cast<void*>(pc), offs);
return v8_buffer_.start();
}
}
@@ -151,7 +151,7 @@ static int DecodeIt(Isolate* isolate, std::ostream* os,
}
// Instruction address and instruction offset.
- out.AddFormatted("%p %4" V8PRIdPTRDIFF " ", static_cast<void*>(prev_pc),
+ out.AddFormatted("%p %4" V8PRIxPTRDIFF " ", static_cast<void*>(prev_pc),
prev_pc - begin);
// Instruction.
« no previous file with comments | « no previous file | tools/objdump-v8 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698