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

Unified Diff: runtime/vm/disassembler.cc

Issue 928833003: Add Function based profile tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | « runtime/vm/dart.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler.cc
diff --git a/runtime/vm/disassembler.cc b/runtime/vm/disassembler.cc
index 4d5a3509b60c2cabaed5f048beaca2bd1a850499..ac8356e95d649eabb02f0df980609ae825975857 100644
--- a/runtime/vm/disassembler.cc
+++ b/runtime/vm/disassembler.cc
@@ -6,9 +6,11 @@
#include "vm/assembler.h"
#include "vm/globals.h"
-#include "vm/os.h"
-#include "vm/log.h"
+#include "vm/il_printer.h"
#include "vm/json_stream.h"
+#include "vm/log.h"
+#include "vm/os.h"
+
namespace dart {
@@ -130,6 +132,8 @@ void Disassembler::Disassemble(uword start,
comment_finger++;
}
if (old_comment_finger != comment_finger) {
+ char str[4000];
+ BufferFormatter f(str, sizeof(str));
// Comment emitted, emit inlining information.
code.GetInlinedFunctionsAt(offset, &inlined_functions);
// Skip top scope function printing (last entry in 'inlined_functions').
@@ -137,14 +141,15 @@ void Disassembler::Disassemble(uword start,
for (intptr_t i = inlined_functions.length() - 2; i >= 0; i--) {
const char* name = inlined_functions[i]->ToQualifiedCString();
if (first) {
- formatter->Print(" ;; Inlined [%s", name);
+ f.Print(" ;; Inlined [%s", name);
first = false;
} else {
- formatter->Print(" -> %s", name);
+ f.Print(" -> %s", name);
}
}
if (!first) {
- formatter->Print("]\n");
+ f.Print("]\n");
+ formatter->Print(str);
}
}
int instruction_length;
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698