8222188: Shenandoah: Adjust Shenandoah work gang types
Reviewed-by: shade, rkennke
This commit is contained in:
parent
15aae2f622
commit
96545959e8
@ -459,8 +459,8 @@ ShenandoahHeap::ShenandoahHeap(ShenandoahCollectorPolicy* policy) :
|
||||
|
||||
_max_workers = MAX2(_max_workers, 1U);
|
||||
_workers = new ShenandoahWorkGang("Shenandoah GC Threads", _max_workers,
|
||||
/* are_GC_task_threads */true,
|
||||
/* are_ConcurrentGC_threads */false);
|
||||
/* are_GC_task_threads */ true,
|
||||
/* are_ConcurrentGC_threads */ true);
|
||||
if (_workers == NULL) {
|
||||
vm_exit_during_initialization("Failed necessary allocation.");
|
||||
} else {
|
||||
@ -470,7 +470,8 @@ ShenandoahHeap::ShenandoahHeap(ShenandoahCollectorPolicy* policy) :
|
||||
if (ShenandoahParallelSafepointThreads > 1) {
|
||||
_safepoint_workers = new ShenandoahWorkGang("Safepoint Cleanup Thread",
|
||||
ShenandoahParallelSafepointThreads,
|
||||
false, false);
|
||||
/* are_GC_task_threads */ false,
|
||||
/* are_ConcurrentGC_threads */ false);
|
||||
_safepoint_workers->initialize_workers();
|
||||
}
|
||||
}
|
||||
|
@ -76,8 +76,11 @@ ShenandoahTerminationTracker::ShenandoahTerminationTracker(ShenandoahPhaseTiming
|
||||
phase == ShenandoahPhaseTimings::full_gc_weakrefs_termination,
|
||||
"Only these phases");
|
||||
|
||||
assert(Thread::current()->is_VM_thread() || Thread::current()->is_ConcurrentGC_thread(),
|
||||
"Called from wrong thread");
|
||||
assert(!Thread::current()->is_Worker_thread() &&
|
||||
(Thread::current()->is_VM_thread() ||
|
||||
Thread::current()->is_ConcurrentGC_thread()),
|
||||
"Called from wrong thread");
|
||||
|
||||
_current_termination_phase = phase;
|
||||
ShenandoahHeap::heap()->phase_timings()->termination_times()->reset();
|
||||
}
|
||||
|
@ -100,9 +100,10 @@ ShenandoahGCPauseMark::~ShenandoahGCPauseMark() {
|
||||
|
||||
ShenandoahGCPhase::ShenandoahGCPhase(const ShenandoahPhaseTimings::Phase phase) :
|
||||
_heap(ShenandoahHeap::heap()), _phase(phase) {
|
||||
assert(Thread::current()->is_VM_thread() ||
|
||||
Thread::current()->is_ConcurrentGC_thread(),
|
||||
"Must be set by these threads");
|
||||
assert(!Thread::current()->is_Worker_thread() &&
|
||||
(Thread::current()->is_VM_thread() ||
|
||||
Thread::current()->is_ConcurrentGC_thread()),
|
||||
"Must be set by these threads");
|
||||
_parent_phase = _current_phase;
|
||||
_current_phase = phase;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user