| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 VM_SERVICE_EVENT_H_ | 5 #ifndef VM_SERVICE_EVENT_H_ |
| 6 #define VM_SERVICE_EVENT_H_ | 6 #define VM_SERVICE_EVENT_H_ |
| 7 | 7 |
| 8 #include "vm/debugger.h" | 8 #include "vm/debugger.h" |
| 9 | 9 |
| 10 class DebuggerEvent; | 10 class DebuggerEvent; |
| 11 class TimelineEventBlock; |
| 11 | 12 |
| 12 namespace dart { | 13 namespace dart { |
| 13 | 14 |
| 14 class ServiceEvent { | 15 class ServiceEvent { |
| 15 public: | 16 public: |
| 16 enum EventKind { | 17 enum EventKind { |
| 17 kVMUpdate, // VM identity information has changed | 18 kVMUpdate, // VM identity information has changed |
| 18 | 19 |
| 19 kIsolateStart, // New isolate has started | 20 kIsolateStart, // New isolate has started |
| 20 kIsolateRunnable, // Isolate is ready to run | 21 kIsolateRunnable, // Isolate is ready to run |
| (...skipping 16 matching lines...) Expand all Loading... |
| 37 kDebuggerSettingsUpdate, | 38 kDebuggerSettingsUpdate, |
| 38 | 39 |
| 39 kGC, | 40 kGC, |
| 40 | 41 |
| 41 kEmbedder, | 42 kEmbedder, |
| 42 | 43 |
| 43 kLogging, | 44 kLogging, |
| 44 | 45 |
| 45 kExtension, | 46 kExtension, |
| 46 | 47 |
| 48 kTimelineEvents, |
| 49 |
| 47 kIllegal, | 50 kIllegal, |
| 48 }; | 51 }; |
| 49 | 52 |
| 50 struct LogRecord { | 53 struct LogRecord { |
| 51 int64_t sequence_number; | 54 int64_t sequence_number; |
| 52 int64_t timestamp; | 55 int64_t timestamp; |
| 53 intptr_t level; | 56 intptr_t level; |
| 54 const String* name; | 57 const String* name; |
| 55 const String* message; | 58 const String* message; |
| 56 const Instance* zone; | 59 const Instance* zone; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 } | 179 } |
| 177 | 180 |
| 178 void set_extension_event(const ExtensionEvent& extension_event) { | 181 void set_extension_event(const ExtensionEvent& extension_event) { |
| 179 extension_event_ = extension_event; | 182 extension_event_ = extension_event; |
| 180 } | 183 } |
| 181 | 184 |
| 182 int64_t timestamp() const { | 185 int64_t timestamp() const { |
| 183 return timestamp_; | 186 return timestamp_; |
| 184 } | 187 } |
| 185 | 188 |
| 189 const TimelineEventBlock* timeline_event_block() const { |
| 190 return timeline_event_block_; |
| 191 } |
| 192 |
| 193 void set_timeline_event_block(const TimelineEventBlock* block) { |
| 194 ASSERT(kind() == kTimelineEvents); |
| 195 timeline_event_block_ = block; |
| 196 } |
| 197 |
| 186 void PrintJSON(JSONStream* js) const; | 198 void PrintJSON(JSONStream* js) const; |
| 187 | 199 |
| 188 void PrintJSONHeader(JSONObject* jsobj) const; | 200 void PrintJSONHeader(JSONObject* jsobj) const; |
| 189 | 201 |
| 190 private: | 202 private: |
| 191 Isolate* isolate_; | 203 Isolate* isolate_; |
| 192 EventKind kind_; | 204 EventKind kind_; |
| 193 const char* embedder_kind_; | 205 const char* embedder_kind_; |
| 194 const char* embedder_stream_id_; | 206 const char* embedder_stream_id_; |
| 195 Breakpoint* breakpoint_; | 207 Breakpoint* breakpoint_; |
| 196 ActivationFrame* top_frame_; | 208 ActivationFrame* top_frame_; |
| 209 const TimelineEventBlock* timeline_event_block_; |
| 197 const String* extension_rpc_; | 210 const String* extension_rpc_; |
| 198 const Object* exception_; | 211 const Object* exception_; |
| 199 bool at_async_jump_; | 212 bool at_async_jump_; |
| 200 const Object* inspectee_; | 213 const Object* inspectee_; |
| 201 const Heap::GCStats* gc_stats_; | 214 const Heap::GCStats* gc_stats_; |
| 202 const uint8_t* bytes_; | 215 const uint8_t* bytes_; |
| 203 intptr_t bytes_length_; | 216 intptr_t bytes_length_; |
| 204 LogRecord log_record_; | 217 LogRecord log_record_; |
| 205 ExtensionEvent extension_event_; | 218 ExtensionEvent extension_event_; |
| 206 int64_t timestamp_; | 219 int64_t timestamp_; |
| 207 }; | 220 }; |
| 208 | 221 |
| 209 } // namespace dart | 222 } // namespace dart |
| 210 | 223 |
| 211 #endif // VM_SERVICE_EVENT_H_ | 224 #endif // VM_SERVICE_EVENT_H_ |
| OLD | NEW |