Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 36 kDebuggerSettingsUpdate, | 37 kDebuggerSettingsUpdate, |
| 37 | 38 |
| 38 kGC, | 39 kGC, |
| 39 | 40 |
| 40 kEmbedder, | 41 kEmbedder, |
| 41 | 42 |
| 42 kLogging, | 43 kLogging, |
| 43 | 44 |
| 44 kExtension, | 45 kExtension, |
| 45 | 46 |
| 47 kTimelineEvents, | |
| 48 | |
| 46 kIllegal, | 49 kIllegal, |
| 47 }; | 50 }; |
| 48 | 51 |
| 49 struct LogRecord { | 52 struct LogRecord { |
| 50 int64_t sequence_number; | 53 int64_t sequence_number; |
| 51 int64_t timestamp; | 54 int64_t timestamp; |
| 52 intptr_t level; | 55 intptr_t level; |
| 53 const String* name; | 56 const String* name; |
| 54 const String* message; | 57 const String* message; |
| 55 const Instance* zone; | 58 const Instance* zone; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 } | 178 } |
| 176 | 179 |
| 177 void set_extension_event(const ExtensionEvent& extension_event) { | 180 void set_extension_event(const ExtensionEvent& extension_event) { |
| 178 extension_event_ = extension_event; | 181 extension_event_ = extension_event; |
| 179 } | 182 } |
| 180 | 183 |
| 181 int64_t timestamp() const { | 184 int64_t timestamp() const { |
| 182 return timestamp_; | 185 return timestamp_; |
| 183 } | 186 } |
| 184 | 187 |
| 188 TimelineEventBlock* timeline_event_block() const { | |
| 189 return timeline_event_block_; | |
| 190 } | |
| 191 | |
| 192 void set_timeline_event_block(TimelineEventBlock* block) { | |
| 193 ASSERT(kind() == kTimelineEvents); | |
| 194 timeline_event_block_ = block; | |
| 195 } | |
| 196 | |
| 185 void PrintJSON(JSONStream* js) const; | 197 void PrintJSON(JSONStream* js) const; |
| 186 | 198 |
| 187 void PrintJSONHeader(JSONObject* jsobj) const; | 199 void PrintJSONHeader(JSONObject* jsobj) const; |
| 188 | 200 |
| 189 private: | 201 private: |
| 190 Isolate* isolate_; | 202 Isolate* isolate_; |
| 191 EventKind kind_; | 203 EventKind kind_; |
| 192 const char* embedder_kind_; | 204 const char* embedder_kind_; |
| 193 const char* embedder_stream_id_; | 205 const char* embedder_stream_id_; |
| 194 Breakpoint* breakpoint_; | 206 Breakpoint* breakpoint_; |
| 195 ActivationFrame* top_frame_; | 207 ActivationFrame* top_frame_; |
| 208 TimelineEventBlock* timeline_event_block_; | |
|
turnidge
2016/03/03 19:18:16
Out of curiosity, can this be const?
Cutch
2016/03/03 19:43:25
Done.
| |
| 196 const String* extension_rpc_; | 209 const String* extension_rpc_; |
| 197 const Object* exception_; | 210 const Object* exception_; |
| 198 bool at_async_jump_; | 211 bool at_async_jump_; |
| 199 const Object* inspectee_; | 212 const Object* inspectee_; |
| 200 const Heap::GCStats* gc_stats_; | 213 const Heap::GCStats* gc_stats_; |
| 201 const uint8_t* bytes_; | 214 const uint8_t* bytes_; |
| 202 intptr_t bytes_length_; | 215 intptr_t bytes_length_; |
| 203 LogRecord log_record_; | 216 LogRecord log_record_; |
| 204 ExtensionEvent extension_event_; | 217 ExtensionEvent extension_event_; |
| 205 int64_t timestamp_; | 218 int64_t timestamp_; |
| 206 }; | 219 }; |
| 207 | 220 |
| 208 } // namespace dart | 221 } // namespace dart |
| 209 | 222 |
| 210 #endif // VM_SERVICE_EVENT_H_ | 223 #endif // VM_SERVICE_EVENT_H_ |
| OLD | NEW |