Mercurial > hg > graal-compiler
comparison src/share/vm/memory/freeList.hpp @ 6028:f69a5d43dc19
7164144: Fix variable naming style in freeBlockDictionary.* and binaryTreeDictionary*
Summary: Fix naming style to be consistent with the predominant hotspot style.
Reviewed-by: ysr, brutisso
author | jmasa |
---|---|
date | Wed, 25 Apr 2012 09:55:55 -0700 |
parents | 9f059abe8cf2 |
children | b9a9ed0f8eeb |
comparison
equal
deleted
inserted
replaced
6026:9f059abe8cf2 | 6028:f69a5d43dc19 |
---|---|
117 assert_proper_lock_protection(); | 117 assert_proper_lock_protection(); |
118 set_head(v); | 118 set_head(v); |
119 // If this method is not used (just set the head instead), | 119 // If this method is not used (just set the head instead), |
120 // this check can be avoided. | 120 // this check can be avoided. |
121 if (v != NULL) { | 121 if (v != NULL) { |
122 v->linkPrev(NULL); | 122 v->link_prev(NULL); |
123 } | 123 } |
124 } | 124 } |
125 | 125 |
126 Chunk* tail() const { | 126 Chunk* tail() const { |
127 assert_proper_lock_protection(); | 127 assert_proper_lock_protection(); |
136 // values to NULL. | 136 // values to NULL. |
137 void link_tail(Chunk* v) { | 137 void link_tail(Chunk* v) { |
138 assert_proper_lock_protection(); | 138 assert_proper_lock_protection(); |
139 set_tail(v); | 139 set_tail(v); |
140 if (v != NULL) { | 140 if (v != NULL) { |
141 v->clearNext(); | 141 v->clear_next(); |
142 } | 142 } |
143 } | 143 } |
144 | 144 |
145 // No locking checks in read-accessors: lock-free reads (only) are benign. | 145 // No locking checks in read-accessors: lock-free reads (only) are benign. |
146 // Readers are expected to have the lock if they are doing work that | 146 // Readers are expected to have the lock if they are doing work that |
183 _allocation_stats.compute_desired(_count, | 183 _allocation_stats.compute_desired(_count, |
184 inter_sweep_current, | 184 inter_sweep_current, |
185 inter_sweep_estimate, | 185 inter_sweep_estimate, |
186 intra_sweep_estimate); | 186 intra_sweep_estimate); |
187 } | 187 } |
188 ssize_t coalDesired() const { | 188 ssize_t coal_desired() const { |
189 return _allocation_stats.coalDesired(); | 189 return _allocation_stats.coal_desired(); |
190 } | 190 } |
191 void set_coalDesired(ssize_t v) { | 191 void set_coal_desired(ssize_t v) { |
192 assert_proper_lock_protection(); | 192 assert_proper_lock_protection(); |
193 _allocation_stats.set_coalDesired(v); | 193 _allocation_stats.set_coal_desired(v); |
194 } | 194 } |
195 | 195 |
196 ssize_t surplus() const { | 196 ssize_t surplus() const { |
197 return _allocation_stats.surplus(); | 197 return _allocation_stats.surplus(); |
198 } | 198 } |
207 void decrement_surplus() { | 207 void decrement_surplus() { |
208 assert_proper_lock_protection(); | 208 assert_proper_lock_protection(); |
209 _allocation_stats.decrement_surplus(); | 209 _allocation_stats.decrement_surplus(); |
210 } | 210 } |
211 | 211 |
212 ssize_t bfrSurp() const { | 212 ssize_t bfr_surp() const { |
213 return _allocation_stats.bfrSurp(); | 213 return _allocation_stats.bfr_surp(); |
214 } | 214 } |
215 void set_bfrSurp(ssize_t v) { | 215 void set_bfr_surp(ssize_t v) { |
216 assert_proper_lock_protection(); | 216 assert_proper_lock_protection(); |
217 _allocation_stats.set_bfrSurp(v); | 217 _allocation_stats.set_bfr_surp(v); |
218 } | 218 } |
219 ssize_t prevSweep() const { | 219 ssize_t prev_sweep() const { |
220 return _allocation_stats.prevSweep(); | 220 return _allocation_stats.prev_sweep(); |
221 } | 221 } |
222 void set_prevSweep(ssize_t v) { | 222 void set_prev_sweep(ssize_t v) { |
223 assert_proper_lock_protection(); | 223 assert_proper_lock_protection(); |
224 _allocation_stats.set_prevSweep(v); | 224 _allocation_stats.set_prev_sweep(v); |
225 } | 225 } |
226 ssize_t beforeSweep() const { | 226 ssize_t before_sweep() const { |
227 return _allocation_stats.beforeSweep(); | 227 return _allocation_stats.before_sweep(); |
228 } | 228 } |
229 void set_beforeSweep(ssize_t v) { | 229 void set_before_sweep(ssize_t v) { |
230 assert_proper_lock_protection(); | 230 assert_proper_lock_protection(); |
231 _allocation_stats.set_beforeSweep(v); | 231 _allocation_stats.set_before_sweep(v); |
232 } | 232 } |
233 | 233 |
234 ssize_t coalBirths() const { | 234 ssize_t coal_births() const { |
235 return _allocation_stats.coalBirths(); | 235 return _allocation_stats.coal_births(); |
236 } | 236 } |
237 void set_coalBirths(ssize_t v) { | 237 void set_coal_births(ssize_t v) { |
238 assert_proper_lock_protection(); | 238 assert_proper_lock_protection(); |
239 _allocation_stats.set_coalBirths(v); | 239 _allocation_stats.set_coal_births(v); |
240 } | 240 } |
241 void increment_coalBirths() { | 241 void increment_coal_births() { |
242 assert_proper_lock_protection(); | 242 assert_proper_lock_protection(); |
243 _allocation_stats.increment_coalBirths(); | 243 _allocation_stats.increment_coal_births(); |
244 } | 244 } |
245 | 245 |
246 ssize_t coalDeaths() const { | 246 ssize_t coal_deaths() const { |
247 return _allocation_stats.coalDeaths(); | 247 return _allocation_stats.coal_deaths(); |
248 } | 248 } |
249 void set_coalDeaths(ssize_t v) { | 249 void set_coal_deaths(ssize_t v) { |
250 assert_proper_lock_protection(); | 250 assert_proper_lock_protection(); |
251 _allocation_stats.set_coalDeaths(v); | 251 _allocation_stats.set_coal_deaths(v); |
252 } | 252 } |
253 void increment_coalDeaths() { | 253 void increment_coal_deaths() { |
254 assert_proper_lock_protection(); | 254 assert_proper_lock_protection(); |
255 _allocation_stats.increment_coalDeaths(); | 255 _allocation_stats.increment_coal_deaths(); |
256 } | 256 } |
257 | 257 |
258 ssize_t splitBirths() const { | 258 ssize_t split_births() const { |
259 return _allocation_stats.splitBirths(); | 259 return _allocation_stats.split_births(); |
260 } | 260 } |
261 void set_splitBirths(ssize_t v) { | 261 void set_split_births(ssize_t v) { |
262 assert_proper_lock_protection(); | 262 assert_proper_lock_protection(); |
263 _allocation_stats.set_splitBirths(v); | 263 _allocation_stats.set_split_births(v); |
264 } | 264 } |
265 void increment_splitBirths() { | 265 void increment_split_births() { |
266 assert_proper_lock_protection(); | 266 assert_proper_lock_protection(); |
267 _allocation_stats.increment_splitBirths(); | 267 _allocation_stats.increment_split_births(); |
268 } | 268 } |
269 | 269 |
270 ssize_t splitDeaths() const { | 270 ssize_t split_deaths() const { |
271 return _allocation_stats.splitDeaths(); | 271 return _allocation_stats.split_deaths(); |
272 } | 272 } |
273 void set_splitDeaths(ssize_t v) { | 273 void set_split_deaths(ssize_t v) { |
274 assert_proper_lock_protection(); | 274 assert_proper_lock_protection(); |
275 _allocation_stats.set_splitDeaths(v); | 275 _allocation_stats.set_split_deaths(v); |
276 } | 276 } |
277 void increment_splitDeaths() { | 277 void increment_split_deaths() { |
278 assert_proper_lock_protection(); | 278 assert_proper_lock_protection(); |
279 _allocation_stats.increment_splitDeaths(); | 279 _allocation_stats.increment_split_deaths(); |
280 } | 280 } |
281 | 281 |
282 NOT_PRODUCT( | 282 NOT_PRODUCT( |
283 // For debugging. The "_returnedBytes" in all the lists are summed | 283 // For debugging. The "_returned_bytes" in all the lists are summed |
284 // and compared with the total number of bytes swept during a | 284 // and compared with the total number of bytes swept during a |
285 // collection. | 285 // collection. |
286 size_t returnedBytes() const { return _allocation_stats.returnedBytes(); } | 286 size_t returned_bytes() const { return _allocation_stats.returned_bytes(); } |
287 void set_returnedBytes(size_t v) { _allocation_stats.set_returnedBytes(v); } | 287 void set_returned_bytes(size_t v) { _allocation_stats.set_returned_bytes(v); } |
288 void increment_returnedBytes_by(size_t v) { | 288 void increment_returned_bytes_by(size_t v) { |
289 _allocation_stats.set_returnedBytes(_allocation_stats.returnedBytes() + v); | 289 _allocation_stats.set_returned_bytes(_allocation_stats.returned_bytes() + v); |
290 } | 290 } |
291 ) | 291 ) |
292 | 292 |
293 // Unlink head of list and return it. Returns NULL if | 293 // Unlink head of list and return it. Returns NULL if |
294 // the list is empty. | 294 // the list is empty. |
295 Chunk* getChunkAtHead(); | 295 Chunk* get_chunk_at_head(); |
296 | 296 |
297 // Remove the first "n" or "count", whichever is smaller, chunks from the | 297 // Remove the first "n" or "count", whichever is smaller, chunks from the |
298 // list, setting "fl", which is required to be empty, to point to them. | 298 // list, setting "fl", which is required to be empty, to point to them. |
299 void getFirstNChunksFromList(size_t n, FreeList<Chunk>* fl); | 299 void getFirstNChunksFromList(size_t n, FreeList<Chunk>* fl); |
300 | 300 |
301 // Unlink this chunk from it's free list | 301 // Unlink this chunk from it's free list |
302 void removeChunk(Chunk* fc); | 302 void remove_chunk(Chunk* fc); |
303 | 303 |
304 // Add this chunk to this free list. | 304 // Add this chunk to this free list. |
305 void returnChunkAtHead(Chunk* fc); | 305 void return_chunk_at_head(Chunk* fc); |
306 void returnChunkAtTail(Chunk* fc); | 306 void return_chunk_at_tail(Chunk* fc); |
307 | 307 |
308 // Similar to returnChunk* but also records some diagnostic | 308 // Similar to returnChunk* but also records some diagnostic |
309 // information. | 309 // information. |
310 void returnChunkAtHead(Chunk* fc, bool record_return); | 310 void return_chunk_at_head(Chunk* fc, bool record_return); |
311 void returnChunkAtTail(Chunk* fc, bool record_return); | 311 void return_chunk_at_tail(Chunk* fc, bool record_return); |
312 | 312 |
313 // Prepend "fl" (whose size is required to be the same as that of "this") | 313 // Prepend "fl" (whose size is required to be the same as that of "this") |
314 // to the front of "this" list. | 314 // to the front of "this" list. |
315 void prepend(FreeList<Chunk>* fl); | 315 void prepend(FreeList<Chunk>* fl); |
316 | 316 |
317 // Verify that the chunk is in the list. | 317 // Verify that the chunk is in the list. |
318 // found. Return NULL if "fc" is not found. | 318 // found. Return NULL if "fc" is not found. |
319 bool verifyChunkInFreeLists(Chunk* fc) const; | 319 bool verify_chunk_in_free_list(Chunk* fc) const; |
320 | 320 |
321 // Stats verification | 321 // Stats verification |
322 void verify_stats() const PRODUCT_RETURN; | 322 void verify_stats() const PRODUCT_RETURN; |
323 | 323 |
324 // Printing support | 324 // Printing support |