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

Unified Diff: runtime/vm/heap_histogram.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
« no previous file with comments | « runtime/vm/disassembler.cc ('k') | runtime/vm/heap_histogram.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap_histogram.h
diff --git a/runtime/vm/heap_histogram.h b/runtime/vm/heap_histogram.h
index 13e0a38a428eae9057435da0dedd8d350256bbee..46f6dc13f7f24c0ed3988153df8232cde231ef6c 100644
--- a/runtime/vm/heap_histogram.h
+++ b/runtime/vm/heap_histogram.h
@@ -12,6 +12,8 @@
namespace dart {
+class JSONStream;
+
DECLARE_FLAG(bool, print_object_histogram);
// ObjectHistogram is used to compute an average object histogram over
@@ -33,6 +35,8 @@ class ObjectHistogram {
// Print the histogram on stdout.
void Print();
+ void PrintToJSONStream(JSONStream* stream);
+
private:
// Add obj to histogram
void Add(RawObject* obj);
@@ -52,6 +56,10 @@ class ObjectHistogram {
// Compare function for sorting result.
static int compare(const Element** a, const Element** b);
+ // This function returns a malloced array. Caller is responsible for calling
+ // free().
+ Element** GetSortedArray(intptr_t* array_length);
+
intptr_t major_gc_count_;
intptr_t table_length_;
Element* table_;
« no previous file with comments | « runtime/vm/disassembler.cc ('k') | runtime/vm/heap_histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698