Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/heapRegion.hpp @ 2134:b158bed62ef5
6994297: G1: do first-level slow-path allocations with a CAS
Summary: First attempt to allocate out the current alloc region using a CAS instead of taking the Heap_lock (first level of G1's slow allocation path). Only if that fails and it's necessary to replace the current alloc region take the Heap_lock (that's the second level of G1's slow allocation path).
Reviewed-by: johnc, brutisso, ysr
author | tonyp |
---|---|
date | Wed, 12 Jan 2011 16:34:25 -0500 |
parents | 2250ee17e258 |
children | 0fa27f37d4d4 |
comparison
equal
deleted
inserted
replaced
2133:2250ee17e258 | 2134:b158bed62ef5 |
---|---|
369 NotZeroFilled, | 369 NotZeroFilled, |
370 ZeroFilling, | 370 ZeroFilling, |
371 ZeroFilled, | 371 ZeroFilled, |
372 Allocated | 372 Allocated |
373 }; | 373 }; |
374 | |
375 inline HeapWord* par_allocate_no_bot_updates(size_t word_size) { | |
376 assert(is_young(), "we can only skip BOT updates on young regions"); | |
377 return ContiguousSpace::par_allocate(word_size); | |
378 } | |
379 inline HeapWord* allocate_no_bot_updates(size_t word_size) { | |
380 assert(is_young(), "we can only skip BOT updates on young regions"); | |
381 return ContiguousSpace::allocate(word_size); | |
382 } | |
374 | 383 |
375 // If this region is a member of a HeapRegionSeq, the index in that | 384 // If this region is a member of a HeapRegionSeq, the index in that |
376 // sequence, otherwise -1. | 385 // sequence, otherwise -1. |
377 int hrs_index() const { return _hrs_index; } | 386 int hrs_index() const { return _hrs_index; } |
378 void set_hrs_index(int index) { _hrs_index = index; } | 387 void set_hrs_index(int index) { _hrs_index = index; } |