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

Unified Diff: runtime/vm/scavenger.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/scavenger.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scavenger.cc
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index 00923d197efecd680ca9525e6a3e3ef20ea13ea1..9a00a27e758f7569d008c38d3b657449d8d72d29 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -530,14 +530,14 @@ void Scavenger::VisitObjects(ObjectVisitor* visitor) const {
}
-void Scavenger::Scavenge() {
+void Scavenger::Scavenge(const char* gc_reason) {
// TODO(cshapiro): Add a decision procedure for determining when the
// the API callbacks should be invoked.
- Scavenge(false);
+ Scavenge(false, gc_reason);
}
-void Scavenger::Scavenge(bool invoke_api_callbacks) {
+void Scavenger::Scavenge(bool invoke_api_callbacks, const char* gc_reason) {
// Scavenging is not reentrant. Make sure that is the case.
ASSERT(!scavenging_);
scavenging_ = true;
@@ -552,7 +552,7 @@ void Scavenger::Scavenge(bool invoke_api_callbacks) {
}
if (FLAG_verbose_gc) {
- OS::PrintErr("Start scavenge\n");
+ OS::PrintErr("Start scavenge for %s collection\n", gc_reason);
}
Timer timer(FLAG_verbose_gc, "Scavenge");
timer.Start();
« no previous file with comments | « runtime/vm/scavenger.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698