| OLD | NEW |
| 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 "\"type\":\"_Zone\"," | 336 "\"type\":\"_Zone\"," |
| 337 "\"capacity\":%" Pd | 337 "\"capacity\":%" Pd |
| 338 "," | 338 "," |
| 339 "\"used\":%" Pd "", | 339 "\"used\":%" Pd "", |
| 340 top_zone->SizeInBytes(), top_zone->UsedSizeInBytes()); | 340 top_zone->SizeInBytes(), top_zone->UsedSizeInBytes()); |
| 341 EXPECT_SUBSTRING(zone_info_buf, json); | 341 EXPECT_SUBSTRING(zone_info_buf, json); |
| 342 top_zone = top_zone->previous(); | 342 top_zone = top_zone->previous(); |
| 343 } | 343 } |
| 344 | 344 |
| 345 // Check the thread exists and is the correct size. | 345 // Check the thread exists and is the correct size. |
| 346 char* thread_info_buf = OS::SCreate( | 346 char* thread_info_buf = |
| 347 current_zone, | 347 OS::SCreate(current_zone, |
| 348 "\"type\":\"_Thread\"," | 348 "\"type\":\"_Thread\"," |
| 349 "\"id\":\"threads\\/%" Pd "", | 349 "\"id\":\"threads\\/%" Pd |
| 350 OSThread::ThreadIdToIntPtr(thread->os_thread()->trace_id())); | 350 "\"," |
| 351 "\"kind\":\"%s\"", |
| 352 OSThread::ThreadIdToIntPtr(thread->os_thread()->trace_id()), |
| 353 Thread::TaskKindToCString(thread->task_kind())); |
| 351 | 354 |
| 352 EXPECT_SUBSTRING(thread_info_buf, json); | 355 EXPECT_SUBSTRING(thread_info_buf, json); |
| 353 } | 356 } |
| 354 | 357 |
| 355 // Unblock the tasks so they can finish. | 358 // Unblock the tasks so they can finish. |
| 356 { | 359 { |
| 357 MonitorLocker sync_ml(&sync); | 360 MonitorLocker sync_ml(&sync); |
| 358 wait = false; | 361 wait = false; |
| 359 sync_ml.NotifyAll(); | 362 sync_ml.NotifyAll(); |
| 360 } | 363 } |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 TransitionVMToBlocked transition(thread); | 792 TransitionVMToBlocked transition(thread); |
| 790 MonitorLocker ml(&done_monitor); | 793 MonitorLocker ml(&done_monitor); |
| 791 if (done) { | 794 if (done) { |
| 792 break; | 795 break; |
| 793 } | 796 } |
| 794 } | 797 } |
| 795 } | 798 } |
| 796 } | 799 } |
| 797 | 800 |
| 798 } // namespace dart | 801 } // namespace dart |
| OLD | NEW |