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

Side by Side Diff: runtime/vm/debugger.cc

Issue 1311503004: Remember when an isolate was paused and subtly display it in Obseravatory (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include "vm/debugger.h" 5 #include "vm/debugger.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 context_level_(-1), 227 context_level_(-1),
228 deopt_frame_(Array::ZoneHandle(deopt_frame.raw())), 228 deopt_frame_(Array::ZoneHandle(deopt_frame.raw())),
229 deopt_frame_offset_(deopt_frame_offset), 229 deopt_frame_offset_(deopt_frame_offset),
230 vars_initialized_(false), 230 vars_initialized_(false),
231 var_descriptors_(LocalVarDescriptors::ZoneHandle()), 231 var_descriptors_(LocalVarDescriptors::ZoneHandle()),
232 desc_indices_(8), 232 desc_indices_(8),
233 pc_desc_(PcDescriptors::ZoneHandle()) { 233 pc_desc_(PcDescriptors::ZoneHandle()) {
234 } 234 }
235 235
236 236
237 void DebuggerEvent::UpdateTimestamp() {
238 timestamp_ = OS::GetCurrentTimeMillis();
239 }
240
241
237 bool Debugger::HasEventHandler() { 242 bool Debugger::HasEventHandler() {
238 return ((event_handler_ != NULL) || 243 return ((event_handler_ != NULL) ||
239 Service::isolate_stream.enabled() || 244 Service::isolate_stream.enabled() ||
240 Service::debug_stream.enabled()); 245 Service::debug_stream.enabled());
241 } 246 }
242 247
243 248
244 static bool ServiceNeedsDebuggerEvent(DebuggerEvent::EventType type) { 249 static bool ServiceNeedsDebuggerEvent(DebuggerEvent::EventType type) {
245 switch (type) { 250 switch (type) {
246 case DebuggerEvent::kBreakpointResolved: 251 case DebuggerEvent::kBreakpointResolved:
(...skipping 2060 matching lines...) Expand 10 before | Expand all | Expand 10 after
2307 void Debugger::SetEventHandler(EventHandler* handler) { 2312 void Debugger::SetEventHandler(EventHandler* handler) {
2308 event_handler_ = handler; 2313 event_handler_ = handler;
2309 } 2314 }
2310 2315
2311 2316
2312 void Debugger::Pause(DebuggerEvent* event) { 2317 void Debugger::Pause(DebuggerEvent* event) {
2313 ASSERT(!IsPaused()); // No recursive pausing. 2318 ASSERT(!IsPaused()); // No recursive pausing.
2314 ASSERT(obj_cache_ == NULL); 2319 ASSERT(obj_cache_ == NULL);
2315 2320
2316 pause_event_ = event; 2321 pause_event_ = event;
2322 pause_event_->UpdateTimestamp();
2317 obj_cache_ = new RemoteObjectCache(64); 2323 obj_cache_ = new RemoteObjectCache(64);
2318 2324
2319 InvokeEventHandler(event); 2325 InvokeEventHandler(event);
2320 2326
2321 pause_event_ = NULL; 2327 pause_event_ = NULL;
2322 obj_cache_ = NULL; // Zone allocated 2328 obj_cache_ = NULL; // Zone allocated
2323 } 2329 }
2324 2330
2325 2331
2326 void Debugger::EnterSingleStepMode() { 2332 void Debugger::EnterSingleStepMode() {
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
3018 } 3024 }
3019 3025
3020 3026
3021 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { 3027 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) {
3022 ASSERT(bpt->next() == NULL); 3028 ASSERT(bpt->next() == NULL);
3023 bpt->set_next(code_breakpoints_); 3029 bpt->set_next(code_breakpoints_);
3024 code_breakpoints_ = bpt; 3030 code_breakpoints_ = bpt;
3025 } 3031 }
3026 3032
3027 } // namespace dart 3033 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/isolate.h » ('j') | runtime/vm/service/service.md » ('J')

Powered by Google App Engine
This is Rietveld 408576698