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

Unified Diff: runtime/vm/service_event.cc

Issue 1765563002: Stream blocks of timeline events over the service protocol (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « runtime/vm/service_event.h ('k') | runtime/vm/timeline.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service_event.cc
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc
index a172691ad1e689c4113028d45e160b0bc547eab0..502a38bf72c97d4aa4f78f4c2b6657d076ccff30 100644
--- a/runtime/vm/service_event.cc
+++ b/runtime/vm/service_event.cc
@@ -42,6 +42,7 @@ ServiceEvent::ServiceEvent(Isolate* isolate, EventKind event_kind)
embedder_stream_id_(NULL),
breakpoint_(NULL),
top_frame_(NULL),
+ timeline_event_block_(NULL),
extension_rpc_(NULL),
exception_(NULL),
at_async_jump_(false),
@@ -64,6 +65,7 @@ ServiceEvent::ServiceEvent(const DebuggerEvent* debugger_event)
kind_(TranslateEventKind(debugger_event->type())),
breakpoint_(NULL),
top_frame_(NULL),
+ timeline_event_block_(NULL),
extension_rpc_(NULL),
exception_(NULL),
at_async_jump_(false),
@@ -139,6 +141,8 @@ const char* ServiceEvent::KindAsCString() const {
return "Illegal";
case kExtension:
return "Extension";
+ case kTimelineEvents:
+ return "TimelineEvents";
default:
UNREACHABLE();
return "Unknown";
@@ -184,6 +188,9 @@ const char* ServiceEvent::stream_id() const {
case kExtension:
return Service::extension_stream.id();
+ case kTimelineEvents:
+ return Service::timeline_stream.id();
+
default:
UNREACHABLE();
return NULL;
@@ -210,6 +217,9 @@ void ServiceEvent::PrintJSON(JSONStream* js) const {
jsobj.AddProperty("breakpoint", breakpoint());
}
}
+ if (kind() == kTimelineEvents) {
+ jsobj.AddProperty("timelineEvents", timeline_event_block_);
+ }
if (kind() == kDebuggerSettingsUpdate) {
JSONObject jssettings(&jsobj, "_debuggerSettings");
isolate()->debugger()->PrintSettingsToJSONObject(&jssettings);
@@ -264,7 +274,7 @@ void ServiceEvent::PrintJSONHeader(JSONObject* jsobj) const {
jsobj->AddProperty("extensionKind",
extension_event_.event_kind->ToCString());
}
- if (kind() == kVMUpdate) {
+ if (isolate() == NULL) {
jsobj->AddPropertyVM("vm");
} else {
jsobj->AddProperty("isolate", isolate());
« no previous file with comments | « runtime/vm/service_event.h ('k') | runtime/vm/timeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698