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

Unified Diff: runtime/vm/scavenger.h

Issue 3001423002: Initial idle GC logic. (Closed)
Patch Set: divide-by-zero Created 3 years, 4 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 | « runtime/vm/heap.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scavenger.h
diff --git a/runtime/vm/scavenger.h b/runtime/vm/scavenger.h
index 4d59fc862e50354d70ae9d49d539f4f06829014d..53d0dd32de7b22fae345d2e67ea81c83c9b55f6e 100644
--- a/runtime/vm/scavenger.h
+++ b/runtime/vm/scavenger.h
@@ -97,6 +97,8 @@ class ScavengeStats {
: 0.0;
}
+ intptr_t UsedBeforeInWords() const { return before_.used_in_words; }
+
int64_t DurationMicros() const { return end_micros_ - start_micros_; }
private:
@@ -201,6 +203,8 @@ class Scavenger {
void WriteProtect(bool read_only);
+ bool ShouldPerformIdleScavenge(int64_t deadline);
+
void AddGCTime(int64_t micros) { gc_time_micros_ += micros; }
int64_t gc_time_micros() const { return gc_time_micros_; }
@@ -307,9 +311,12 @@ class Scavenger {
int64_t gc_time_micros_;
intptr_t collections_;
- static const int kStatsHistoryCapacity = 2;
+ static const int kStatsHistoryCapacity = 4;
RingBuffer<ScavengeStats, kStatsHistoryCapacity> stats_history_;
+ intptr_t scavenge_words_per_micro_;
+ intptr_t idle_scavenge_threshold_in_words_;
+
// The total size of external data associated with objects in this scavenger.
intptr_t external_size_;
« no previous file with comments | « runtime/vm/heap.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698