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

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

Issue 296003013: - Reduce the number of Isolate::Current() calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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
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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 OS::Print("Trying to detach code.\n"); 439 OS::Print("Trying to detach code.\n");
440 } 440 }
441 page_space_controller_.set_last_code_collection_in_us(start); 441 page_space_controller_.set_last_code_collection_in_us(start);
442 return true; 442 return true;
443 } 443 }
444 return false; 444 return false;
445 } 445 }
446 446
447 447
448 void PageSpace::WriteProtectCode(bool read_only) { 448 void PageSpace::WriteProtectCode(bool read_only) {
449 // TODO(koda): Is this flag still useful?
450 if (FLAG_write_protect_code) { 449 if (FLAG_write_protect_code) {
451 HeapPage* current_page = pages_; 450 HeapPage* current_page = pages_;
452 while (current_page != NULL) { 451 while (current_page != NULL) {
453 if (current_page->type() == HeapPage::kExecutable) { 452 if (current_page->type() == HeapPage::kExecutable) {
454 current_page->WriteProtect(read_only); 453 current_page->WriteProtect(read_only);
455 } 454 }
456 current_page = NextPageAnySize(current_page); 455 current_page = NextPageAnySize(current_page);
457 } 456 }
458 } 457 }
459 } 458 }
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 return 0; 681 return 0;
683 } else { 682 } else {
684 ASSERT(total_time >= gc_time); 683 ASSERT(total_time >= gc_time);
685 int result= static_cast<int>((static_cast<double>(gc_time) / 684 int result= static_cast<int>((static_cast<double>(gc_time) /
686 static_cast<double>(total_time)) * 100); 685 static_cast<double>(total_time)) * 100);
687 return result; 686 return result;
688 } 687 }
689 } 688 }
690 689
691 } // namespace dart 690 } // namespace dart
OLDNEW
« runtime/vm/intermediate_language_arm.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698