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

Unified Diff: runtime/vm/pages.cc

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: 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
Index: runtime/vm/pages.cc
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index 772806d260ffdcee2a21acd72d5bf70f8c67ee8c..f5c8593ba98bd827be137154d84dab5039c5f35a 100644
--- a/runtime/vm/pages.cc
+++ b/runtime/vm/pages.cc
@@ -360,7 +360,7 @@ void PageSpace::WriteProtect(bool read_only) {
}
-void PageSpace::MarkSweep(bool invoke_api_callbacks) {
+void PageSpace::MarkSweep(bool invoke_api_callbacks, const char* reason) {
// MarkSweep is not reentrant. Make sure that is the case.
ASSERT(!sweeping_);
sweeping_ = true;
@@ -377,6 +377,9 @@ void PageSpace::MarkSweep(bool invoke_api_callbacks) {
OS::PrintErr(" done.\n");
}
+ if (FLAG_verbose_gc) {
+ OS::PrintErr("Start mark sweep for %s collection\n", reason);
+ }
Timer timer(true, "MarkSweep");
timer.Start();
int64_t start = OS::GetCurrentTimeMillis();

Powered by Google App Engine
This is Rietveld 408576698