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

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: 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/pages.h ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.cc
diff --git a/runtime/vm/pages.cc b/runtime/vm/pages.cc
index 772806d260ffdcee2a21acd72d5bf70f8c67ee8c..b9d9fd88103374c98670f8fa85b2aaa679f43c2e 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* gc_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", gc_reason);
+ }
Timer timer(true, "MarkSweep");
timer.Start();
int64_t start = OS::GetCurrentTimeMillis();
« no previous file with comments | « runtime/vm/pages.h ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698