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

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

Issue 1024063003: Eliminate fake-Isolate workaround from concurrent sweeper. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/raw_object.h » ('j') | 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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 789
790 int64_t mid2 = OS::GetCurrentTimeMicros(); 790 int64_t mid2 = OS::GetCurrentTimeMicros();
791 int64_t mid3 = 0; 791 int64_t mid3 = 0;
792 792
793 { 793 {
794 if (FLAG_verify_before_gc) { 794 if (FLAG_verify_before_gc) {
795 OS::PrintErr("Verifying before sweeping..."); 795 OS::PrintErr("Verifying before sweeping...");
796 heap_->Verify(kAllowMarked); 796 heap_->Verify(kAllowMarked);
797 OS::PrintErr(" done.\n"); 797 OS::PrintErr(" done.\n");
798 } 798 }
799 GCSweeper sweeper; 799 GCSweeper sweeper(isolate->class_table());
800 800
801 // During stop-the-world phases we should use bulk lock when adding elements 801 // During stop-the-world phases we should use bulk lock when adding elements
802 // to the free list. 802 // to the free list.
803 MutexLocker mld(freelist_[HeapPage::kData].mutex()); 803 MutexLocker mld(freelist_[HeapPage::kData].mutex());
804 MutexLocker mle(freelist_[HeapPage::kExecutable].mutex()); 804 MutexLocker mle(freelist_[HeapPage::kExecutable].mutex());
805 805
806 // Large and executable pages are always swept immediately. 806 // Large and executable pages are always swept immediately.
807 HeapPage* prev_page = NULL; 807 HeapPage* prev_page = NULL;
808 HeapPage* page = large_pages_; 808 HeapPage* page = large_pages_;
809 while (page != NULL) { 809 while (page != NULL) {
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 return 0; 1117 return 0;
1118 } else { 1118 } else {
1119 ASSERT(total_time >= gc_time); 1119 ASSERT(total_time >= gc_time);
1120 int result = static_cast<int>((static_cast<double>(gc_time) / 1120 int result = static_cast<int>((static_cast<double>(gc_time) /
1121 static_cast<double>(total_time)) * 100); 1121 static_cast<double>(total_time)) * 100);
1122 return result; 1122 return result;
1123 } 1123 }
1124 } 1124 }
1125 1125
1126 } // namespace dart 1126 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698