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

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

Issue 2656723002: Moved isolate high watermark calculations into the Observatory client. (Closed)
Patch Set: Initialized _memoryHighWatermark in object.dart 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
« no previous file with comments | « runtime/vm/thread_registry.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "platform/assert.h" 5 #include "platform/assert.h"
6 #include "vm/isolate.h" 6 #include "vm/isolate.h"
7 #include "vm/lockers.h" 7 #include "vm/lockers.h"
8 #include "vm/unit_test.h" 8 #include "vm/unit_test.h"
9 #include "vm/profiler.h" 9 #include "vm/profiler.h"
10 #include "vm/safepoint.h" 10 #include "vm/safepoint.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 } 314 }
315 315
316 // Get the information for the current isolate. 316 // Get the information for the current isolate.
317 // We only need to check the current isolate since all tasks are spawned 317 // We only need to check the current isolate since all tasks are spawned
318 // inside this single isolate. 318 // inside this single isolate.
319 JSONStream stream; 319 JSONStream stream;
320 isolate->PrintJSON(&stream, false); 320 isolate->PrintJSON(&stream, false);
321 const char* json = stream.ToCString(); 321 const char* json = stream.ToCString();
322 322
323 Thread* current_thread = Thread::Current(); 323 Thread* current_thread = Thread::Current();
324 {
325 StackZone stack_zone(current_thread);
326 char* isolate_info_buf = OS::SCreate(current_thread->zone(),
327 "\"_memoryHighWatermark\":"
328 "\"%" Pu "\"",
329 isolate->memory_high_watermark());
330 EXPECT_SUBSTRING(isolate_info_buf, json);
331 }
332 324
333 // Confirm all expected entries are in the JSON output. 325 // Confirm all expected entries are in the JSON output.
334 for (intptr_t i = 0; i < kTaskCount + 1; i++) { 326 for (intptr_t i = 0; i < kTaskCount + 1; i++) {
335 Thread* thread = threads[i]; 327 Thread* thread = threads[i];
336 Zone* top_zone = thread->zone(); 328 Zone* top_zone = thread->zone();
337 329
338 StackZone stack_zone(current_thread); 330 StackZone stack_zone(current_thread);
339 Zone* current_zone = current_thread->zone(); 331 Zone* current_zone = current_thread->zone();
340 332
341 // Check that all zones are present with correct sizes. 333 // Check that all zones are present with correct sizes.
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 TransitionVMToBlocked transition(thread); 795 TransitionVMToBlocked transition(thread);
804 MonitorLocker ml(&done_monitor); 796 MonitorLocker ml(&done_monitor);
805 if (done) { 797 if (done) {
806 break; 798 break;
807 } 799 }
808 } 800 }
809 } 801 }
810 } 802 }
811 803
812 } // namespace dart 804 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/thread_registry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698