| 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_;
|
|
|