Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index a58e66091d405f95a46fa00d722fe53e00dd6101..f5eb449d0d4eb7d213951704ff09ab8c1c708eb7 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -5357,6 +5357,29 @@ struct JitCodeEvent { |
}; |
/** |
+ * Option flags passed to the SetRAILMode function. |
ulan
2016/05/20 11:15:56
Link https://developers.google.com/web/tools/chrom
|
+ */ |
+enum RAILMode { |
+ // Default performance mode: V8 will optimize for both latency and |
+ // throughput in this mode. |
+ PERFORMANCE_DEFAULT, |
+ // Response performance mode: In this mode moderate virtual machine latency |
+ // is provided. V8 will try to avoid long JavaScript execution interruptions. |
+ // Throughput may be throttled. |
+ PERFORMANCE_RESPONSE, |
+ // Animation performance mode: In this mode low virtual machine latency is |
Sami
2016/05/20 11:08:03
In my mind RESPONSE is the one where we'd want the
rmcilroy
2016/05/20 11:12:52
+1 - response would be for something where the ani
|
+ // provided. V8 will try to avoid as many JavaScript execution interruptions |
+ // as possible. Throughput may be throttled |
+ PERFORMANCE_ANIMATION, |
+ // Idle performance mode: The embedder is idle. V8 can complete deferred work |
+ // in this mode. |
+ PERFORMANCE_IDLE, |
+ // Load performance mode: In this mode high throughput is provided. V8 may |
+ // turn off latency optimizations. |
+ PERFORMANCE_LOAD |
+}; |
+ |
+/** |
* Option flags passed to the SetJitCodeEventHandler function. |
*/ |
enum JitCodeEventOptions { |
@@ -6158,6 +6181,13 @@ class V8_EXPORT Isolate { |
void IsolateInBackgroundNotification(); |
/** |
+ * Optional notification to tell V8 the current performance requirements |
+ * of the embedder based on RAIL. |
+ * V8 uses these notifications to guide heuristics. |
+ */ |
+ void SetRAILMode(RAILMode rail_mode); |
+ |
+ /** |
* Allows the host application to provide the address of a function that is |
* notified each time code is added, moved or removed. |
* |