< prev index next >

src/hotspot/share/gc/shared/workerDataArray.inline.hpp

Print this page
rev 59944 : 8247819: G1: Process strong OopStorage entries in parallel
Reviewed-by:
Contributed-by: Erik ?sterlund <erik.osterlund@oracle.com>, Thomas Schatzl <thomas.schatzl@oracle.com>

*** 28,40 **** #include "gc/shared/workerDataArray.hpp" #include "memory/allocation.inline.hpp" #include "utilities/ostream.hpp" template <typename T> ! WorkerDataArray<T>::WorkerDataArray(const char* title, uint length, bool is_serial) : _data(NULL), _length(length), _title(title), _is_serial(is_serial) { assert(length > 0, "Must have some workers to store data for"); assert(!is_serial || length == 1, "Serial phase must only have a single entry."); _data = NEW_C_HEAP_ARRAY(T, _length, mtGC); --- 28,41 ---- #include "gc/shared/workerDataArray.hpp" #include "memory/allocation.inline.hpp" #include "utilities/ostream.hpp" template <typename T> ! WorkerDataArray<T>::WorkerDataArray(const char* short_name, const char* title, uint length, bool is_serial) : _data(NULL), _length(length), + _short_name(short_name), _title(title), _is_serial(is_serial) { assert(length > 0, "Must have some workers to store data for"); assert(!is_serial || length == 1, "Serial phase must only have a single entry."); _data = NEW_C_HEAP_ARRAY(T, _length, mtGC);
*** 68,78 **** template <typename T> void WorkerDataArray<T>::create_thread_work_items(const char* title, uint index, uint length_override) { assert(index < MaxThreadWorkItems, "Tried to access thread work item %u (max %u)", index, MaxThreadWorkItems); assert(_thread_work_items[index] == NULL, "Tried to overwrite existing thread work item"); uint length = length_override != 0 ? length_override : _length; ! _thread_work_items[index] = new WorkerDataArray<size_t>(title, length); } template <typename T> void WorkerDataArray<T>::set_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); --- 69,79 ---- template <typename T> void WorkerDataArray<T>::create_thread_work_items(const char* title, uint index, uint length_override) { assert(index < MaxThreadWorkItems, "Tried to access thread work item %u (max %u)", index, MaxThreadWorkItems); assert(_thread_work_items[index] == NULL, "Tried to overwrite existing thread work item"); uint length = length_override != 0 ? length_override : _length; ! _thread_work_items[index] = new WorkerDataArray<size_t>(NULL, title, length); } template <typename T> void WorkerDataArray<T>::set_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);
< prev index next >