| 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 "vm/pages.h" | 5 #include "vm/pages.h" |
| 6 | 6 |
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "vm/compiler_stats.h" | 8 #include "vm/compiler_stats.h" |
| 9 #include "vm/gc_marker.h" | 9 #include "vm/gc_marker.h" |
| 10 #include "vm/gc_sweeper.h" | 10 #include "vm/gc_sweeper.h" |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 MonitorLocker locker(tasks_lock()); | 764 MonitorLocker locker(tasks_lock()); |
| 765 while (tasks() > 0) { | 765 while (tasks() > 0) { |
| 766 locker.Wait(); | 766 locker.Wait(); |
| 767 } | 767 } |
| 768 set_tasks(1); | 768 set_tasks(1); |
| 769 } | 769 } |
| 770 | 770 |
| 771 // Perform various cleanup that relies on no tasks interfering. | 771 // Perform various cleanup that relies on no tasks interfering. |
| 772 isolate->class_table()->FreeOldTables(); | 772 isolate->class_table()->FreeOldTables(); |
| 773 | 773 |
| 774 NoHandleScope no_handles(isolate); | 774 NoSafepointScope no_safepoints; |
| 775 | 775 |
| 776 if (FLAG_print_free_list_before_gc) { | 776 if (FLAG_print_free_list_before_gc) { |
| 777 OS::Print("Data Freelist (before GC):\n"); | 777 OS::Print("Data Freelist (before GC):\n"); |
| 778 freelist_[HeapPage::kData].Print(); | 778 freelist_[HeapPage::kData].Print(); |
| 779 OS::Print("Executable Freelist (before GC):\n"); | 779 OS::Print("Executable Freelist (before GC):\n"); |
| 780 freelist_[HeapPage::kExecutable].Print(); | 780 freelist_[HeapPage::kExecutable].Print(); |
| 781 } | 781 } |
| 782 | 782 |
| 783 if (FLAG_verify_before_gc) { | 783 if (FLAG_verify_before_gc) { |
| 784 OS::PrintErr("Verifying before marking..."); | 784 OS::PrintErr("Verifying before marking..."); |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 return 0; | 1138 return 0; |
| 1139 } else { | 1139 } else { |
| 1140 ASSERT(total_time >= gc_time); | 1140 ASSERT(total_time >= gc_time); |
| 1141 int result = static_cast<int>((static_cast<double>(gc_time) / | 1141 int result = static_cast<int>((static_cast<double>(gc_time) / |
| 1142 static_cast<double>(total_time)) * 100); | 1142 static_cast<double>(total_time)) * 100); |
| 1143 return result; | 1143 return result; |
| 1144 } | 1144 } |
| 1145 } | 1145 } |
| 1146 | 1146 |
| 1147 } // namespace dart | 1147 } // namespace dart |
| OLD | NEW |