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

Unified Diff: src/heap.cc

Issue 290133004: Print promotion rate and semi-space copy rate in --trace-gc-nvp. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | « src/heap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 5d338b2122374a163e083aca1453c7c135bc4c0b..d6503cf7b7c62bbbd055bf502c512608db993cf2 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -2056,7 +2056,9 @@ class ScavengingVisitor : public StaticVisitorBase {
}
}
- heap->tracer()->increment_promoted_objects_size(object_size);
+ if (FLAG_trace_gc) {
Michael Starzinger 2014/05/16 11:30:37 nit: This makes the code harder to read and I am n
Hannes Payer (out of office) 2014/05/20 09:29:14 Done.
+ heap->tracer()->increment_promoted_objects_size(object_size);
+ }
return;
}
}
@@ -2075,6 +2077,9 @@ class ScavengingVisitor : public StaticVisitorBase {
// buffer.
*slot = target;
MigrateObject(heap, object, target, object_size);
+ if (FLAG_trace_gc) {
Michael Starzinger 2014/05/16 11:30:37 nit: Likewise.
Hannes Payer (out of office) 2014/05/20 09:29:14 Done.
+ heap->tracer()->increment_semi_space_copied_object_size(object_size);
+ }
return;
}
@@ -6029,6 +6034,7 @@ GCTracer::GCTracer(Heap* heap,
allocated_since_last_gc_(0),
spent_in_mutator_(0),
promoted_objects_size_(0),
+ semi_space_copied_object_size_(0),
nodes_died_in_new_space_(0),
nodes_copied_in_new_space_(0),
nodes_promoted_(0),
@@ -6176,10 +6182,18 @@ GCTracer::~GCTracer() {
PrintF("allocated=%" V8_PTR_PREFIX "d ", allocated_since_last_gc_);
PrintF("promoted=%" V8_PTR_PREFIX "d ", promoted_objects_size_);
+ PrintF("semi_space_copied=%" V8_PTR_PREFIX "d ",
+ semi_space_copied_object_size_);
PrintF("nodes_died_in_new=%d ", nodes_died_in_new_space_);
PrintF("nodes_copied_in_new=%d ", nodes_copied_in_new_space_);
PrintF("nodes_promoted=%d ", nodes_promoted_);
- PrintF("survived=%.1f%% ", heap_->survival_rate_);
+ PrintF("survival_rate=%.1f%% ", heap_->survival_rate_);
+ PrintF("promotion_rate=%.1f%% ",
+ (static_cast<double>(promoted_objects_size_) /
+ static_cast<double>(heap_->new_space()->Capacity())) * 100);
+ PrintF("semi_space_copy_rate=%.1f%% ",
+ (static_cast<double>(semi_space_copied_object_size_) /
+ static_cast<double>(heap_->new_space()->Capacity())) * 100);
if (collector_ == SCAVENGER) {
PrintF("stepscount=%d ", steps_count_since_last_gc_);
« no previous file with comments | « src/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698