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

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

Issue 816773005: Copy-on-write class table for concurrent reading. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 | Annotate | Revision Log
« runtime/vm/class_table.cc ('K') | « runtime/vm/class_table.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 "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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 726
727 // Wait for pending tasks to complete and then account for the driver task. 727 // Wait for pending tasks to complete and then account for the driver task.
728 { 728 {
729 MonitorLocker locker(tasks_lock()); 729 MonitorLocker locker(tasks_lock());
730 while (tasks() > 0) { 730 while (tasks() > 0) {
731 locker.Wait(); 731 locker.Wait();
732 } 732 }
733 set_tasks(1); 733 set_tasks(1);
734 } 734 }
735 735
736 // Perform various cleanup that relies on no tasks interfering.
737 isolate->class_table()->FreeOldTables();
738
736 NoHandleScope no_handles(isolate); 739 NoHandleScope no_handles(isolate);
737 740
738 if (FLAG_print_free_list_before_gc) { 741 if (FLAG_print_free_list_before_gc) {
739 OS::Print("Data Freelist (before GC):\n"); 742 OS::Print("Data Freelist (before GC):\n");
740 freelist_[HeapPage::kData].Print(); 743 freelist_[HeapPage::kData].Print();
741 OS::Print("Executable Freelist (before GC):\n"); 744 OS::Print("Executable Freelist (before GC):\n");
742 freelist_[HeapPage::kExecutable].Print(); 745 freelist_[HeapPage::kExecutable].Print();
743 } 746 }
744 747
745 if (FLAG_verify_before_gc) { 748 if (FLAG_verify_before_gc) {
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 return 0; 1105 return 0;
1103 } else { 1106 } else {
1104 ASSERT(total_time >= gc_time); 1107 ASSERT(total_time >= gc_time);
1105 int result = static_cast<int>((static_cast<double>(gc_time) / 1108 int result = static_cast<int>((static_cast<double>(gc_time) /
1106 static_cast<double>(total_time)) * 100); 1109 static_cast<double>(total_time)) * 100);
1107 return result; 1110 return result;
1108 } 1111 }
1109 } 1112 }
1110 1113
1111 } // namespace dart 1114 } // namespace dart
OLDNEW
« runtime/vm/class_table.cc ('K') | « runtime/vm/class_table.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698