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

Unified Diff: runtime/vm/disassembler.h

Issue 19870006: Support stacktrace and objecthistogram service commands (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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
Index: runtime/vm/disassembler.h
diff --git a/runtime/vm/disassembler.h b/runtime/vm/disassembler.h
index 1f2a22c7fc07e14b2f0db4149c9ffa4afc38cd80..88138c49de296b7661470f4613ae6b8152eacb40 100644
--- a/runtime/vm/disassembler.h
+++ b/runtime/vm/disassembler.h
@@ -13,6 +13,7 @@ namespace dart {
// Froward declaration.
class MemoryRegion;
+class JSONStream;
// Disassembly formatter interface, which consumes the
// disassembled instructions in any desired form.
@@ -54,6 +55,28 @@ class DisassembleToStdout : public DisassemblyFormatter {
};
+// Disassemble into a JSONStream.
+class DisassembleToJSONStream : public DisassemblyFormatter {
+ public:
+ explicit DisassembleToJSONStream(JSONStream* stream) : DisassemblyFormatter(),
+ stream_(stream) {}
siva 2013/08/01 18:16:18 { } to stick to the style in this file.
Cutch 2013/08/01 22:22:04 Done.
+ ~DisassembleToJSONStream() { }
+
+ virtual void ConsumeInstruction(char* hex_buffer,
+ intptr_t hex_size,
+ char* human_buffer,
+ intptr_t human_size,
+ uword pc);
+
+ virtual void Print(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
+
+ private:
+ JSONStream* stream_;
+ DISALLOW_ALLOCATION();
+ DISALLOW_COPY_AND_ASSIGN(DisassembleToJSONStream);
+};
+
+
// Disassemble instructions.
class Disassembler : public AllStatic {
public:

Powered by Google App Engine
This is Rietveld 408576698