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

Side by Side Diff: runtime/vm/isolate.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "vm/code_observers.h" 10 #include "vm/code_observers.h"
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 heap_(NULL), 654 heap_(NULL),
655 object_store_(NULL), 655 object_store_(NULL),
656 top_exit_frame_info_(0), 656 top_exit_frame_info_(0),
657 init_callback_data_(NULL), 657 init_callback_data_(NULL),
658 environment_callback_(NULL), 658 environment_callback_(NULL),
659 library_tag_handler_(NULL), 659 library_tag_handler_(NULL),
660 api_state_(NULL), 660 api_state_(NULL),
661 debugger_(NULL), 661 debugger_(NULL),
662 single_step_(false), 662 single_step_(false),
663 resume_request_(false), 663 resume_request_(false),
664 last_resume_timestamp_(OS::GetCurrentTimeMillis()),
664 has_compiled_(false), 665 has_compiled_(false),
665 flags_(), 666 flags_(),
666 random_(), 667 random_(),
667 simulator_(NULL), 668 simulator_(NULL),
668 timer_list_(), 669 timer_list_(),
669 deopt_id_(0), 670 deopt_id_(0),
670 mutex_(new Mutex()), 671 mutex_(new Mutex()),
671 stack_limit_(0), 672 stack_limit_(0),
672 saved_stack_limit_(0), 673 saved_stack_limit_(0),
673 stack_base_(0), 674 stack_base_(0),
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 jsobj.AddFixedServiceId("isolates/%" Pd "", 1668 jsobj.AddFixedServiceId("isolates/%" Pd "",
1668 static_cast<intptr_t>(main_port())); 1669 static_cast<intptr_t>(main_port()));
1669 1670
1670 jsobj.AddProperty("name", debugger_name()); 1671 jsobj.AddProperty("name", debugger_name());
1671 jsobj.AddPropertyF("number", "%" Pd "", 1672 jsobj.AddPropertyF("number", "%" Pd "",
1672 static_cast<intptr_t>(main_port())); 1673 static_cast<intptr_t>(main_port()));
1673 if (ref) { 1674 if (ref) {
1674 return; 1675 return;
1675 } 1676 }
1676 int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond; 1677 int64_t start_time_millis = start_time() / kMicrosecondsPerMillisecond;
1677 jsobj.AddProperty64("startTime", start_time_millis); 1678 jsobj.AddPropertyTimeMillis("startTime", start_time_millis);
1678 IsolateSpawnState* state = spawn_state(); 1679 IsolateSpawnState* state = spawn_state();
1679 if (state != NULL) { 1680 if (state != NULL) {
1680 const Object& entry = Object::Handle(this, state->ResolveFunction()); 1681 const Object& entry = Object::Handle(this, state->ResolveFunction());
1681 if (!entry.IsNull() && entry.IsFunction()) { 1682 if (!entry.IsNull() && entry.IsFunction()) {
1682 Function& func = Function::Handle(this); 1683 Function& func = Function::Handle(this);
1683 func ^= entry.raw(); 1684 func ^= entry.raw();
1684 jsobj.AddProperty("entry", func); 1685 jsobj.AddProperty("entry", func);
1685 } 1686 }
1686 } 1687 }
1687 { 1688 {
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
2162 serialized_message_, serialized_message_len_); 2163 serialized_message_, serialized_message_len_);
2163 } 2164 }
2164 2165
2165 2166
2166 void IsolateSpawnState::Cleanup() { 2167 void IsolateSpawnState::Cleanup() {
2167 SwitchIsolateScope switch_scope(I); 2168 SwitchIsolateScope switch_scope(I);
2168 Dart::ShutdownIsolate(); 2169 Dart::ShutdownIsolate();
2169 } 2170 }
2170 2171
2171 } // namespace dart 2172 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698