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

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

Issue 2601153002: Added methods to surface number of zone and scoped handles for each isolate. (Closed)
Patch Set: Added methods to surface number of zone and scoped handles in each isolate. These values are displa… Created 3 years, 11 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
« no previous file with comments | « runtime/observatory/tests/service/get_isolate_rpc_test.dart ('k') | runtime/vm/thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/text_buffer.h" 10 #include "platform/text_buffer.h"
(...skipping 2026 matching lines...) Expand 10 before | Expand all | Expand 10 after
2037 } 2037 }
2038 } 2038 }
2039 jsobj.AddProperty("pauseEvent", &pause_event); 2039 jsobj.AddProperty("pauseEvent", &pause_event);
2040 } 2040 }
2041 2041
2042 const Library& lib = Library::Handle(object_store()->root_library()); 2042 const Library& lib = Library::Handle(object_store()->root_library());
2043 if (!lib.IsNull()) { 2043 if (!lib.IsNull()) {
2044 jsobj.AddProperty("rootLib", lib); 2044 jsobj.AddProperty("rootLib", lib);
2045 } 2045 }
2046 2046
2047 intptr_t zone_handle_count = thread_registry_->CountZoneHandles();
2048 intptr_t scoped_handle_count = thread_registry_->CountScopedHandles();
2049
2050 jsobj.AddProperty("_numZoneHandles", zone_handle_count);
2051 jsobj.AddProperty("_numScopedHandles", scoped_handle_count);
2052
2047 if (FLAG_profiler) { 2053 if (FLAG_profiler) {
2048 JSONObject tagCounters(&jsobj, "_tagCounters"); 2054 JSONObject tagCounters(&jsobj, "_tagCounters");
2049 vm_tag_counters()->PrintToJSONObject(&tagCounters); 2055 vm_tag_counters()->PrintToJSONObject(&tagCounters);
2050 } 2056 }
2051 if (Thread::Current()->sticky_error() != Object::null()) { 2057 if (Thread::Current()->sticky_error() != Object::null()) {
2052 Error& error = Error::Handle(Thread::Current()->sticky_error()); 2058 Error& error = Error::Handle(Thread::Current()->sticky_error());
2053 ASSERT(!error.IsNull()); 2059 ASSERT(!error.IsNull());
2054 jsobj.AddProperty("error", error, false); 2060 jsobj.AddProperty("error", error, false);
2055 } else if (sticky_error() != Object::null()) { 2061 } else if (sticky_error() != Object::null()) {
2056 Error& error = Error::Handle(sticky_error()); 2062 Error& error = Error::Handle(sticky_error());
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2948 void IsolateSpawnState::DecrementSpawnCount() { 2954 void IsolateSpawnState::DecrementSpawnCount() {
2949 ASSERT(spawn_count_monitor_ != NULL); 2955 ASSERT(spawn_count_monitor_ != NULL);
2950 ASSERT(spawn_count_ != NULL); 2956 ASSERT(spawn_count_ != NULL);
2951 MonitorLocker ml(spawn_count_monitor_); 2957 MonitorLocker ml(spawn_count_monitor_);
2952 ASSERT(*spawn_count_ > 0); 2958 ASSERT(*spawn_count_ > 0);
2953 *spawn_count_ = *spawn_count_ - 1; 2959 *spawn_count_ = *spawn_count_ - 1;
2954 ml.Notify(); 2960 ml.Notify();
2955 } 2961 }
2956 2962
2957 } // namespace dart 2963 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/get_isolate_rpc_test.dart ('k') | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698