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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
3 * for details. All rights reserved. Use of this source code is governed by a 3 * for details. All rights reserved. Use of this source code is governed by a
4 * BSD-style license that can be found in the LICENSE file. 4 * BSD-style license that can be found in the LICENSE file.
5 */ 5 */
6 6
7 #ifndef RUNTIME_INCLUDE_DART_API_H_ 7 #ifndef RUNTIME_INCLUDE_DART_API_H_
8 #define RUNTIME_INCLUDE_DART_API_H_ 8 #define RUNTIME_INCLUDE_DART_API_H_
9 9
10 /** \mainpage Dart Embedding API Reference 10 /** \mainpage Dart Embedding API Reference
(...skipping 3176 matching lines...) Expand 10 before | Expand all | Expand 10 after
3187 3187
3188 /** 3188 /**
3189 * Returns the port that script load requests should be sent on. 3189 * Returns the port that script load requests should be sent on.
3190 * 3190 *
3191 * \return Returns the port for load requests or ILLEGAL_PORT if the service 3191 * \return Returns the port for load requests or ILLEGAL_PORT if the service
3192 * isolate failed to startup or does not support load requests. 3192 * isolate failed to startup or does not support load requests.
3193 */ 3193 */
3194 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort(); 3194 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort();
3195 3195
3196 3196
3197 /**
3198 * Record all functions which have been compiled in the current isolate.
3199 *
3200 * \param buffer Returns a pointer to a buffer containing the trace.
3201 * This buffer is scope allocated and is only valid until the next call to
3202 * Dart_ExitScope.
3203 * \param size Returns the size of the buffer.
3204 * \return Returns an valid handle upon success.
3205 */
3206 DART_EXPORT Dart_Handle Dart_SaveCompilationTrace(uint8_t** buffer,
3207 intptr_t* buffer_length);
3208
3209
3210 /**
3211 * Compile all functions from data from Dart_SaveCompilationTrace. Unlike JIT
3212 * feedback, this data is fuzzy: loading does not need to happen in the exact
3213 * program that was saved, the saver and loader do not need to agree on checked
3214 * mode versus production mode or debug/release/product.
3215 *
3216 * \return Returns an error handle if a compilation error was encountered.
3217 */
3218 DART_EXPORT Dart_Handle Dart_LoadCompilationTrace(uint8_t* buffer,
3219 intptr_t buffer_length);
3220
3221
3197 /* 3222 /*
3198 * ============== 3223 * ==============
3199 * Precompilation 3224 * Precompilation
3200 * ============== 3225 * ==============
3201 */ 3226 */
3202 3227
3228
3203 /** 3229 /**
3204 * Saves a serialized version of the information collected for use by the 3230 * Saves a serialized version of the information collected for use by the
3205 * optimizing compiler, such as type feedback and usage counters. When this 3231 * optimizing compiler, such as type feedback and usage counters. When this
3206 * information is passed to Dart_Precompile, the AOT compiler may use it to 3232 * information is passed to Dart_Precompile, the AOT compiler may use it to
3207 * produce faster and smaller code. The feedback is only used if the JIT that 3233 * produce faster and smaller code. The feedback is only used if the JIT that
3208 * created it and the AOT compiler consuming it 3234 * created it and the AOT compiler consuming it
3209 * - are running the same Dart program 3235 * - are running the same Dart program
3210 * - are built from the same version of the VM 3236 * - are built from the same version of the VM
3211 * - agree on whether type checks and assertions are enabled 3237 * - agree on whether type checks and assertions are enabled
3212 * 3238 *
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
3353 */ 3379 */
3354 DART_EXPORT bool Dart_IsPrecompiledRuntime(); 3380 DART_EXPORT bool Dart_IsPrecompiledRuntime();
3355 3381
3356 3382
3357 /** 3383 /**
3358 * Print a native stack trace. Used for crash handling. 3384 * Print a native stack trace. Used for crash handling.
3359 */ 3385 */
3360 DART_EXPORT void Dart_DumpNativeStackTrace(void* context); 3386 DART_EXPORT void Dart_DumpNativeStackTrace(void* context);
3361 3387
3362 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ 3388 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
OLDNEW
« 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