Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index a58e66091d405f95a46fa00d722fe53e00dd6101..b5db5fe4295d11d17589fdeb07fefdbf2cde7e81 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -5357,6 +5357,31 @@ struct JitCodeEvent { |
}; |
/** |
+ * Option flags passed to the SetRAILMode function. |
+ * See documentation https://developers.google.com/web/tools/chrome-devtools/ |
+ * profile/evaluate-performance/rail |
+ */ |
+enum RAILMode { |
+ // Default performance mode: V8 will optimize for both latency and |
+ // throughput in this mode. |
+ PERFORMANCE_DEFAULT, |
+ // Response performance mode: In this mode very low virtual machine latency |
+ // is provided. V8 will try to avoid JavaScript execution interruptions. |
+ // Throughput may be throttled. |
+ PERFORMANCE_RESPONSE, |
alph
2016/05/24 21:16:58
The mode names look misleading. They should not be
|
+ // Animation performance mode: In this mode low virtual machine latency is |
+ // provided. V8 will try to avoid as many JavaScript execution interruptions |
+ // as possible. Throughput may be throttled |
+ PERFORMANCE_ANIMATION, |
alph
2016/05/24 21:16:58
It's not clear what's the difference from RESPONSE
|
+ // 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 |
pfeldman
2016/05/24 23:36:01
+1 to what alph@ is saying. not only v8 should ope
|
+}; |
+ |
+/** |
* Option flags passed to the SetJitCodeEventHandler function. |
*/ |
enum JitCodeEventOptions { |
@@ -6158,6 +6183,15 @@ 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. |
+ * This is an unfinished experimental feature. Semantics and implementation |
+ * may change frequently. |
+ */ |
+ 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. |
* |