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

Unified Diff: src/heap/gc-idle-time-handler.h

Issue 1072363002: Make full GC reduce memory footprint an explicit event in the idle notification handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | src/heap/gc-idle-time-handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/gc-idle-time-handler.h
diff --git a/src/heap/gc-idle-time-handler.h b/src/heap/gc-idle-time-handler.h
index f953c87b3b81049345b2f23e15b451eb694c844d..681edaacb7906d91c1b3c89472a9e43ace376b7f 100644
--- a/src/heap/gc-idle-time-handler.h
+++ b/src/heap/gc-idle-time-handler.h
@@ -16,6 +16,7 @@ enum GCIdleTimeActionType {
DO_INCREMENTAL_MARKING,
DO_SCAVENGE,
DO_FULL_GC,
+ DO_FULL_GC_COMPACT,
DO_FINALIZE_SWEEPING
};
@@ -62,6 +63,14 @@ class GCIdleTimeAction {
return result;
}
+ static GCIdleTimeAction FullGCCompact() {
+ GCIdleTimeAction result;
+ result.type = DO_FULL_GC_COMPACT;
+ result.parameter = 0;
+ result.additional_work = false;
+ return result;
+ }
+
static GCIdleTimeAction FinalizeSweeping() {
GCIdleTimeAction result;
result.type = DO_FINALIZE_SWEEPING;
@@ -122,6 +131,10 @@ class GCIdleTimeHandler {
// 16 ms when there is currently no rendering going on.
static const size_t kMaxScheduledIdleTime = 50;
+ // This is the minimum time needed to trigger a full garbage collection which
+ // tries to reduce memory footprint.
+ static const size_t kMinTimeForReduceMemory = 600;
rmcilroy 2015/04/10 11:14:35 I'm guessing you are relying on the 1000ms IdleHan
Hannes Payer (out of office) 2015/04/10 13:06:57 Yes, exactly.
+
// We conservatively assume that in the next kTimeUntilNextIdleEvent ms
// no idle notification happens.
static const size_t kTimeUntilNextIdleEvent = 100;
@@ -195,6 +208,8 @@ class GCIdleTimeHandler {
size_t size_of_objects,
size_t mark_compact_speed_in_bytes_per_ms);
+ static bool ShouldDoReduceMemoryMarkCompact(size_t idle_time_in_ms);
+
static bool ShouldDoContextDisposalMarkCompact(int context_disposed,
double contexts_disposal_rate);
« no previous file with comments | « no previous file | src/heap/gc-idle-time-handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698