--- old/src/share/vm/gc_implementation/shared/plab.cpp 2015-04-17 19:08:40.962779845 +0300 +++ new/src/share/vm/gc_implementation/shared/plab.cpp 2015-04-17 19:08:40.886778661 +0300 @@ -39,7 +39,7 @@ PLAB::PLAB(size_t desired_plab_sz_) : _word_sz(desired_plab_sz_), _bottom(NULL), _top(NULL), - _end(NULL), _hard_end(NULL), _allocated(0), _wasted(0) + _end(NULL), _hard_end(NULL), _allocated(0), _wasted(0), _undo_wasted(0) { // ArrayOopDesc::header_size depends on command line initialization. AlignmentReserve = oopDesc::header_size() > MinObjAlignment ? align_object_size(arrayOopDesc::header_size(T_INT)) : 0; @@ -62,13 +62,15 @@ // Now flush the statistics. stats->add_allocated(_allocated); stats->add_wasted(_wasted); + stats->add_undo_wasted(_undo_wasted); stats->add_unused(unused); // Since we have flushed the stats we need to clear the _allocated and _wasted // fields in case somebody retains an instance of this over GCs. Not doing so // will artifically inflate the values in the statistics. - _allocated = 0; - _wasted = 0; + _allocated = 0; + _wasted = 0; + _undo_wasted = 0; } void PLAB::retire() { @@ -98,8 +100,9 @@ err_msg("Inconsistency in PLAB stats: " "_allocated: "SIZE_FORMAT", " "_wasted: "SIZE_FORMAT", " - "_unused: "SIZE_FORMAT, - _allocated, _wasted, _unused)); + "_unused: "SIZE_FORMAT", ", + "_undo_wasted: "SIZE_FORMAT, + _allocated, _wasted, _unused, _undo_wasted)); _allocated = 1; }