| 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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 UpdateMaxUsed(); | 962 UpdateMaxUsed(); |
| 963 if (heap_ != NULL) { | 963 if (heap_ != NULL) { |
| 964 heap_->UpdateGlobalMaxUsed(); | 964 heap_->UpdateGlobalMaxUsed(); |
| 965 } | 965 } |
| 966 } | 966 } |
| 967 | 967 |
| 968 // Done, reset the task count. | 968 // Done, reset the task count. |
| 969 { | 969 { |
| 970 MonitorLocker ml(tasks_lock()); | 970 MonitorLocker ml(tasks_lock()); |
| 971 set_tasks(tasks() - 1); | 971 set_tasks(tasks() - 1); |
| 972 ml.Notify(); | 972 ml.NotifyAll(); |
| 973 } | 973 } |
| 974 } | 974 } |
| 975 | 975 |
| 976 | 976 |
| 977 uword PageSpace::TryAllocateDataBumpInternal(intptr_t size, | 977 uword PageSpace::TryAllocateDataBumpInternal(intptr_t size, |
| 978 GrowthPolicy growth_policy, | 978 GrowthPolicy growth_policy, |
| 979 bool is_locked) { | 979 bool is_locked) { |
| 980 ASSERT(size >= kObjectAlignment); | 980 ASSERT(size >= kObjectAlignment); |
| 981 ASSERT(Utils::IsAligned(size, kObjectAlignment)); | 981 ASSERT(Utils::IsAligned(size, kObjectAlignment)); |
| 982 intptr_t remaining = bump_end_ - bump_top_; | 982 intptr_t remaining = bump_end_ - bump_top_; |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1220 return 0; | 1220 return 0; |
| 1221 } else { | 1221 } else { |
| 1222 ASSERT(total_time >= gc_time); | 1222 ASSERT(total_time >= gc_time); |
| 1223 int result = static_cast<int>((static_cast<double>(gc_time) / | 1223 int result = static_cast<int>((static_cast<double>(gc_time) / |
| 1224 static_cast<double>(total_time)) * 100); | 1224 static_cast<double>(total_time)) * 100); |
| 1225 return result; | 1225 return result; |
| 1226 } | 1226 } |
| 1227 } | 1227 } |
| 1228 | 1228 |
| 1229 } // namespace dart | 1229 } // namespace dart |
| OLD | NEW |