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

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

Issue 10442073: Implement growth policy for old space using time and space signals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/scavenger.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 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/flags.h" 10 #include "vm/flags.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 uword* TopAddress() { return &top_; } 66 uword* TopAddress() { return &top_; }
67 uword* EndAddress() { return &end_; } 67 uword* EndAddress() { return &end_; }
68 static intptr_t top_offset() { return OFFSET_OF(Scavenger, top_); } 68 static intptr_t top_offset() { return OFFSET_OF(Scavenger, top_); }
69 static intptr_t end_offset() { return OFFSET_OF(Scavenger, end_); } 69 static intptr_t end_offset() { return OFFSET_OF(Scavenger, end_); }
70 70
71 intptr_t in_use() const { return (top_ - FirstObjectStart()); } 71 intptr_t in_use() const { return (top_ - FirstObjectStart()); }
72 intptr_t capacity() const { return space_->size(); } 72 intptr_t capacity() const { return space_->size(); }
73 73
74 void VisitObjectPointers(ObjectPointerVisitor* visitor) const; 74 void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
75 75
76 // Returns true if the last scavenge had a promotion failure.
77 bool HadPromotionFailure() {
78 return had_promotion_failure_;
79 }
80
76 private: 81 private:
77 uword FirstObjectStart() const { return to_->start() | object_alignment_; } 82 uword FirstObjectStart() const { return to_->start() | object_alignment_; }
78 void Prologue(Isolate* isolate, bool invoke_api_callbacks); 83 void Prologue(Isolate* isolate, bool invoke_api_callbacks);
79 void IterateRoots(Isolate* isolate, 84 void IterateRoots(Isolate* isolate,
80 ObjectPointerVisitor* visitor, 85 ObjectPointerVisitor* visitor,
81 bool visit_prologue_weak_persistent_handles); 86 bool visit_prologue_weak_persistent_handles);
82 void IterateWeakReferences(Isolate* isolate, ObjectPointerVisitor* visitor); 87 void IterateWeakReferences(Isolate* isolate, ObjectPointerVisitor* visitor);
83 void IterateWeakRoots(Isolate* isolate, 88 void IterateWeakRoots(Isolate* isolate,
84 HandleVisitor* visitor, 89 HandleVisitor* visitor,
85 bool visit_prologue_weak_persistent_handles); 90 bool visit_prologue_weak_persistent_handles);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 142
138 friend class ScavengerVisitor; 143 friend class ScavengerVisitor;
139 friend class ScavengerWeakVisitor; 144 friend class ScavengerWeakVisitor;
140 145
141 DISALLOW_COPY_AND_ASSIGN(Scavenger); 146 DISALLOW_COPY_AND_ASSIGN(Scavenger);
142 }; 147 };
143 148
144 } // namespace dart 149 } // namespace dart
145 150
146 #endif // VM_SCAVENGER_H_ 151 #endif // VM_SCAVENGER_H_
OLDNEW
« no previous file with comments | « runtime/vm/pages.cc ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698