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

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

Issue 2656723002: Moved isolate high watermark calculations into the Observatory client. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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/thread_registry.h" 5 #include "vm/thread_registry.h"
6 6
7 #include "vm/isolate.h" 7 #include "vm/isolate.h"
8 #include "vm/json_stream.h" 8 #include "vm/json_stream.h"
9 #include "vm/lockers.h" 9 #include "vm/lockers.h"
10 10
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 ASSERT(thread != NULL); 188 ASSERT(thread != NULL);
189 ASSERT(thread->os_thread_ == NULL); 189 ASSERT(thread->os_thread_ == NULL);
190 ASSERT(thread->isolate_ == NULL); 190 ASSERT(thread->isolate_ == NULL);
191 ASSERT(thread->heap_ == NULL); 191 ASSERT(thread->heap_ == NULL);
192 ASSERT(threads_lock()->IsOwnedByCurrentThread()); 192 ASSERT(threads_lock()->IsOwnedByCurrentThread());
193 // Add thread to the free list. 193 // Add thread to the free list.
194 thread->next_ = free_list_; 194 thread->next_ = free_list_;
195 free_list_ = thread; 195 free_list_ = thread;
196 } 196 }
197 197
198
199 uintptr_t ThreadRegistry::ThreadHighWatermarksTotalLocked() const {
200 ASSERT(threads_lock()->IsOwnedByCurrentThread());
201 uintptr_t memory_high_watermarks_total = 0;
202 Thread* current = active_list_;
203 while (current != NULL) {
204 memory_high_watermarks_total += current->memory_high_watermark();
205 current = current->next_;
206 }
207 return memory_high_watermarks_total;
208 }
209
210 } // namespace dart 198 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698