< prev index next >

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

Print this page
rev 54087 : imported patch 8218668-reorganize-collection-set

@@ -90,10 +90,17 @@
     _thread_work_items[index]->add(worker_i, value);
   }
 }
 
 template <typename T>
+size_t WorkerDataArray<T>::get_thread_work_item(uint worker_i, 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");
+  return _thread_work_items[index]->get(worker_i);
+}
+
+template <typename T>
 void WorkerDataArray<T>::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);
   _data[worker_i] += value;
 }
< prev index next >