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

Unified Diff: runtime/vm/thread_registry.h

Issue 2554983002: Created methods to surface zone memory information for each isolate and thread in JSON. (Closed)
Patch Set: Created methods to surface zone memory information for each isolate and thread in JSON. Created 4 years 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
Index: runtime/vm/thread_registry.h
diff --git a/runtime/vm/thread_registry.h b/runtime/vm/thread_registry.h
index eb2d327f64ebac1a7ce8828ea3eb341fcba6baaa..2ff8434363cabdca522d857d62cbd0b2eaadaf1c 100644
--- a/runtime/vm/thread_registry.h
+++ b/runtime/vm/thread_registry.h
@@ -12,6 +12,11 @@
#include "vm/stack_frame.h"
#include "vm/thread.h"
+#ifndef RELEASE
Cutch 2016/12/06 19:11:15 here too. We typically write: #if DEFINED(DEBUG)
bkonyi 2016/12/08 18:04:14 Done.
+class JSONObject;
+class JSONArray;
+#endif
+
namespace dart {
// Unordered collection of threads relating to a particular isolate.
@@ -28,6 +33,10 @@ class ThreadRegistry {
void PrepareForGC();
Thread* mutator_thread() const { return mutator_thread_; }
+#ifndef RELEASE
+ void PrintToJSONObjectLocked(JSONObject* obj);
+#endif
+
private:
Thread* active_list() const { return active_list_; }
Monitor* threads_lock() const { return threads_lock_; }
@@ -39,6 +48,10 @@ class ThreadRegistry {
Thread* GetFromFreelistLocked(Isolate* isolate);
void ReturnToFreelistLocked(Thread* thread);
+#ifndef RELEASE
+ void PrintToJSONObjectHelper(JSONArray* arr, Thread* thread);
+#endif
+
// This monitor protects the threads list for an isolate, it is used whenever
// we need to iterate over threads (both active and free) in an isolate.
Monitor* threads_lock_;

Powered by Google App Engine
This is Rietveld 408576698