Chromium Code Reviews| Index: runtime/vm/thread_registry.h |
| diff --git a/runtime/vm/thread_registry.h b/runtime/vm/thread_registry.h |
| index eb2d327f64ebac1a7ce8828ea3eb341fcba6baaa..2b92681ec582d3f4886cae2c7ca5d429c1fb9c23 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" |
| +#if defined(DEBUG) |
|
zra
2016/12/08 18:54:13
#ifndef PRODUCT?
bkonyi
2016/12/08 20:58:32
Done.
|
| +class JSONStream; |
| +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_; } |
| +#if defined(DEBUG) |
|
zra
2016/12/08 18:54:13
ditto
bkonyi
2016/12/08 20:58:32
Done.
|
| + void PrintJSON(JSONStream* stream, bool ref = true) const; |
|
zra
2016/12/08 18:54:13
ditto
bkonyi
2016/12/08 20:58:32
Done.
|
| +#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); |
| +#if defined(DEBUG) |
|
zra
2016/12/08 18:54:13
ditto
bkonyi
2016/12/08 20:58:32
Done.
|
| + void PrintJSONHelper(JSONArray* array, Thread* thread) const; |
| +#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_; |