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_HEAP_H_ | 5 #ifndef VM_HEAP_H_ |
6 #define VM_HEAP_H_ | 6 #define VM_HEAP_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
10 #include "vm/flags.h" | 10 #include "vm/flags.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 ASSERT((id >= 0) && (id < GCStats::kDataEntries)); | 237 ASSERT((id >= 0) && (id < GCStats::kDataEntries)); |
238 stats_.data_[id] = value; | 238 stats_.data_[id] = value; |
239 } | 239 } |
240 | 240 |
241 void UpdateGlobalMaxUsed(); | 241 void UpdateGlobalMaxUsed(); |
242 | 242 |
243 static bool IsAllocatableInNewSpace(intptr_t size) { | 243 static bool IsAllocatableInNewSpace(intptr_t size) { |
244 return size <= kNewAllocatableSize; | 244 return size <= kNewAllocatableSize; |
245 } | 245 } |
246 | 246 |
| 247 #ifndef PRODUCT |
247 void PrintToJSONObject(Space space, JSONObject* object) const; | 248 void PrintToJSONObject(Space space, JSONObject* object) const; |
248 | 249 |
249 // The heap map contains the sizes and class ids for the objects in each page. | 250 // The heap map contains the sizes and class ids for the objects in each page. |
250 void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) { | 251 void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) { |
251 return old_space_.PrintHeapMapToJSONStream(isolate, stream); | 252 old_space_.PrintHeapMapToJSONStream(isolate, stream); |
252 } | 253 } |
| 254 #endif // PRODUCT |
253 | 255 |
254 Isolate* isolate() const { return isolate_; } | 256 Isolate* isolate() const { return isolate_; } |
255 | 257 |
256 Monitor* barrier() const { return barrier_; } | 258 Monitor* barrier() const { return barrier_; } |
257 Monitor* barrier_done() const { return barrier_done_; } | 259 Monitor* barrier_done() const { return barrier_done_; } |
258 | 260 |
259 Monitor* finalization_tasks_lock() const { return finalization_tasks_lock_; } | 261 Monitor* finalization_tasks_lock() const { return finalization_tasks_lock_; } |
260 intptr_t finalization_tasks() const { return finalization_tasks_; } | 262 intptr_t finalization_tasks() const { return finalization_tasks_; } |
261 void set_finalization_tasks(intptr_t count) { finalization_tasks_ = count; } | 263 void set_finalization_tasks(intptr_t count) { finalization_tasks_ = count; } |
262 | 264 |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 // Note: During this scope, the code pages are non-executable. | 409 // Note: During this scope, the code pages are non-executable. |
408 class WritableVMIsolateScope : StackResource { | 410 class WritableVMIsolateScope : StackResource { |
409 public: | 411 public: |
410 explicit WritableVMIsolateScope(Thread* thread); | 412 explicit WritableVMIsolateScope(Thread* thread); |
411 ~WritableVMIsolateScope(); | 413 ~WritableVMIsolateScope(); |
412 }; | 414 }; |
413 | 415 |
414 } // namespace dart | 416 } // namespace dart |
415 | 417 |
416 #endif // VM_HEAP_H_ | 418 #endif // VM_HEAP_H_ |
OLD | NEW |