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

Side by Side Diff: src/heap/heap.h

Issue 804323004: Reland Shrink initial old generation size based on new space survival rate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_HEAP_H_ 5 #ifndef V8_HEAP_HEAP_H_
6 #define V8_HEAP_HEAP_H_ 6 #define V8_HEAP_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 Isolate* isolate_; 1499 Isolate* isolate_;
1500 1500
1501 Object* roots_[kRootListLength]; 1501 Object* roots_[kRootListLength];
1502 1502
1503 size_t code_range_size_; 1503 size_t code_range_size_;
1504 int reserved_semispace_size_; 1504 int reserved_semispace_size_;
1505 int max_semi_space_size_; 1505 int max_semi_space_size_;
1506 int initial_semispace_size_; 1506 int initial_semispace_size_;
1507 int target_semispace_size_; 1507 int target_semispace_size_;
1508 intptr_t max_old_generation_size_; 1508 intptr_t max_old_generation_size_;
1509 intptr_t initial_old_generation_size_;
1510 bool old_generation_size_configured_;
1509 intptr_t max_executable_size_; 1511 intptr_t max_executable_size_;
1510 intptr_t maximum_committed_; 1512 intptr_t maximum_committed_;
1511 1513
1512 // For keeping track of how much data has survived 1514 // For keeping track of how much data has survived
1513 // scavenge since last new space expansion. 1515 // scavenge since last new space expansion.
1514 int survived_since_last_expansion_; 1516 int survived_since_last_expansion_;
1515 1517
1516 // ... and since the last scavenge. 1518 // ... and since the last scavenge.
1517 int survived_last_scavenge_; 1519 int survived_last_scavenge_;
1518 1520
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 1988
1987 void UpdateSurvivalStatistics(int start_new_space_size); 1989 void UpdateSurvivalStatistics(int start_new_space_size);
1988 1990
1989 static const int kYoungSurvivalRateHighThreshold = 90; 1991 static const int kYoungSurvivalRateHighThreshold = 90;
1990 static const int kYoungSurvivalRateAllowedDeviation = 15; 1992 static const int kYoungSurvivalRateAllowedDeviation = 15;
1991 1993
1992 static const int kOldSurvivalRateLowThreshold = 10; 1994 static const int kOldSurvivalRateLowThreshold = 10;
1993 1995
1994 int high_survival_rate_period_length_; 1996 int high_survival_rate_period_length_;
1995 intptr_t promoted_objects_size_; 1997 intptr_t promoted_objects_size_;
1998 double promotion_ratio_;
1996 double promotion_rate_; 1999 double promotion_rate_;
1997 intptr_t semi_space_copied_object_size_; 2000 intptr_t semi_space_copied_object_size_;
2001 intptr_t previous_semi_space_copied_object_size_;
1998 double semi_space_copied_rate_; 2002 double semi_space_copied_rate_;
1999 int nodes_died_in_new_space_; 2003 int nodes_died_in_new_space_;
2000 int nodes_copied_in_new_space_; 2004 int nodes_copied_in_new_space_;
2001 int nodes_promoted_; 2005 int nodes_promoted_;
2002 2006
2003 // This is the pretenuring trigger for allocation sites that are in maybe 2007 // This is the pretenuring trigger for allocation sites that are in maybe
2004 // tenure state. When we switched to the maximum new space size we deoptimize 2008 // tenure state. When we switched to the maximum new space size we deoptimize
2005 // the code that belongs to the allocation site and derive the lifetime 2009 // the code that belongs to the allocation site and derive the lifetime
2006 // of the allocation site. 2010 // of the allocation site.
2007 unsigned int maximum_size_scavenges_; 2011 unsigned int maximum_size_scavenges_;
2008 2012
2009 // TODO(hpayer): Allocation site pretenuring may make this method obsolete. 2013 // TODO(hpayer): Allocation site pretenuring may make this method obsolete.
2010 // Re-visit incremental marking heuristics. 2014 // Re-visit incremental marking heuristics.
2011 bool IsHighSurvivalRate() { return high_survival_rate_period_length_ > 0; } 2015 bool IsHighSurvivalRate() { return high_survival_rate_period_length_ > 0; }
2012 2016
2017 void ConfigureInitialOldGenerationSize();
2018
2013 void SelectScavengingVisitorsTable(); 2019 void SelectScavengingVisitorsTable();
2014 2020
2015 void IdleMarkCompact(const char* message); 2021 void IdleMarkCompact(const char* message);
2016 2022
2017 bool TryFinalizeIdleIncrementalMarking( 2023 bool TryFinalizeIdleIncrementalMarking(
2018 double idle_time_in_ms, size_t size_of_objects, 2024 double idle_time_in_ms, size_t size_of_objects,
2019 size_t mark_compact_speed_in_bytes_per_ms); 2025 size_t mark_compact_speed_in_bytes_per_ms);
2020 2026
2021 bool WorthActivatingIncrementalMarking(); 2027 bool WorthActivatingIncrementalMarking();
2022 2028
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
2588 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2594 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2589 2595
2590 private: 2596 private:
2591 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2597 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2592 }; 2598 };
2593 #endif // DEBUG 2599 #endif // DEBUG
2594 } 2600 }
2595 } // namespace v8::internal 2601 } // namespace v8::internal
2596 2602
2597 #endif // V8_HEAP_HEAP_H_ 2603 #endif // V8_HEAP_HEAP_H_
OLDNEW
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | src/heap/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698