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

Unified Diff: include/v8.h

Issue 1999743002: Adding a SetRAILMode API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index a58e66091d405f95a46fa00d722fe53e00dd6101..b2676de2a554641a8ae5822d5e341430a8242952 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
ulan 2016/05/20 12:52:12 Maybe mention that the API is experimental and can
+ */
+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,
+ // 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,
+ // 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 +6183,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.
*
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698