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 #ifndef VM_SCAVENGER_H_ | 5 #ifndef VM_SCAVENGER_H_ |
6 #define VM_SCAVENGER_H_ | 6 #define VM_SCAVENGER_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/utils.h" | 9 #include "platform/utils.h" |
10 #include "vm/dart.h" | 10 #include "vm/dart.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 end_ += sizeof(result); | 262 end_ += sizeof(result); |
263 ASSERT(end_ <= to_->end()); | 263 ASSERT(end_ <= to_->end()); |
264 return result; | 264 return result; |
265 } | 265 } |
266 bool PromotedStackHasMore() const { | 266 bool PromotedStackHasMore() const { |
267 ASSERT(scavenging_); | 267 ASSERT(scavenging_); |
268 return end_ < to_->end(); | 268 return end_ < to_->end(); |
269 } | 269 } |
270 | 270 |
271 void UpdateMaxHeapCapacity(); | 271 void UpdateMaxHeapCapacity(); |
| 272 void UpdateMaxHeapUsage(); |
| 273 void UpdateGlobalMaxUsed(); |
272 | 274 |
273 void ProcessWeakTables(); | 275 void ProcessWeakTables(); |
274 | 276 |
275 intptr_t NewSizeInWords(intptr_t old_size_in_words) const; | 277 intptr_t NewSizeInWords(intptr_t old_size_in_words) const; |
276 | 278 |
277 // Current allocation top and end. These values are being accessed directly | 279 // Current allocation top and end. These values are being accessed directly |
278 // from generated code. | 280 // from generated code. |
279 uword top_; | 281 uword top_; |
280 uword end_; | 282 uword end_; |
281 | 283 |
(...skipping 26 matching lines...) Expand all Loading... |
308 | 310 |
309 friend class ScavengerVisitor; | 311 friend class ScavengerVisitor; |
310 friend class ScavengerWeakVisitor; | 312 friend class ScavengerWeakVisitor; |
311 | 313 |
312 DISALLOW_COPY_AND_ASSIGN(Scavenger); | 314 DISALLOW_COPY_AND_ASSIGN(Scavenger); |
313 }; | 315 }; |
314 | 316 |
315 } // namespace dart | 317 } // namespace dart |
316 | 318 |
317 #endif // VM_SCAVENGER_H_ | 319 #endif // VM_SCAVENGER_H_ |
OLD | NEW |