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

Unified Diff: runtime/vm/scavenger.cc

Issue 11416384: Improve the reporting of scavenger and free list reports. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « runtime/vm/pages.cc ('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 44a5c7b850b957f8f24e65954b59133db436694d..8953e7c941d017de6e0169dae2a4f5b00bc5fe5d 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -655,14 +655,23 @@ void Scavenger::Scavenge(bool invoke_api_callbacks, const char* gc_reason) {
if (FLAG_verbose_gc) {
const intptr_t KB2 = KB / 2;
+ double survival = ((in_use() + visitor.bytes_promoted()) /
+ static_cast<double>(in_use_before)) * 100.0;
+ double promoted = (visitor.bytes_promoted() /
+ static_cast<double>(in_use() + visitor.bytes_promoted()))
+ * 100.0;
OS::PrintErr("Scavenge[%d]: %"Pd64"us (%"Pd"K -> %"Pd"K, %"Pd"K)\n"
- "Promoted %"Pd"K\n",
+ "Surviving %"Pd"K %.1f%%\n"
+ "Promoted survivors %"Pd"K %.1f%%\n",
count_,
timer.TotalElapsedTime(),
(in_use_before + KB2) / KB,
(in_use() + KB2) / KB,
(capacity() + KB2) / KB,
- (visitor.bytes_promoted() + KB2) / KB);
+ (in_use() + visitor.bytes_promoted() + KB2) / KB,
+ survival,
+ (visitor.bytes_promoted() + KB2) / KB,
+ promoted);
}
if (FLAG_verify_after_gc) {
« no previous file with comments | « runtime/vm/pages.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698