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: src/heap.h

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 | « no previous file | 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 d0d35473912f9588981f1924c5df16eedbe40268..c0240749149b6c8fe2a501b6225e66a5db42d277 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1187,9 +1187,18 @@ class Heap {
// Check new space expansion criteria and expand semispaces if it was hit.
void CheckNewSpaceExpansionCriteria();
+ inline void IncrementPromotedObjectsSize(int object_size) {
+ ASSERT(object_size > 0);
+ promoted_objects_size_ += object_size;
+ }
+
+ inline void IncrementSemiSpaceCopiedObjectSize(int object_size) {
+ ASSERT(object_size > 0);
+ semi_space_copied_object_size_ += object_size;
+ }
+
inline void IncrementYoungSurvivorsCounter(int survived) {
ASSERT(survived >= 0);
- young_survivors_after_last_gc_ = survived;
survived_since_last_expansion_ += survived;
}
@@ -2027,10 +2036,13 @@ class Heap {
static const int kOldSurvivalRateLowThreshold = 10;
- int young_survivors_after_last_gc_;
int high_survival_rate_period_length_;
int low_survival_rate_period_length_;
double survival_rate_;
+ intptr_t promoted_objects_size_;
+ double promotion_rate_;
+ intptr_t semi_space_copied_object_size_;
+ double semi_space_copied_rate_;
SurvivalRateTrend previous_survival_rate_trend_;
SurvivalRateTrend survival_rate_trend_;
@@ -2600,10 +2612,6 @@ class GCTracer BASE_EMBEDDED {
// Sets the full GC count.
void set_full_gc_count(int count) { full_gc_count_ = count; }
- void increment_promoted_objects_size(int object_size) {
- promoted_objects_size_ += object_size;
- }
-
void increment_nodes_died_in_new_space() {
nodes_died_in_new_space_++;
}
@@ -2657,9 +2665,6 @@ class GCTracer BASE_EMBEDDED {
// previous collection and the beginning of the current one.
double spent_in_mutator_;
- // Size of objects promoted during the current collection.
- intptr_t promoted_objects_size_;
-
// Number of died nodes in the new space.
int nodes_died_in_new_space_;
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698