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

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

Issue 10872074: Report the reason for a garbage collection when verbose GC is enabled. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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_PAGES_H_ 5 #ifndef VM_PAGES_H_
6 #define VM_PAGES_H_ 6 #define VM_PAGES_H_
7 7
8 #include "vm/freelist.h" 8 #include "vm/freelist.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/virtual_memory.h" 10 #include "vm/virtual_memory.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 static bool IsPageAllocatableSize(intptr_t size) { 175 static bool IsPageAllocatableSize(intptr_t size) {
176 return size <= kAllocatablePageSize; 176 return size <= kAllocatablePageSize;
177 } 177 }
178 178
179 void VisitObjects(ObjectVisitor* visitor) const; 179 void VisitObjects(ObjectVisitor* visitor) const;
180 void VisitObjectPointers(ObjectPointerVisitor* visitor) const; 180 void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
181 181
182 RawObject* FindObject(FindObjectVisitor* visitor) const; 182 RawObject* FindObject(FindObjectVisitor* visitor) const;
183 183
184 // Collect the garbage in the page space using mark-sweep. 184 // Collect the garbage in the page space using mark-sweep.
185 void MarkSweep(bool invoke_api_callbacks); 185 void MarkSweep(bool invoke_api_callbacks, const char* reason);
186 186
187 static HeapPage* PageFor(RawObject* raw_obj) { 187 static HeapPage* PageFor(RawObject* raw_obj) {
188 return reinterpret_cast<HeapPage*>( 188 return reinterpret_cast<HeapPage*>(
189 RawObject::ToAddr(raw_obj) & ~(kPageSize -1)); 189 RawObject::ToAddr(raw_obj) & ~(kPageSize -1));
190 } 190 }
191 191
192 void StartEndAddress(uword* start, uword* end) const; 192 void StartEndAddress(uword* start, uword* end) const;
193 193
194 void EnableGrowthControl() { 194 void EnableGrowthControl() {
195 page_space_controller_.Enable(); 195 page_space_controller_.Enable();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 bool sweeping_; 244 bool sweeping_;
245 245
246 PageSpaceController page_space_controller_; 246 PageSpaceController page_space_controller_;
247 247
248 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace); 248 DISALLOW_IMPLICIT_CONSTRUCTORS(PageSpace);
249 }; 249 };
250 250
251 } // namespace dart 251 } // namespace dart
252 252
253 #endif // VM_PAGES_H_ 253 #endif // VM_PAGES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698