| 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; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 int64_t sequence_number; | 44 int64_t sequence_number; |
| 45 int64_t timestamp; | 45 int64_t timestamp; |
| 46 intptr_t level; | 46 intptr_t level; |
| 47 const String* name; | 47 const String* name; |
| 48 const String* message; | 48 const String* message; |
| 49 const Instance* zone; | 49 const Instance* zone; |
| 50 const Object* error; | 50 const Object* error; |
| 51 const Instance* stack_trace; | 51 const Instance* stack_trace; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 ServiceEvent(Isolate* isolate, EventKind event_kind) | 54 ServiceEvent(Isolate* isolate, EventKind event_kind); |
| 55 : isolate_(isolate), | |
| 56 kind_(event_kind), | |
| 57 embedder_kind_(NULL), | |
| 58 embedder_stream_id_(NULL), | |
| 59 breakpoint_(NULL), | |
| 60 top_frame_(NULL), | |
| 61 exception_(NULL), | |
| 62 async_continuation_(NULL), | |
| 63 at_async_jump_(false), | |
| 64 inspectee_(NULL), | |
| 65 gc_stats_(NULL), | |
| 66 bytes_(NULL), | |
| 67 bytes_length_(0) {} | |
| 68 | 55 |
| 69 explicit ServiceEvent(const DebuggerEvent* debugger_event); | 56 explicit ServiceEvent(const DebuggerEvent* debugger_event); |
| 70 | 57 |
| 71 Isolate* isolate() const { return isolate_; } | 58 Isolate* isolate() const { return isolate_; } |
| 72 | 59 |
| 73 EventKind kind() const { return kind_; } | 60 EventKind kind() const { return kind_; } |
| 74 | 61 |
| 75 const char* embedder_kind() const { return embedder_kind_; } | 62 const char* embedder_kind() const { return embedder_kind_; } |
| 76 | 63 |
| 77 const char* KindAsCString() const; | 64 const char* KindAsCString() const; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 144 |
| 158 void set_bytes(const uint8_t* bytes, intptr_t bytes_length) { | 145 void set_bytes(const uint8_t* bytes, intptr_t bytes_length) { |
| 159 bytes_ = bytes; | 146 bytes_ = bytes; |
| 160 bytes_length_ = bytes_length; | 147 bytes_length_ = bytes_length; |
| 161 } | 148 } |
| 162 | 149 |
| 163 void set_log_record(const LogRecord& log_record) { | 150 void set_log_record(const LogRecord& log_record) { |
| 164 log_record_ = log_record; | 151 log_record_ = log_record; |
| 165 } | 152 } |
| 166 | 153 |
| 154 int64_t timestamp() const { |
| 155 return timestamp_; |
| 156 } |
| 157 |
| 167 void PrintJSON(JSONStream* js) const; | 158 void PrintJSON(JSONStream* js) const; |
| 168 | 159 |
| 169 void PrintJSONHeader(JSONObject* jsobj) const; | 160 void PrintJSONHeader(JSONObject* jsobj) const; |
| 170 | 161 |
| 171 private: | 162 private: |
| 172 Isolate* isolate_; | 163 Isolate* isolate_; |
| 173 EventKind kind_; | 164 EventKind kind_; |
| 174 const char* embedder_kind_; | 165 const char* embedder_kind_; |
| 175 const char* embedder_stream_id_; | 166 const char* embedder_stream_id_; |
| 176 Breakpoint* breakpoint_; | 167 Breakpoint* breakpoint_; |
| 177 ActivationFrame* top_frame_; | 168 ActivationFrame* top_frame_; |
| 178 const Object* exception_; | 169 const Object* exception_; |
| 179 const Object* async_continuation_; | 170 const Object* async_continuation_; |
| 180 bool at_async_jump_; | 171 bool at_async_jump_; |
| 181 const Object* inspectee_; | 172 const Object* inspectee_; |
| 182 const Heap::GCStats* gc_stats_; | 173 const Heap::GCStats* gc_stats_; |
| 183 const uint8_t* bytes_; | 174 const uint8_t* bytes_; |
| 184 intptr_t bytes_length_; | 175 intptr_t bytes_length_; |
| 185 LogRecord log_record_; | 176 LogRecord log_record_; |
| 177 int64_t timestamp_; |
| 186 }; | 178 }; |
| 187 | 179 |
| 188 } // namespace dart | 180 } // namespace dart |
| 189 | 181 |
| 190 #endif // VM_SERVICE_EVENT_H_ | 182 #endif // VM_SERVICE_EVENT_H_ |
| OLD | NEW |