mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6984287: Regularize how GC parallel workers are specified
Associate number of GC workers with the workgang as opposed to the task. Reviewed-by: johnc, ysr
This commit is contained in:
parent
3af63c10ab
commit
28e56b8970
29 changed files with 504 additions and 216 deletions
|
@ -305,6 +305,12 @@ bool GenericTaskQueue<E, N>::push_slow(E t, uint dirty_n_elems) {
|
|||
return false;
|
||||
}
|
||||
|
||||
// pop_local_slow() is done by the owning thread and is trying to
|
||||
// get the last task in the queue. It will compete with pop_global()
|
||||
// that will be used by other threads. The tag age is incremented
|
||||
// whenever the queue goes empty which it will do here if this thread
|
||||
// gets the last task or in pop_global() if the queue wraps (top == 0
|
||||
// and pop_global() succeeds, see pop_global()).
|
||||
template<class E, unsigned int N>
|
||||
bool GenericTaskQueue<E, N>::pop_local_slow(uint localBot, Age oldAge) {
|
||||
// This queue was observed to contain exactly one element; either this
|
||||
|
@ -637,6 +643,9 @@ public:
|
|||
// in an MT-safe manner, once the previous round of use of
|
||||
// the terminator is finished.
|
||||
void reset_for_reuse();
|
||||
// Same as above but the number of parallel threads is set to the
|
||||
// given number.
|
||||
void reset_for_reuse(int n_threads);
|
||||
|
||||
#ifdef TRACESPINNING
|
||||
static uint total_yields() { return _total_yields; }
|
||||
|
@ -782,3 +791,4 @@ typedef GenericTaskQueueSet<OopStarTaskQueue> OopStarTaskQueueSet;
|
|||
|
||||
typedef OverflowTaskQueue<size_t> RegionTaskQueue;
|
||||
typedef GenericTaskQueueSet<RegionTaskQueue> RegionTaskQueueSet;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue