--- old/src/share/vm/gc/g1/workerDataArray.hpp 2017-05-23 13:27:17.034020271 +0200 +++ new/src/share/vm/gc/g1/workerDataArray.hpp 2017-05-23 13:27:16.922016835 +0200 @@ -48,6 +48,7 @@ void link_thread_work_items(WorkerDataArray* thread_work_items, uint index = 0); void set_thread_work_item(uint worker_i, size_t value, uint index = 0); + void add_thread_work_item(uint worker_i, size_t value, uint index = 0); WorkerDataArray* thread_work_items(uint index = 0) const { assert(index < MaxThreadWorkItems, "Tried to access thread work item %u max %u", index, MaxThreadWorkItems); return _thread_work_items[index]; --- old/src/share/vm/gc/g1/workerDataArray.inline.hpp 2017-05-23 13:27:17.606037819 +0200 +++ new/src/share/vm/gc/g1/workerDataArray.inline.hpp 2017-05-23 13:27:17.495034414 +0200 @@ -74,6 +74,13 @@ } template +void WorkerDataArray::add_thread_work_item(uint worker_i, size_t value, uint index) { + assert(index < MaxThreadWorkItems, "Tried to access thread work item %u (max %u)", index, MaxThreadWorkItems); + assert(_thread_work_items[index] != NULL, "No sub count"); + _thread_work_items[index]->add(worker_i, value); +} + +template void WorkerDataArray::add(uint worker_i, T value) { assert(worker_i < _length, "Worker %d is greater than max: %d", worker_i, _length); assert(_data[worker_i] != uninitialized(), "No data to add to for worker %d", worker_i);