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

Unified Diff: runtime/vm/pages.h

Issue 235343004: Accelerate old-space growth (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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 | runtime/vm/pages.cc » ('j') | runtime/vm/pages.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/pages.h
===================================================================
--- runtime/vm/pages.h (revision 35208)
+++ runtime/vm/pages.h (working copy)
@@ -95,6 +95,8 @@
int GarbageCollectionTimeFraction();
+ bool IsEmpty() const { return index_ == 0; }
+
private:
static const intptr_t kHistoryLength = 4;
int64_t start_[kHistoryLength];
@@ -106,14 +108,11 @@
};
-// If GC is able to reclaim more than heap_growth_ratio (in percent) memory
-// and if the relative GC time is below a given threshold,
-// then the heap is not grown when the next GC decision is made.
// PageSpaceController controls the heap size.
class PageSpaceController {
public:
PageSpaceController(int heap_growth_ratio,
- int heap_growth_rate,
+ int heap_growth_max,
int garbage_collection_time_ratio);
~PageSpaceController();
@@ -123,10 +122,6 @@
bool NeedsGarbageCollection(SpaceUsage after) const;
// Should be called after each collection to update the controller state.
- // A garbage collection is considered as successful if more than
- // heap_growth_ratio % of memory got deallocated by the garbage collector.
- // In this case garbage collection will be performed next time. Otherwise
- // the heap will grow.
void EvaluateGarbageCollection(SpaceUsage before,
SpaceUsage after,
int64_t start, int64_t end);
@@ -164,11 +159,11 @@
// Equivalent to \frac{100-heap_growth_ratio_}{100}.
double desired_utilization_;
- // Number of pages we grow.
- int heap_growth_rate_;
+ // Max number of pages we grow.
+ int heap_growth_max_;
- // If the relative GC time stays below garbage_collection_time_ratio_
- // garbage collection can be performed.
+ // If the relative GC time goes above garbage_collection_time_ratio_ %,
+ // we grow the heap more aggressively.
int garbage_collection_time_ratio_;
// The time in microseconds of the last time we tried to collect unused
« no previous file with comments | « no previous file | runtime/vm/pages.cc » ('j') | runtime/vm/pages.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698