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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2140383002: Guard some of the timeline API functions under #ifndef PRODUCT ... #endif as the windows compiler d… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address code review comments. Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index c9942da9bbb1ca83b5b46150f69ace77b5136541..042b5b5c90cb8e6b99be1bb0b5ad3a8ca373750a 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -5867,13 +5867,52 @@ DART_EXPORT Dart_Handle Dart_SetServiceStreamCallbacks(
}
+DART_EXPORT int64_t Dart_TimelineGetMicros() {
+ return OS::GetCurrentMonotonicMicros();
+}
+
+
+#if defined(PRODUCT)
DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id,
const char* event_kind,
const uint8_t* bytes,
intptr_t bytes_length) {
-#if defined(PRODUCT)
return Api::Success();
+}
+
+
+DART_EXPORT void Dart_GlobalTimelineSetRecordedStreams(int64_t stream_mask) {
+ return;
+}
+
+
+DART_EXPORT void Dart_SetEmbedderTimelineCallbacks(
+ Dart_EmbedderTimelineStartRecording start_recording,
+ Dart_EmbedderTimelineStopRecording stop_recording) {
+ return;
+}
+
+
+DART_EXPORT bool Dart_GlobalTimelineGetTrace(Dart_StreamConsumer consumer,
+ void* user_data) {
+ return false;
+}
+
+
+DART_EXPORT void Dart_TimelineEvent(const char* label,
+ int64_t timestamp0,
+ int64_t timestamp1_or_async_id,
+ Dart_Timeline_Event_Type type,
+ intptr_t argument_count,
+ const char** argument_names,
+ const char** argument_values) {
+ return;
+}
#else // defined(PRODUCT)
+DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id,
+ const char* event_kind,
+ const uint8_t* bytes,
+ intptr_t bytes_length) {
DARTSCOPE(Thread::Current());
Isolate* I = T->isolate();
if (stream_id == NULL) {
@@ -5892,12 +5931,6 @@ DART_EXPORT Dart_Handle Dart_ServiceSendDataEvent(const char* stream_id,
Service::SendEmbedderEvent(I, stream_id, event_kind,
bytes, bytes_length);
return Api::Success();
-#endif // defined(PRODUCT)
-}
-
-
-DART_EXPORT int64_t Dart_TimelineGetMicros() {
- return OS::GetCurrentMonotonicMicros();
}
@@ -6125,6 +6158,7 @@ DART_EXPORT void Dart_TimelineEvent(const char* label,
}
event->Complete();
}
+#endif // defined(PRODUCT)
DART_EXPORT void Dart_SetThreadName(const char* name) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698