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

Unified Diff: runtime/vm/heap.h

Issue 10872074: Report the reason for a garbage collection when verbose GC is enabled. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rename a parameter consistently Created 8 years, 4 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/dart_api_impl_test.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.h
diff --git a/runtime/vm/heap.h b/runtime/vm/heap.h
index d3bf0703bfc80822538a5da47c497178ab930e1e..0c0a444dabc34ebfbfe441fd718079d3daab81fd 100644
--- a/runtime/vm/heap.h
+++ b/runtime/vm/heap.h
@@ -38,6 +38,16 @@ class Heap {
kInvokeApiCallbacks
};
+ enum GCReason {
+ kNewSpace,
+ kPromotionFailure,
+ kOldSpace,
+ kCodeSpace,
+ kFull,
+ kGCAtAlloc,
+ kGCTestCase,
+ };
+
// Default allocation sizes in MB for the old gen and code heaps.
static const intptr_t kHeapSizeInMB = 512;
static const intptr_t kCodeHeapSizeInMB = 12;
@@ -144,6 +154,8 @@ class Heap {
// Generates a profile of the current and VM isolate heaps.
void Profile(Dart_HeapProfileWriteCallback callback, void* stream) const;
+ static const char* GCReasonToString(GCReason gc_reason);
+
private:
Heap();
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698