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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 5339 matching lines...) Expand 10 before | Expand all | Expand 10 after
5350 5350
5351 // Only valid for CODE_ADD_LINE_POS_INFO 5351 // Only valid for CODE_ADD_LINE_POS_INFO
5352 struct line_info_t line_info; 5352 struct line_info_t line_info;
5353 5353
5354 // New location of instructions. Only valid for CODE_MOVED. 5354 // New location of instructions. Only valid for CODE_MOVED.
5355 void* new_code_start; 5355 void* new_code_start;
5356 }; 5356 };
5357 }; 5357 };
5358 5358
5359 /** 5359 /**
5360 * Option flags passed to the SetRAILMode function.
5361 * See documentation https://developers.google.com/web/tools/chrome-devtools/
5362 * profile/evaluate-performance/rail
5363 */
5364 enum RAILMode {
5365 // Default performance mode: V8 will optimize for both latency and
5366 // throughput in this mode.
5367 PERFORMANCE_DEFAULT,
5368 // Response performance mode: In this mode very low virtual machine latency
5369 // is provided. V8 will try to avoid JavaScript execution interruptions.
5370 // Throughput may be throttled.
5371 PERFORMANCE_RESPONSE,
alph 2016/05/24 21:16:58 The mode names look misleading. They should not be
5372 // Animation performance mode: In this mode low virtual machine latency is
5373 // provided. V8 will try to avoid as many JavaScript execution interruptions
5374 // as possible. Throughput may be throttled
5375 PERFORMANCE_ANIMATION,
alph 2016/05/24 21:16:58 It's not clear what's the difference from RESPONSE
5376 // Idle performance mode: The embedder is idle. V8 can complete deferred work
5377 // in this mode.
5378 PERFORMANCE_IDLE,
5379 // Load performance mode: In this mode high throughput is provided. V8 may
5380 // turn off latency optimizations.
5381 PERFORMANCE_LOAD
pfeldman 2016/05/24 23:36:01 +1 to what alph@ is saying. not only v8 should ope
5382 };
5383
5384 /**
5360 * Option flags passed to the SetJitCodeEventHandler function. 5385 * Option flags passed to the SetJitCodeEventHandler function.
5361 */ 5386 */
5362 enum JitCodeEventOptions { 5387 enum JitCodeEventOptions {
5363 kJitCodeEventDefault = 0, 5388 kJitCodeEventDefault = 0,
5364 // Generate callbacks for already existent code. 5389 // Generate callbacks for already existent code.
5365 kJitCodeEventEnumExisting = 1 5390 kJitCodeEventEnumExisting = 1
5366 }; 5391 };
5367 5392
5368 5393
5369 /** 5394 /**
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
6151 */ 6176 */
6152 void IsolateInForegroundNotification(); 6177 void IsolateInForegroundNotification();
6153 6178
6154 /** 6179 /**
6155 * Optional notification that the isolate switched to the background. 6180 * Optional notification that the isolate switched to the background.
6156 * V8 uses these notifications to guide heuristics. 6181 * V8 uses these notifications to guide heuristics.
6157 */ 6182 */
6158 void IsolateInBackgroundNotification(); 6183 void IsolateInBackgroundNotification();
6159 6184
6160 /** 6185 /**
6186 * Optional notification to tell V8 the current performance requirements
6187 * of the embedder based on RAIL.
6188 * V8 uses these notifications to guide heuristics.
6189 * This is an unfinished experimental feature. Semantics and implementation
6190 * may change frequently.
6191 */
6192 void SetRAILMode(RAILMode rail_mode);
6193
6194 /**
6161 * Allows the host application to provide the address of a function that is 6195 * Allows the host application to provide the address of a function that is
6162 * notified each time code is added, moved or removed. 6196 * notified each time code is added, moved or removed.
6163 * 6197 *
6164 * \param options options for the JIT code event handler. 6198 * \param options options for the JIT code event handler.
6165 * \param event_handler the JIT code event handler, which will be invoked 6199 * \param event_handler the JIT code event handler, which will be invoked
6166 * each time code is added, moved or removed. 6200 * each time code is added, moved or removed.
6167 * \note \p event_handler won't get notified of existent code. 6201 * \note \p event_handler won't get notified of existent code.
6168 * \note since code removal notifications are not currently issued, the 6202 * \note since code removal notifications are not currently issued, the
6169 * \p event_handler may get notifications of code that overlaps earlier 6203 * \p event_handler may get notifications of code that overlaps earlier
6170 * code notifications. This happens when code areas are reused, and the 6204 * code notifications. This happens when code areas are reused, and the
(...skipping 2573 matching lines...) Expand 10 before | Expand all | Expand 10 after
8744 */ 8778 */
8745 8779
8746 8780
8747 } // namespace v8 8781 } // namespace v8
8748 8782
8749 8783
8750 #undef TYPE_CHECK 8784 #undef TYPE_CHECK
8751 8785
8752 8786
8753 #endif // INCLUDE_V8_H_ 8787 #endif // INCLUDE_V8_H_
OLDNEW
« 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