--- old/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp 2015-03-06 20:51:42.000380589 +0100 +++ new/src/share/vm/gc_implementation/g1/g1ParScanThreadState.cpp 2015-03-06 20:51:41.939378810 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2015 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -58,7 +58,7 @@ _surviving_young_words = _surviving_young_words_base + PADDING_ELEM_NUM; memset(_surviving_young_words, 0, (size_t) real_length * sizeof(size_t)); - _g1_par_allocator = G1ParGCAllocator::create_allocator(_g1h); + _plab_allocator = G1PLABAllocator::create_allocator(_g1h); _dest[InCSetState::NotInCSet] = InCSetState::NotInCSet; // The dest for Young is used when the objects are aged enough to @@ -70,8 +70,8 @@ } G1ParScanThreadState::~G1ParScanThreadState() { - _g1_par_allocator->retire_alloc_buffers(); - delete _g1_par_allocator; + _plab_allocator->retire_alloc_buffers(); + delete _plab_allocator; FREE_C_HEAP_ARRAY(size_t, _surviving_young_words_base); } @@ -94,8 +94,8 @@ const double elapsed_ms = elapsed_time() * 1000.0; const double s_roots_ms = strong_roots_time() * 1000.0; const double term_ms = term_time() * 1000.0; - const size_t alloc_buffer_waste = _g1_par_allocator->alloc_buffer_waste(); - const size_t undo_waste = _g1_par_allocator->undo_waste(); + const size_t alloc_buffer_waste = _plab_allocator->alloc_buffer_waste(); + const size_t undo_waste = _plab_allocator->undo_waste(); st->print_cr("%3d %9.2f %9.2f %6.2f " "%9.2f %6.2f " SIZE_FORMAT_W(8) " " SIZE_FORMAT_W(7) " " SIZE_FORMAT_W(7) " " SIZE_FORMAT_W(7), @@ -167,8 +167,9 @@ // Right now we only have two types of regions (young / old) so // let's keep the logic here simple. We can generalize it when necessary. if (dest->is_young()) { - HeapWord* const obj_ptr = _g1_par_allocator->allocate(InCSetState::Old, - word_sz, context); + HeapWord* const obj_ptr = _plab_allocator->allocate(InCSetState::Old, + word_sz, + context); if (obj_ptr == NULL) { return NULL; } @@ -209,12 +210,12 @@ uint age = 0; InCSetState dest_state = next_state(state, old_mark, age); - HeapWord* obj_ptr = _g1_par_allocator->plab_allocate(dest_state, word_sz, context); + HeapWord* obj_ptr = _plab_allocator->plab_allocate(dest_state, word_sz, context); // PLAB allocations should succeed most of the time, so we'll // normally check against NULL once and that's it. if (obj_ptr == NULL) { - obj_ptr = _g1_par_allocator->allocate_direct_or_new_plab(dest_state, word_sz, context); + obj_ptr = _plab_allocator->allocate_direct_or_new_plab(dest_state, word_sz, context); if (obj_ptr == NULL) { obj_ptr = allocate_in_next_plab(state, &dest_state, word_sz, context); if (obj_ptr == NULL) { @@ -231,7 +232,7 @@ if (_g1h->evacuation_should_fail()) { // Doing this after all the allocation attempts also tests the // undo_allocation() method too. - _g1_par_allocator->undo_allocation(dest_state, obj_ptr, word_sz, context); + _plab_allocator->undo_allocation(dest_state, obj_ptr, word_sz, context); return _g1h->handle_evacuation_failure_par(this, old); } #endif // !PRODUCT @@ -293,7 +294,7 @@ } return obj; } else { - _g1_par_allocator->undo_allocation(dest_state, obj_ptr, word_sz, context); + _plab_allocator->undo_allocation(dest_state, obj_ptr, word_sz, context); return forward_ptr; } }