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

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

Issue 10452006: Implement a heap profiler for the Dart managed heap. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: added basic test code 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
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 // Accessors to generate code for inlined allocation. 65 // Accessors to generate code for inlined allocation.
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 VisitObjects(ObjectVisitor* visitor) const;
74 void VisitObjectPointers(ObjectPointerVisitor* visitor) const; 75 void VisitObjectPointers(ObjectPointerVisitor* visitor) const;
75 76
76 // Returns true if the last scavenge had a promotion failure. 77 // Returns true if the last scavenge had a promotion failure.
77 bool HadPromotionFailure() { 78 bool HadPromotionFailure() {
78 return had_promotion_failure_; 79 return had_promotion_failure_;
79 } 80 }
80 81
81 private: 82 private:
82 uword FirstObjectStart() const { return to_->start() | object_alignment_; } 83 uword FirstObjectStart() const { return to_->start() | object_alignment_; }
83 void Prologue(Isolate* isolate, bool invoke_api_callbacks); 84 void Prologue(Isolate* isolate, bool invoke_api_callbacks);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 143
143 friend class ScavengerVisitor; 144 friend class ScavengerVisitor;
144 friend class ScavengerWeakVisitor; 145 friend class ScavengerWeakVisitor;
145 146
146 DISALLOW_COPY_AND_ASSIGN(Scavenger); 147 DISALLOW_COPY_AND_ASSIGN(Scavenger);
147 }; 148 };
148 149
149 } // namespace dart 150 } // namespace dart
150 151
151 #endif // VM_SCAVENGER_H_ 152 #endif // VM_SCAVENGER_H_
OLDNEW
« runtime/vm/raw_object.h ('K') | « runtime/vm/raw_object.h ('k') | runtime/vm/scavenger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698