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

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

Issue 465473002: Use actual incremental marking throughput in IdleNotification to estimate marking step size. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | « BUILD.gn ('k') | 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
new file mode 100644
index 0000000000000000000000000000000000000000..cf43b9b0700c0340d855616f0cd8be3ef6b0cf3a
--- /dev/null
+++ b/src/heap/gc-idle-time-handler.h
@@ -0,0 +1,35 @@
+// Copyright 2014 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_HEAP_GC_IDLE_TIME_HANDLER_H_
+#define V8_HEAP_GC_IDLE_TIME_HANDLER_H_
+
+#include "src/globals.h"
+
+namespace v8 {
+namespace internal {
+
+// The idle time handler makes decisions about which garbage collection
+// operations are executing during IdleNotification.
+class GCIdleTimeHandler {
+ public:
+ static intptr_t EstimateMarkingStepSize(
+ int idle_time_in_ms, intptr_t marking_speed_in_bytes_per_ms);
+
+ // If we haven't recorded any incremental marking events yet, we carefully
+ // mark with a conservative lower bound for the marking speed.
+ static const intptr_t kInitialConservativeMarkingSpeed = 100 * KB;
+
+ // We have to make sure that we finish the IdleNotification before
+ // idle_time_in_ms. Hence, we conservatively prune our workload estimate.
+ static const double kConservativeTimeRatio;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler);
+};
+
+} // namespace internal
+} // namespace v8
+
+#endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_
« no previous file with comments | « BUILD.gn ('k') | src/heap/gc-idle-time-handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698