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

Unified Diff: runtime/include/dart_api.h

Issue 2922913004: Add Dart_Save/LoadCompilationTrace. (Closed)
Patch Set: zone 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
Index: runtime/include/dart_api.h
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index 1fc94b8e1748499ca4f636b56b95424b516af571..f9ea819503d5b98afa0210dea81752e60c5e1ce3 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -3194,12 +3194,38 @@ 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
* ==============
*/
+
/**
* Saves a serialized version of the information collected for use by the
* optimizing compiler, such as type feedback and usage counters. When this
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698