| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 if (!is_exec) { | 204 if (!is_exec) { |
| 205 if (pages_ == NULL) { | 205 if (pages_ == NULL) { |
| 206 pages_ = page; | 206 pages_ = page; |
| 207 } else { | 207 } else { |
| 208 pages_tail_->set_next(page); | 208 pages_tail_->set_next(page); |
| 209 } | 209 } |
| 210 pages_tail_ = page; | 210 pages_tail_ = page; |
| 211 } else { | 211 } else { |
| 212 // Should not allocate executable pages when running from a precompiled | 212 // Should not allocate executable pages when running from a precompiled |
| 213 // snapshot. | 213 // snapshot. |
| 214 ASSERT(!Dart::IsRunningPrecompiledCode()); | 214 ASSERT(Dart::snapshot_kind() != Snapshot::kAppNoJIT); |
| 215 | 215 |
| 216 if (exec_pages_ == NULL) { | 216 if (exec_pages_ == NULL) { |
| 217 exec_pages_ = page; | 217 exec_pages_ = page; |
| 218 } else { | 218 } else { |
| 219 if (FLAG_write_protect_code) { | 219 if (FLAG_write_protect_code) { |
| 220 exec_pages_tail_->WriteProtect(false); | 220 exec_pages_tail_->WriteProtect(false); |
| 221 } | 221 } |
| 222 exec_pages_tail_->set_next(page); | 222 exec_pages_tail_->set_next(page); |
| 223 if (FLAG_write_protect_code) { | 223 if (FLAG_write_protect_code) { |
| 224 exec_pages_tail_->WriteProtect(true); | 224 exec_pages_tail_->WriteProtect(true); |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1236 return 0; | 1236 return 0; |
| 1237 } else { | 1237 } else { |
| 1238 ASSERT(total_time >= gc_time); | 1238 ASSERT(total_time >= gc_time); |
| 1239 int result = static_cast<int>((static_cast<double>(gc_time) / | 1239 int result = static_cast<int>((static_cast<double>(gc_time) / |
| 1240 static_cast<double>(total_time)) * 100); | 1240 static_cast<double>(total_time)) * 100); |
| 1241 return result; | 1241 return result; |
| 1242 } | 1242 } |
| 1243 } | 1243 } |
| 1244 | 1244 |
| 1245 } // namespace dart | 1245 } // namespace dart |
| OLD | NEW |