--- old/src/share/vm/gc/g1/g1AllocRegion.inline.hpp 2015-08-19 10:56:39.791613407 +0200 +++ new/src/share/vm/gc/g1/g1AllocRegion.inline.hpp 2015-08-19 10:56:39.709610992 +0200 @@ -41,66 +41,73 @@ } inline HeapWord* G1AllocRegion::par_allocate(HeapRegion* alloc_region, size_t word_size, bool bot_updates) { - return par_allocate(alloc_region, word_size, &word_size, bot_updates); + size_t temp; + return par_allocate(alloc_region, word_size, word_size, &temp, bot_updates); } inline HeapWord* G1AllocRegion::par_allocate(HeapRegion* alloc_region, size_t min_word_size, - size_t* word_size, + size_t desired_word_size, + size_t* actual_word_size, bool bot_updates) { assert(alloc_region != NULL, err_msg("pre-condition")); assert(!alloc_region->is_empty(), err_msg("pre-condition")); if (!bot_updates) { - return alloc_region->par_allocate_no_bot_updates(min_word_size, word_size); + return alloc_region->par_allocate_no_bot_updates(min_word_size, desired_word_size, actual_word_size); } else { - return alloc_region->par_allocate(min_word_size, word_size); + return alloc_region->par_allocate(min_word_size, desired_word_size, actual_word_size); } } inline HeapWord* G1AllocRegion::attempt_allocation(size_t word_size, bool bot_updates) { - return attempt_allocation(word_size, &word_size, bot_updates); + size_t temp; + return attempt_allocation(word_size, word_size, &temp, bot_updates); } inline HeapWord* G1AllocRegion::attempt_allocation(size_t min_word_size, - size_t* word_size, + size_t desired_word_size, + size_t* actual_word_size, bool bot_updates) { assert(bot_updates == _bot_updates, ar_ext_msg(this, "pre-condition")); HeapRegion* alloc_region = _alloc_region; assert(alloc_region != NULL, ar_ext_msg(this, "not initialized properly")); - HeapWord* result = par_allocate(alloc_region, min_word_size, word_size, bot_updates); + HeapWord* result = par_allocate(alloc_region, min_word_size, desired_word_size, actual_word_size, bot_updates); if (result != NULL) { - trace("alloc", *word_size, result); + trace("alloc", min_word_size, desired_word_size, *actual_word_size, result); return result; } - trace("alloc failed", *word_size); + trace("alloc failed", min_word_size, desired_word_size); return NULL; } inline HeapWord* G1AllocRegion::attempt_allocation_locked(size_t word_size, bool bot_updates) { - return attempt_allocation_locked(word_size, &word_size, bot_updates); + size_t temp; + return attempt_allocation_locked(word_size, word_size, &temp, bot_updates); } inline HeapWord* G1AllocRegion::attempt_allocation_locked(size_t min_word_size, - size_t* word_size, + size_t desired_word_size, + size_t* actual_word_size, bool bot_updates) { // First we have to redo the allocation, assuming we're holding the // appropriate lock, in case another thread changed the region while // we were waiting to get the lock. - HeapWord* result = attempt_allocation(min_word_size, word_size, bot_updates); + HeapWord* result = attempt_allocation(min_word_size, desired_word_size, actual_word_size, bot_updates); if (result != NULL) { return result; } retire(true /* fill_up */); - result = new_alloc_region_and_allocate(*word_size, false /* force */); + result = new_alloc_region_and_allocate(desired_word_size, false /* force */); if (result != NULL) { - trace("alloc locked (second attempt)", *word_size, result); + *actual_word_size = desired_word_size; + trace("alloc locked (second attempt)", min_word_size, desired_word_size, *actual_word_size, result); return result; } - trace("alloc locked failed", *word_size); + trace("alloc locked failed", min_word_size, desired_word_size); return NULL; } @@ -109,13 +116,13 @@ assert(bot_updates == _bot_updates, ar_ext_msg(this, "pre-condition")); assert(_alloc_region != NULL, ar_ext_msg(this, "not initialized properly")); - trace("forcing alloc"); + trace("forcing alloc", word_size, word_size); HeapWord* result = new_alloc_region_and_allocate(word_size, true /* force */); if (result != NULL) { - trace("alloc forced", word_size, result); + trace("alloc forced", word_size, word_size, word_size, result); return result; } - trace("alloc forced failed", word_size); + trace("alloc forced failed", word_size, word_size); return NULL; }