115 protected:
116 SpoolBlock* nextSpoolBlock;
117 size_t bufferSize; // number of usable words in this block
118 markOop* displacedHdr; // the displaced headers start here
119
120 // Note about bufferSize: it denotes the number of entries available plus 1;
121 // legal indices range from 1 through BufferSize - 1. See the verification
122 // code verify() that counts the number of displaced headers spooled.
123 size_t computeBufferSize() {
124 return (size() * sizeof(HeapWord) - sizeof(*this)) / sizeof(markOop);
125 }
126
127 public:
128 void init() {
129 bufferSize = computeBufferSize();
130 displacedHdr = (markOop*)&displacedHdr;
131 nextSpoolBlock = NULL;
132 }
133
134 void print_on(outputStream* st) const;
135 void print() const { print_on(gclog_or_tty); }
136 };
137
138 class PromotionInfo VALUE_OBJ_CLASS_SPEC {
139 bool _tracking; // set if tracking
140 CompactibleFreeListSpace* _space; // the space to which this belongs
141 PromotedObject* _promoHead; // head of list of promoted objects
142 PromotedObject* _promoTail; // tail of list of promoted objects
143 SpoolBlock* _spoolHead; // first spooling block
144 SpoolBlock* _spoolTail; // last non-full spooling block or null
145 SpoolBlock* _splice_point; // when _spoolTail is null, holds list tail
146 SpoolBlock* _spareSpool; // free spool buffer
147 size_t _firstIndex; // first active index in
148 // first spooling block (_spoolHead)
149 size_t _nextIndex; // last active index + 1 in last
150 // spooling block (_spoolTail)
151 private:
152 // ensure that spooling space exists; return true if there is spooling space
153 bool ensure_spooling_space_work();
154
155 public:
|
115 protected:
116 SpoolBlock* nextSpoolBlock;
117 size_t bufferSize; // number of usable words in this block
118 markOop* displacedHdr; // the displaced headers start here
119
120 // Note about bufferSize: it denotes the number of entries available plus 1;
121 // legal indices range from 1 through BufferSize - 1. See the verification
122 // code verify() that counts the number of displaced headers spooled.
123 size_t computeBufferSize() {
124 return (size() * sizeof(HeapWord) - sizeof(*this)) / sizeof(markOop);
125 }
126
127 public:
128 void init() {
129 bufferSize = computeBufferSize();
130 displacedHdr = (markOop*)&displacedHdr;
131 nextSpoolBlock = NULL;
132 }
133
134 void print_on(outputStream* st) const;
135 void print() const { print_on(tty); }
136 };
137
138 class PromotionInfo VALUE_OBJ_CLASS_SPEC {
139 bool _tracking; // set if tracking
140 CompactibleFreeListSpace* _space; // the space to which this belongs
141 PromotedObject* _promoHead; // head of list of promoted objects
142 PromotedObject* _promoTail; // tail of list of promoted objects
143 SpoolBlock* _spoolHead; // first spooling block
144 SpoolBlock* _spoolTail; // last non-full spooling block or null
145 SpoolBlock* _splice_point; // when _spoolTail is null, holds list tail
146 SpoolBlock* _spareSpool; // free spool buffer
147 size_t _firstIndex; // first active index in
148 // first spooling block (_spoolHead)
149 size_t _nextIndex; // last active index + 1 in last
150 // spooling block (_spoolTail)
151 private:
152 // ensure that spooling space exists; return true if there is spooling space
153 bool ensure_spooling_space_work();
154
155 public:
|