mirror of
https://github.com/darlinghq/darling-openjdk.git
synced 2024-11-23 04:19:43 +00:00
8247560: Shenandoah: heap iteration holds root locks all the time
Reviewed-by: zgu
This commit is contained in:
parent
7a7859a465
commit
9db6fb74df
@ -1283,11 +1283,16 @@ void ShenandoahHeap::object_iterate(ObjectClosure* cl) {
|
||||
|
||||
Stack<oop,mtGC> oop_stack;
|
||||
|
||||
// First, we process GC roots according to current GC cycle. This populates the work stack with initial objects.
|
||||
ShenandoahHeapIterationRootScanner rp;
|
||||
ObjectIterateScanRootClosure oops(&_aux_bit_map, &oop_stack);
|
||||
|
||||
rp.roots_do(&oops);
|
||||
{
|
||||
// First, we process GC roots according to current GC cycle.
|
||||
// This populates the work stack with initial objects.
|
||||
// It is important to relinquish the associated locks before diving
|
||||
// into heap dumper.
|
||||
ShenandoahHeapIterationRootScanner rp;
|
||||
rp.roots_do(&oops);
|
||||
}
|
||||
|
||||
// Work through the oop stack to traverse heap.
|
||||
while (! oop_stack.is_empty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user