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

Unified Diff: src/heap.h

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/global-handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index 9eaa6ab399e7a215539f12e1d579e7d390a255dc..6569c198309947d5c21ef01724e5f90e155ba5b8 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1182,6 +1182,18 @@ class Heap {
semi_space_copied_object_size_ += object_size;
}
+ inline void IncrementNodesDiedInNewSpace() {
+ nodes_died_in_new_space_++;
+ }
+
+ inline void IncrementNodesCopiedInNewSpace() {
+ nodes_copied_in_new_space_++;
+ }
+
+ inline void IncrementNodesPromoted() {
+ nodes_promoted_++;
+ }
+
inline void IncrementYoungSurvivorsCounter(int survived) {
ASSERT(survived >= 0);
survived_since_last_expansion_ += survived;
@@ -2026,6 +2038,9 @@ class Heap {
double promotion_rate_;
intptr_t semi_space_copied_object_size_;
double semi_space_copied_rate_;
+ int nodes_died_in_new_space_;
+ int nodes_copied_in_new_space_;
+ int nodes_promoted_;
// This is the pretenuring trigger for allocation sites that are in maybe
// tenure state. When we switched to the maximum new space size we deoptimize
@@ -2569,18 +2584,6 @@ class GCTracer BASE_EMBEDDED {
const char* collector_reason);
~GCTracer();
- void increment_nodes_died_in_new_space() {
- nodes_died_in_new_space_++;
- }
-
- void increment_nodes_copied_in_new_space() {
- nodes_copied_in_new_space_++;
- }
-
- void increment_nodes_promoted() {
- nodes_promoted_++;
- }
-
private:
// Returns a string matching the collector.
const char* CollectorString() const;
@@ -2627,15 +2630,6 @@ class GCTracer BASE_EMBEDDED {
// previous collection and the beginning of the current one.
double spent_in_mutator_;
- // Number of died nodes in the new space.
- int nodes_died_in_new_space_;
-
- // Number of copied nodes to the new space.
- int nodes_copied_in_new_space_;
-
- // Number of promoted nodes to the old space.
- int nodes_promoted_;
-
// Incremental marking steps counters.
int steps_count_;
double steps_took_;
« no previous file with comments | « src/global-handles.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698