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

Unified Diff: runtime/vm/scavenger.h

Issue 3001423002: Initial idle GC logic. (Closed)
Patch Set: . 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
Index: runtime/vm/scavenger.h
diff --git a/runtime/vm/scavenger.h b/runtime/vm/scavenger.h
index 160354a1413bab283b6c01ea77e9aaecb7bc1151..36f4f4880787537182ee38475a541e94dbcfbb40 100644
--- a/runtime/vm/scavenger.h
+++ b/runtime/vm/scavenger.h
@@ -98,6 +98,8 @@ class ScavengeStats {
: 0.0;
}
+ intptr_t UsedBeforeInWords() const { return before_.used_in_words; }
+
int64_t DurationMicros() const { return end_micros_ - start_micros_; }
private:
@@ -222,6 +224,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_; }
@@ -331,9 +335,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') | runtime/vm/scavenger.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698