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

Unified Diff: src/heap.cc

Issue 397953012: Move node statistics from GCTracer to Heap. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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 75a48f15f551add4e7b53145735d65f4a4e52da0..16d7a8040bd4bdc1307363521e0d3f1128cc04ad 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -105,6 +105,9 @@ Heap::Heap()
promotion_rate_(0),
semi_space_copied_object_size_(0),
semi_space_copied_rate_(0),
+ nodes_died_in_new_space_(0),
+ nodes_copied_in_new_space_(0),
+ nodes_promoted_(0),
maximum_size_scavenges_(0),
max_gc_pause_(0.0),
total_gc_time_ms_(0.0),
@@ -428,6 +431,9 @@ void Heap::GarbageCollectionPrologue() {
// Reset GC statistics.
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;
UpdateMaximumCommitted();
@@ -1115,8 +1121,7 @@ bool Heap::PerformGarbageCollection(
{ AllowHeapAllocation allow_allocation;
GCTracer::Scope scope(tracer, GCTracer::Scope::EXTERNAL);
freed_global_handles =
- isolate_->global_handles()->PostGarbageCollectionProcessing(
- collector, tracer);
+ isolate_->global_handles()->PostGarbageCollectionProcessing(collector);
}
gc_post_processing_depth_--;
@@ -5985,9 +5990,6 @@ GCTracer::GCTracer(Heap* heap,
collector_(collector),
allocated_since_last_gc_(0),
spent_in_mutator_(0),
- nodes_died_in_new_space_(0),
- nodes_copied_in_new_space_(0),
- nodes_promoted_(0),
heap_(heap),
gc_reason_(gc_reason),
collector_reason_(collector_reason) {
@@ -6135,9 +6137,9 @@ void GCTracer::PrintNVP() const {
PrintF("promoted=%" V8_PTR_PREFIX "d ", heap_->promoted_objects_size_);
PrintF("semi_space_copied=%" V8_PTR_PREFIX "d ",
heap_->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("nodes_died_in_new=%d ", heap_->nodes_died_in_new_space_);
+ PrintF("nodes_copied_in_new=%d ", heap_->nodes_copied_in_new_space_);
+ PrintF("nodes_promoted=%d ", heap_->nodes_promoted_);
PrintF("promotion_rate=%.1f%% ", heap_->promotion_rate_);
PrintF("semi_space_copy_rate=%.1f%% ", heap_->semi_space_copied_rate_);
« 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