Index: runtime/vm/heap.h |
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h |
index 819a80a9b7627408ea3ef5d3cb5dd562b8203a74..f34eb371486a8734c99e247f292e2ad44753e30b 100644 |
--- a/runtime/vm/heap.h |
+++ b/runtime/vm/heap.h |
@@ -15,6 +15,7 @@ |
namespace dart { |
// Forward declarations. |
+class HeapTrace; |
class Isolate; |
class ObjectPointerVisitor; |
class ObjectSet; |
@@ -148,6 +149,10 @@ class Heap { |
// Verify that all pointers in the heap point to the heap. |
bool Verify() const; |
+ // Accessor function to get the HeapTrace used for tracing. There |
+ // should only ever be one of these per isolate |
+ HeapTrace* trace() { return heap_trace_; } |
siva
2012/12/05 16:06:40
const
cshapiro
2012/12/08 03:23:08
Fixed.
|
+ |
// Print heap sizes. |
void PrintSizes() const; |
@@ -157,7 +162,7 @@ class Heap { |
ObjectSet* CreateAllocatedObjectSet() const; |
// Generates a profile of the current and VM isolate heaps. |
- void Profile(Dart_HeapProfileWriteCallback callback, void* stream) const; |
+ void Profile(Dart_FileWriteCallback callback, void* stream) const; |
static const char* GCReasonToString(GCReason gc_reason); |
@@ -182,6 +187,9 @@ class Heap { |
Scavenger* new_space_; |
PageSpace* old_space_; |
+ // The active trace for this heap. NULL if tracing is not enabled. |
+ HeapTrace* heap_trace_; |
+ |
// This heap is in read-only mode: No allocation is allowed. |
bool read_only_; |