Index: runtime/include/dart_api.h |
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h |
index 027b9379c8369f331d0705e69e0d02b3f84e84d6..9feeb00ddc7c12da693fcb14b0addaa2e79465ae 100755 |
--- a/runtime/include/dart_api.h |
+++ b/runtime/include/dart_api.h |
@@ -2895,4 +2895,76 @@ DART_EXPORT void Dart_RegisterRootServiceRequestCallback( |
void* user_data); |
+/** |
+ * Add a duration timeline event to the embedder stream for the current isolate. |
+ * |
+ * \param label The name of the event. |
+ * \param start_micros The start of the duration (in microseconds) |
+ * \param end_micros The end of the duration (in microseconds) |
+ * |
+ * NOTE: On Posix platforms you should use gettimeofday and on Windows platforms |
+ * you should use GetSystemTimeAsFileTime to get the time values. |
+ */ |
+DART_EXPORT void Dart_TimelineDuration(const char* label, |
+ int64_t start_micros, |
+ int64_t end_micros); |
+ |
+/** |
+ * Add an instant timeline event to the embedder stream for the current isolate. |
+ * |
+ * \param label The name of event. |
+ * |
+ * NOTE: On Posix platforms this call uses gettimeofday and on Windows platforms |
+ * this call uses GetSystemTimeAsFileTime to get the current time. |
siva
2015/06/12 19:50:34
This call doesn't seem to use any time value, not
Cutch
2015/06/12 23:18:56
All of these calls internally sample a clock. The
|
+ */ |
+DART_EXPORT void Dart_TimelineInstant(const char* label); |
+ |
+/** |
+ * Adds an asynchronous begin timeline event to the embedder stream for the |
+ * current isolate. |
+ * |
+ * \param label The name of event. |
+ * |
+ * \return Returns an asynchronous id that must be passed to |
+ * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd. If the asynchronous |
+ * id is less than 0 the event was not added to the timeline and subsequent |
+ * calls to Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd will become |
+ * no-ops. |
+ * |
+ * NOTE: On Posix platforms this call uses gettimeofday and on Windows platforms |
+ * this call uses GetSystemTimeAsFileTime to get the current time. |
siva
2015/06/12 19:50:34
Ditto comment about this comment.
Cutch
2015/06/12 23:18:55
Acknowledged.
|
+ */ |
+DART_EXPORT int64_t Dart_TimelineAsyncBegin(const char* label); |
+ |
+ |
+/** |
+ * Adds an asynchronous begin timeline event to the embedder stream for the |
+ * current isolate. |
siva
2015/06/12 19:50:34
The comment is wrong.
Cutch
2015/06/12 23:18:55
On 2015/06/12 19:50:34, siva wrote:
> The comment
|
+ * |
+ * \param label The name of event. |
+ * |
+ * \return Returns an asynchronous id that must be passed to |
+ * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd. |
+ * |
+ * NOTE: On Posix platforms this call uses gettimeofday and on Windows platforms |
+ * this call uses GetSystemTimeAsFileTime to get the current time. |
siva
2015/06/12 19:50:34
Ditto.
Cutch
2015/06/12 23:18:55
Acknowledged.
|
+ */ |
+DART_EXPORT void Dart_TimelineAsyncInstant(const char* label, |
+ int64_t async_id); |
siva
2015/06/12 19:50:34
Why does one have to keep passing the label in eve
Cutch
2015/06/12 23:18:56
Currently, no. I'm trying to avoid tracking open a
|
+ |
+ |
+/** |
+ * Adds an asynchronous begin timeline event to the embedder stream for the |
+ * current isolate. |
siva
2015/06/12 19:50:34
The comment is wrong
Cutch
2015/06/12 23:18:56
Done.
|
+ * |
+ * \param label The name of event. |
+ * |
+ * \return Returns an asynchronous id that must be passed to |
+ * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd. |
+ * |
+ * NOTE: On Posix platforms this call uses gettimeofday and on Windows platforms |
+ * this call uses GetSystemTimeAsFileTime to get the current time. |
siva
2015/06/12 19:50:34
Ditto.
Cutch
2015/06/12 23:18:55
Acknowledged.
|
+ */ |
+DART_EXPORT void Dart_TimelineAsyncEnd(const char* label, int64_t async_id); |
+ |
siva
2015/06/12 19:50:34
I am wondering if it makes sense to add this API f
Cutch
2015/06/12 23:18:55
Acknowledged.
|
#endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |