| Index: runtime/vm/thread_registry.cc
|
| diff --git a/runtime/vm/thread_registry.cc b/runtime/vm/thread_registry.cc
|
| index eb39501bc0db930332b1975252287f3673306a72..15c8d6e08d53754d92c9e16cde9422c7cd2ceae4 100644
|
| --- a/runtime/vm/thread_registry.cc
|
| +++ b/runtime/vm/thread_registry.cc
|
| @@ -146,6 +146,7 @@ Thread* ThreadRegistry::GetFromFreelistLocked(Isolate* isolate) {
|
| return thread;
|
| }
|
|
|
| +
|
| void ThreadRegistry::ReturnToFreelistLocked(Thread* thread) {
|
| ASSERT(thread != NULL);
|
| ASSERT(thread->os_thread_ == NULL);
|
| @@ -157,4 +158,16 @@ void ThreadRegistry::ReturnToFreelistLocked(Thread* thread) {
|
| free_list_ = thread;
|
| }
|
|
|
| +
|
| +uintptr_t ThreadRegistry::ThreadHighWatermarksTotalLocked() const {
|
| + ASSERT(threads_lock()->IsOwnedByCurrentThread());
|
| + uintptr_t memory_high_watermarks_total = 0;
|
| + Thread* current = active_list_;
|
| + while (current != NULL) {
|
| + memory_high_watermarks_total += current->memory_high_watermark();
|
| + current = current->next_;
|
| + }
|
| + return memory_high_watermarks_total;
|
| +}
|
| +
|
| } // namespace dart
|
|
|