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

Unified Diff: runtime/include/dart_api.h

Issue 2572423004: Reapply "Save and restore feedback from JIT." (Closed)
Patch Set: Created 4 years 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
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index e1092cc59ac6f51ee368ffe0b327e1f8a8642b88..43b9c17260d3091ff14171b34e873fd459e1dd99 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -3185,6 +3185,22 @@ DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort();
* ==============
*/
+/**
+ * Saves a serialized version of the information collected for use by the
+ * optimizing compiler, such as type feedback and usage counters. When this
+ * information is passed to Dart_Precompile, the AOT compiler may use it to
+ * produce faster and smaller code. The feedback is only used if the JIT that
+ * created it and the AOT compiler consuming it
+ * - are running the same Dart program
+ * - are built from the same version of the VM
+ * - agree on whether type checks and assertions are enabled
+ *
+ * \return Returns an error handler if the VM was built in a mode that does not
+ * support saving JIT feedback.
+ */
+DART_EXPORT Dart_Handle Dart_SaveJITFeedback(uint8_t** buffer,
+ intptr_t* buffer_length);
+
typedef struct {
const char* library_uri;
@@ -3214,7 +3230,10 @@ typedef struct {
* constructors was encountered.
*/
DART_EXPORT Dart_Handle
-Dart_Precompile(Dart_QualifiedFunctionName entry_points[], bool reset_fields);
+Dart_Precompile(Dart_QualifiedFunctionName entry_points[],
+ bool reset_fields,
+ uint8_t* jit_feedback,
+ intptr_t jit_feedback_length);
/**

Powered by Google App Engine
This is Rietveld 408576698