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

Unified Diff: runtime/vm/thread_registry.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, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/thread_registry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/thread_registry.cc
diff --git a/runtime/vm/thread_registry.cc b/runtime/vm/thread_registry.cc
index eb39501bc0db930332b1975252287f3673306a72..4694cc06a8771c7590f5e378d8bb171aefb851f3 100644
--- a/runtime/vm/thread_registry.cc
+++ b/runtime/vm/thread_registry.cc
@@ -105,6 +105,30 @@ void ThreadRegistry::PrintJSON(JSONStream* stream) const {
#endif
+intptr_t ThreadRegistry::CountZoneHandles() const {
+ MonitorLocker ml(threads_lock());
+ intptr_t count = 0;
+ Thread* current = active_list_;
+ while (current != NULL) {
+ count += current->CountZoneHandles();
+ current = current->next_;
+ }
+ return count;
+}
+
+
+intptr_t ThreadRegistry::CountScopedHandles() const {
+ MonitorLocker ml(threads_lock());
+ intptr_t count = 0;
+ Thread* current = active_list_;
+ while (current != NULL) {
+ count += current->CountScopedHandles();
+ current = current->next_;
+ }
+ return count;
+}
+
+
void ThreadRegistry::AddToActiveListLocked(Thread* thread) {
ASSERT(thread != NULL);
ASSERT(threads_lock()->IsOwnedByCurrentThread());
« no previous file with comments | « runtime/vm/thread_registry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698