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

Unified Diff: runtime/include/dart_api.h

Issue 2922913004: Add Dart_Save/LoadCompilationTrace. (Closed)
Patch Set: . Created 3 years, 6 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 | « runtime/bin/main.cc ('k') | runtime/vm/compilation_trace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 1fc94b8e1748499ca4f636b56b95424b516af571..51b96038a57f0bb74c5798640461f0216667a545 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -3194,6 +3194,31 @@ DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate);
DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort();
+/**
+ * Record all functions which have been compiled in the current isolate.
+ *
+ * \param buffer Returns a pointer to a buffer containing the trace.
+ * This buffer is scope allocated and is only valid until the next call to
+ * Dart_ExitScope.
+ * \param size Returns the size of the buffer.
+ * \return Returns an valid handle upon success.
+ */
+DART_EXPORT Dart_Handle Dart_SaveCompilationTrace(uint8_t** buffer,
+ intptr_t* buffer_length);
+
+
+/**
+ * Compile all functions from data from Dart_SaveCompilationTrace. Unlike JIT
+ * feedback, this data is fuzzy: loading does not need to happen in the exact
+ * program that was saved, the saver and loader do not need to agree on checked
+ * mode versus production mode or debug/release/product.
+ *
+ * \return Returns an error handle if a compilation error was encountered.
+ */
+DART_EXPORT Dart_Handle Dart_LoadCompilationTrace(uint8_t* buffer,
+ intptr_t buffer_length);
+
+
/*
* ==============
* Precompilation
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/compilation_trace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698