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

Side by Side Diff: runtime/vm/heap.h

Issue 2622053002: Refactor snapshots pieces to include a section for loading instructions into the heap of a regular … (Closed)
Patch Set: . Created 3 years, 11 months 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
« no previous file with comments | « runtime/vm/gc_sweeper.cc ('k') | runtime/vm/heap.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 #ifndef RUNTIME_VM_HEAP_H_ 5 #ifndef RUNTIME_VM_HEAP_H_
6 #define RUNTIME_VM_HEAP_H_ 6 #define RUNTIME_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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 85
86 // Heap contains the specified address. 86 // Heap contains the specified address.
87 bool Contains(uword addr) const; 87 bool Contains(uword addr) const;
88 bool NewContains(uword addr) const; 88 bool NewContains(uword addr) const;
89 bool OldContains(uword addr) const; 89 bool OldContains(uword addr) const;
90 bool CodeContains(uword addr) const; 90 bool CodeContains(uword addr) const;
91 bool DataContains(uword addr) const; 91 bool DataContains(uword addr) const;
92 92
93 void IterateObjects(ObjectVisitor* visitor) const; 93 void IterateObjects(ObjectVisitor* visitor) const;
94 void IterateOldObjects(ObjectVisitor* visitor) const; 94 void IterateOldObjects(ObjectVisitor* visitor) const;
95 void IterateOldObjectsNoEmbedderPages(ObjectVisitor* visitor) const; 95 void IterateOldObjectsNoExternalPages(ObjectVisitor* visitor) const;
96 void IterateObjectPointers(ObjectVisitor* visitor) const; 96 void IterateObjectPointers(ObjectVisitor* visitor) const;
97 97
98 // Find an object by visiting all pointers in the specified heap space, 98 // Find an object by visiting all pointers in the specified heap space,
99 // the 'visitor' is used to determine if an object is found or not. 99 // the 'visitor' is used to determine if an object is found or not.
100 // The 'visitor' function should be set up to return true if the 100 // The 'visitor' function should be set up to return true if the
101 // object is found, traversal through the heap space stops at that 101 // object is found, traversal through the heap space stops at that
102 // point. 102 // point.
103 // The 'visitor' function should return false if the object is not found, 103 // The 'visitor' function should return false if the object is not found,
104 // traversal through the heap space continues. 104 // traversal through the heap space continues.
105 // Returns null object if nothing is found. 105 // Returns null object if nothing is found.
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 uword AllocateNew(intptr_t size); 289 uword AllocateNew(intptr_t size);
290 uword AllocateOld(intptr_t size, HeapPage::PageType type); 290 uword AllocateOld(intptr_t size, HeapPage::PageType type);
291 291
292 // Visit all pointers. Caller must ensure concurrent sweeper is not running, 292 // Visit all pointers. Caller must ensure concurrent sweeper is not running,
293 // and the visitor must not allocate. 293 // and the visitor must not allocate.
294 void VisitObjectPointers(ObjectPointerVisitor* visitor) const; 294 void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
295 295
296 // Visit all objects, including FreeListElement "objects". Caller must ensure 296 // Visit all objects, including FreeListElement "objects". Caller must ensure
297 // concurrent sweeper is not running, and the visitor must not allocate. 297 // concurrent sweeper is not running, and the visitor must not allocate.
298 void VisitObjects(ObjectVisitor* visitor) const; 298 void VisitObjects(ObjectVisitor* visitor) const;
299 void VisitObjectsNoExternalPages(ObjectVisitor* visitor) const;
300 void VisitObjectsExternalPages(ObjectVisitor* visitor) const;
299 301
300 // Like Verify, but does not wait for concurrent sweeper, so caller must 302 // Like Verify, but does not wait for concurrent sweeper, so caller must
301 // ensure thread-safety. 303 // ensure thread-safety.
302 bool VerifyGC(MarkExpectation mark_expectation = kForbidMarked) const; 304 bool VerifyGC(MarkExpectation mark_expectation = kForbidMarked) const;
303 305
304 // Helper functions for garbage collection. 306 // Helper functions for garbage collection.
305 void CollectNewSpaceGarbage(Thread* thread, 307 void CollectNewSpaceGarbage(Thread* thread,
306 ApiCallbacks api_callbacks, 308 ApiCallbacks api_callbacks,
307 GCReason reason); 309 GCReason reason);
308 void CollectOldSpaceGarbage(Thread* thread, 310 void CollectOldSpaceGarbage(Thread* thread,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 // Note: During this scope, the code pages are non-executable. 389 // Note: During this scope, the code pages are non-executable.
388 class WritableVMIsolateScope : StackResource { 390 class WritableVMIsolateScope : StackResource {
389 public: 391 public:
390 explicit WritableVMIsolateScope(Thread* thread); 392 explicit WritableVMIsolateScope(Thread* thread);
391 ~WritableVMIsolateScope(); 393 ~WritableVMIsolateScope();
392 }; 394 };
393 395
394 } // namespace dart 396 } // namespace dart
395 397
396 #endif // RUNTIME_VM_HEAP_H_ 398 #endif // RUNTIME_VM_HEAP_H_
OLDNEW
« no previous file with comments | « runtime/vm/gc_sweeper.cc ('k') | runtime/vm/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698