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

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

Issue 716403003: Concurrent sweep on x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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/assembler_x64.cc ('k') | runtime/vm/stub_code_x64.cc » ('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 18 matching lines...) Expand all
29 DEFINE_FLAG(bool, print_free_list_after_gc, false, 29 DEFINE_FLAG(bool, print_free_list_after_gc, false,
30 "Print free list statistics after a GC"); 30 "Print free list statistics after a GC");
31 DEFINE_FLAG(bool, collect_code, true, 31 DEFINE_FLAG(bool, collect_code, true,
32 "Attempt to GC infrequently used code."); 32 "Attempt to GC infrequently used code.");
33 DEFINE_FLAG(int, code_collection_interval_in_us, 30000000, 33 DEFINE_FLAG(int, code_collection_interval_in_us, 30000000,
34 "Time between attempts to collect unused code."); 34 "Time between attempts to collect unused code.");
35 DEFINE_FLAG(bool, log_code_drop, false, 35 DEFINE_FLAG(bool, log_code_drop, false,
36 "Emit a log message when pointers to unused code are dropped."); 36 "Emit a log message when pointers to unused code are dropped.");
37 DEFINE_FLAG(bool, always_drop_code, false, 37 DEFINE_FLAG(bool, always_drop_code, false,
38 "Always try to drop code if the function's usage counter is >= 0"); 38 "Always try to drop code if the function's usage counter is >= 0");
39 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM) 39 #if defined(TARGET_ARCH_MIPS) || defined(TARGET_ARCH_ARM64)
40 DEFINE_FLAG(bool, concurrent_sweep, false,
41 "Concurrent sweep for old generation.");
42 #else // TARGET_ARCH_MIPS || TARGET_ARCH_ARM64
40 DEFINE_FLAG(bool, concurrent_sweep, true, 43 DEFINE_FLAG(bool, concurrent_sweep, true,
41 "Concurrent sweep for old generation."); 44 "Concurrent sweep for old generation.");
42 #else // TARGET_ARCH_IA32 || TARGET_ARCH_ARM 45 #endif // TARGET_ARCH_MIPS || TARGET_ARCH_ARM64
43 DEFINE_FLAG(bool, concurrent_sweep, false,
44 "Concurrent sweep for old generation.");
45 #endif // TARGET_ARCH_IA32 || TARGET_ARCH_ARM
46 DEFINE_FLAG(bool, log_growth, false, "Log PageSpace growth policy decisions."); 46 DEFINE_FLAG(bool, log_growth, false, "Log PageSpace growth policy decisions.");
47 47
48 HeapPage* HeapPage::Initialize(VirtualMemory* memory, PageType type) { 48 HeapPage* HeapPage::Initialize(VirtualMemory* memory, PageType type) {
49 ASSERT(memory->size() > VirtualMemory::PageSize()); 49 ASSERT(memory->size() > VirtualMemory::PageSize());
50 bool is_executable = (type == kExecutable); 50 bool is_executable = (type == kExecutable);
51 memory->Commit(is_executable); 51 memory->Commit(is_executable);
52 52
53 HeapPage* result = reinterpret_cast<HeapPage*>(memory->address()); 53 HeapPage* result = reinterpret_cast<HeapPage*>(memory->address());
54 result->memory_ = memory; 54 result->memory_ = memory;
55 result->next_ = NULL; 55 result->next_ = NULL;
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 return 0; 1001 return 0;
1002 } else { 1002 } else {
1003 ASSERT(total_time >= gc_time); 1003 ASSERT(total_time >= gc_time);
1004 int result= static_cast<int>((static_cast<double>(gc_time) / 1004 int result= static_cast<int>((static_cast<double>(gc_time) /
1005 static_cast<double>(total_time)) * 100); 1005 static_cast<double>(total_time)) * 100);
1006 return result; 1006 return result;
1007 } 1007 }
1008 } 1008 }
1009 1009
1010 } // namespace dart 1010 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698