| 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 | 767 |
| 768 if (FLAG_print_free_list_after_gc) { | 768 if (FLAG_print_free_list_after_gc) { |
| 769 OS::Print("Data Freelist (after GC):\n"); | 769 OS::Print("Data Freelist (after GC):\n"); |
| 770 freelist_[HeapPage::kData].Print(); | 770 freelist_[HeapPage::kData].Print(); |
| 771 OS::Print("Executable Freelist (after GC):\n"); | 771 OS::Print("Executable Freelist (after GC):\n"); |
| 772 freelist_[HeapPage::kExecutable].Print(); | 772 freelist_[HeapPage::kExecutable].Print(); |
| 773 } | 773 } |
| 774 | 774 |
| 775 if (FLAG_verify_after_gc) { | 775 if (FLAG_verify_after_gc) { |
| 776 OS::PrintErr("Verifying after MarkSweep..."); | 776 OS::PrintErr("Verifying after MarkSweep..."); |
| 777 heap_->Verify(); | 777 heap_->Verify(FLAG_concurrent_sweep ? kAllowMarked : kForbidMarked); |
| 778 OS::PrintErr(" done.\n"); | 778 OS::PrintErr(" done.\n"); |
| 779 } | 779 } |
| 780 | 780 |
| 781 // Done, reset the task count. | 781 // Done, reset the task count. |
| 782 { | 782 { |
| 783 MonitorLocker ml(tasks_lock()); | 783 MonitorLocker ml(tasks_lock()); |
| 784 set_tasks(tasks() - 1); | 784 set_tasks(tasks() - 1); |
| 785 ml.Notify(); | 785 ml.Notify(); |
| 786 } | 786 } |
| 787 } | 787 } |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 return 0; | 992 return 0; |
| 993 } else { | 993 } else { |
| 994 ASSERT(total_time >= gc_time); | 994 ASSERT(total_time >= gc_time); |
| 995 int result= static_cast<int>((static_cast<double>(gc_time) / | 995 int result= static_cast<int>((static_cast<double>(gc_time) / |
| 996 static_cast<double>(total_time)) * 100); | 996 static_cast<double>(total_time)) * 100); |
| 997 return result; | 997 return result; |
| 998 } | 998 } |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 } // namespace dart | 1001 } // namespace dart |
| OLD | NEW |