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

Side by Side Diff: runtime/include/dart_tools_api.h

Issue 1377663002: Add Timeline to dart:developer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | runtime/lib/developer_sources.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef INCLUDE_DART_TOOLS_API_H_ 5 #ifndef INCLUDE_DART_TOOLS_API_H_
6 #define INCLUDE_DART_TOOLS_API_H_ 6 #define INCLUDE_DART_TOOLS_API_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 /** \mainpage Dart Tools Embedding API Reference 10 /** \mainpage Dart Tools Embedding API Reference
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 * passing into the timeline system. 884 * passing into the timeline system.
885 * 885 *
886 * \return A timestamp that can be passed to the timeline system. 886 * \return A timestamp that can be passed to the timeline system.
887 */ 887 */
888 DART_EXPORT int64_t Dart_TimelineGetMicros(); 888 DART_EXPORT int64_t Dart_TimelineGetMicros();
889 889
890 /** Timeline stream for Dart API calls */ 890 /** Timeline stream for Dart API calls */
891 #define DART_TIMELINE_STREAM_API (1 << 0) 891 #define DART_TIMELINE_STREAM_API (1 << 0)
892 /** Timeline stream for compiler events */ 892 /** Timeline stream for compiler events */
893 #define DART_TIMELINE_STREAM_COMPILER (1 << 1) 893 #define DART_TIMELINE_STREAM_COMPILER (1 << 1)
894 /** Timeline stream for Dart provided events */
895 #define DART_TIMELINE_STREAM_DART (1 << 2)
894 /** Timeline stream for embedder provided events */ 896 /** Timeline stream for embedder provided events */
895 #define DART_TIMELINE_STREAM_EMBEDDER (1 << 2) 897 #define DART_TIMELINE_STREAM_EMBEDDER (1 << 3)
896 /** Timeline stream for GC events */ 898 /** Timeline stream for GC events */
897 #define DART_TIMELINE_STREAM_GC (1 << 3) 899 #define DART_TIMELINE_STREAM_GC (1 << 4)
898 /** Timeline stream for isolate events */ 900 /** Timeline stream for isolate events */
899 #define DART_TIMELINE_STREAM_ISOLATE (1 << 4) 901 #define DART_TIMELINE_STREAM_ISOLATE (1 << 5)
900 902
901 /** Timeline stream for VM events */ 903 /** Timeline stream for VM events */
902 #define DART_TIMELINE_STREAM_VM (1 << 5) 904 #define DART_TIMELINE_STREAM_VM (1 << 6)
903 905
904 /** Enable all timeline stream recording for an isolate */ 906 /** Enable all timeline stream recording for an isolate */
905 #define DART_TIMELINE_STREAM_ALL (DART_TIMELINE_STREAM_API | \ 907 #define DART_TIMELINE_STREAM_ALL (DART_TIMELINE_STREAM_API | \
906 DART_TIMELINE_STREAM_COMPILER | \ 908 DART_TIMELINE_STREAM_COMPILER | \
909 DART_TIMELINE_STREAM_DART | \
907 DART_TIMELINE_STREAM_EMBEDDER | \ 910 DART_TIMELINE_STREAM_EMBEDDER | \
908 DART_TIMELINE_STREAM_GC | \ 911 DART_TIMELINE_STREAM_GC | \
909 DART_TIMELINE_STREAM_ISOLATE) 912 DART_TIMELINE_STREAM_ISOLATE)
910 913
911 /** Disable all timeline stream recording */ 914 /** Disable all timeline stream recording */
912 #define DART_TIMELINE_STREAM_DISABLE 0 915 #define DART_TIMELINE_STREAM_DISABLE 0
913 916
914 /** 917 /**
915 * Start recording timeline events for the current isolate. 918 * Start recording timeline events for the current isolate.
916 * 919 *
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 * 962 *
960 * For each chunk of data the state will be DART_STREAM_CONSUMER_STATE_DATA 963 * For each chunk of data the state will be DART_STREAM_CONSUMER_STATE_DATA
961 * and buffer will not be NULL. 964 * and buffer will not be NULL.
962 * 965 *
963 * At the end of each stream state will be DART_STREAM_CONSUMER_STATE_FINISH 966 * At the end of each stream state will be DART_STREAM_CONSUMER_STATE_FINISH
964 * and buffer will be NULL. 967 * and buffer will be NULL.
965 */ 968 */
966 typedef void (*Dart_StreamConsumer)( 969 typedef void (*Dart_StreamConsumer)(
967 Dart_StreamConsumer_State state, 970 Dart_StreamConsumer_State state,
968 const char* stream_name, 971 const char* stream_name,
969 uint8_t* buffer, 972 const uint8_t* buffer,
970 intptr_t buffer_length, 973 intptr_t buffer_length,
971 void* stream_callback_data); 974 void* stream_callback_data);
972 975
973 976
974 /** 977 /**
975 * Get the timeline for the current isolate in trace-event format 978 * Get the timeline for the current isolate in trace-event format
976 * 979 *
977 * \param consumer A Dart_StreamConsumer. 980 * \param consumer A Dart_StreamConsumer.
978 * \param user_data User data passed into consumer. 981 * \param user_data User data passed into consumer.
979 * 982 *
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 * 1068 *
1066 * \return Returns an asynchronous id that must be passed to 1069 * \return Returns an asynchronous id that must be passed to
1067 * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd. 1070 * Dart_TimelineAsyncInstant and Dart_TimelineAsyncEnd.
1068 * 1071 *
1069 * NOTE: All timestamps should be acquired from Dart_TimelineGetMicros. 1072 * NOTE: All timestamps should be acquired from Dart_TimelineGetMicros.
1070 */ 1073 */
1071 DART_EXPORT Dart_Handle Dart_TimelineAsyncEnd(const char* label, 1074 DART_EXPORT Dart_Handle Dart_TimelineAsyncEnd(const char* label,
1072 int64_t async_id); 1075 int64_t async_id);
1073 1076
1074 #endif // INCLUDE_DART_TOOLS_API_H_ 1077 #endif // INCLUDE_DART_TOOLS_API_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/developer_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698