< prev index next >

src/hotspot/share/gc/g1/g1Allocator.inline.hpp

Print this page
rev 56448 : imported patch 8220310.mut.0
rev 56450 : imported patch 8220310.mut.2
rev 56451 : imported patch 8220310.mut.3-thomas
rev 56453 : [mq]: 8220310.mut.3-kim

*** 28,39 **** #include "gc/g1/g1Allocator.hpp" #include "gc/g1/g1AllocRegion.inline.hpp" #include "gc/shared/plab.inline.hpp" #include "memory/universe.hpp" ! inline MutatorAllocRegion* G1Allocator::mutator_alloc_region() { ! return &_mutator_alloc_region; } inline SurvivorGCAllocRegion* G1Allocator::survivor_gc_alloc_region() { return &_survivor_gc_alloc_region; } --- 28,44 ---- #include "gc/g1/g1Allocator.hpp" #include "gc/g1/g1AllocRegion.inline.hpp" #include "gc/shared/plab.inline.hpp" #include "memory/universe.hpp" ! inline uint G1Allocator::current_node_index() const { ! return _mnm->index_of_current_thread(); ! } ! ! inline MutatorAllocRegion* G1Allocator::mutator_alloc_region(uint node_index) { ! assert(node_index < _num_alloc_regions, "Invalid index: %u", node_index); ! return &_mutator_alloc_regions[node_index]; } inline SurvivorGCAllocRegion* G1Allocator::survivor_gc_alloc_region() { return &_survivor_gc_alloc_region; }
*** 43,68 **** } inline HeapWord* G1Allocator::attempt_allocation(size_t min_word_size, size_t desired_word_size, size_t* actual_word_size) { ! HeapWord* result = mutator_alloc_region()->attempt_retained_allocation(min_word_size, desired_word_size, actual_word_size); if (result != NULL) { return result; } ! return mutator_alloc_region()->attempt_allocation(min_word_size, desired_word_size, actual_word_size); } inline HeapWord* G1Allocator::attempt_allocation_locked(size_t word_size) { ! HeapWord* result = mutator_alloc_region()->attempt_allocation_locked(word_size); ! assert(result != NULL || mutator_alloc_region()->get() == NULL, ! "Must not have a mutator alloc region if there is no memory, but is " PTR_FORMAT, p2i(mutator_alloc_region()->get())); return result; } inline HeapWord* G1Allocator::attempt_allocation_force(size_t word_size) { ! return mutator_alloc_region()->attempt_allocation_force(word_size); } inline PLAB* G1PLABAllocator::alloc_buffer(G1HeapRegionAttr dest) { assert(dest.is_valid(), "Allocation buffer index out of bounds: %s", dest.get_type_str()); --- 48,76 ---- } inline HeapWord* G1Allocator::attempt_allocation(size_t min_word_size, size_t desired_word_size, size_t* actual_word_size) { ! uint node_index = current_node_index(); ! HeapWord* result = mutator_alloc_region(node_index)->attempt_retained_allocation(min_word_size, desired_word_size, actual_word_size); if (result != NULL) { return result; } ! return mutator_alloc_region(node_index)->attempt_allocation(min_word_size, desired_word_size, actual_word_size); } inline HeapWord* G1Allocator::attempt_allocation_locked(size_t word_size) { ! uint node_index = current_node_index(); ! HeapWord* result = mutator_alloc_region(node_index)->attempt_allocation_locked(word_size); ! assert(result != NULL || mutator_alloc_region(node_index)->get() == NULL, ! "Must not have a mutator alloc region if there is no memory, but is " PTR_FORMAT, p2i(mutator_alloc_region(node_index)->get())); return result; } inline HeapWord* G1Allocator::attempt_allocation_force(size_t word_size) { ! uint node_index = current_node_index(); ! return mutator_alloc_region(node_index)->attempt_allocation_force(word_size); } inline PLAB* G1PLABAllocator::alloc_buffer(G1HeapRegionAttr dest) { assert(dest.is_valid(), "Allocation buffer index out of bounds: %s", dest.get_type_str());
< prev index next >