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

Unified Diff: runtime/vm/heap.h

Issue 11428067: Merge the Merlin heap tracing to top-of-trunk. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add yet another missing file Created 8 years 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/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_;

Powered by Google App Engine
This is Rietveld 408576698