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

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

Issue 1023153002: Limit rate of full garbage collections triggered by idle notification. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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') | src/heap/gc-idle-time-handler.cc » ('J')
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 6a39b78aaa2fcc24fd5210236f177bf0f9fffc14..e75e4a0ffa1b4e7e04b71a432aa072341af473ec 100644
--- a/src/heap/gc-idle-time-handler.h
+++ b/src/heap/gc-idle-time-handler.h
@@ -136,8 +136,15 @@ class GCIdleTimeHandler {
// Incremental marking step time.
static const size_t kIncrementalMarkingStepTimeInMs = 1;
+ // This is the minimum time required to perform over approximation of
+ // weak closure during idle notification.
static const size_t kMinTimeForOverApproximatingWeakClosureInMs;
+ // No full garbage collections are performed if the last full GC was done
+ // kMinTimeInBetweenMarkCompactsInMs milliseconds before. Idle times larger
+ // than kMaxScheduledIdleTime ignore that threshold.
+ static const size_t kMinTimeInBetweenMarkCompactsInMs = 1000;
rmcilroy 2015/03/20 14:56:08 Is 1000ms a guesstimation or is there any reason t
+
class HeapState {
public:
void Print();
@@ -155,6 +162,8 @@ class GCIdleTimeHandler {
size_t used_new_space_size;
size_t new_space_capacity;
size_t new_space_allocation_throughput_in_bytes_per_ms;
+ size_t last_mark_compact_time;
+ size_t current_time;
};
GCIdleTimeHandler()
@@ -186,7 +195,9 @@ class GCIdleTimeHandler {
static bool ShouldDoMarkCompact(size_t idle_time_in_ms,
size_t size_of_objects,
- size_t mark_compact_speed_in_bytes_per_ms);
+ size_t mark_compact_speed_in_bytes_per_ms,
+ size_t last_mark_compact_time_in_ms,
+ size_t current_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') | src/heap/gc-idle-time-handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698