8247670: Shenandoah: deadlock during class unloading OOME

Reviewed-by: rkennke
This commit is contained in:
Zhengyu Gu 2020-07-10 11:40:57 -04:00
parent 985061ac28
commit 086124845f

View File

@ -273,6 +273,7 @@ public:
// Heal oops and disarm // Heal oops and disarm
if (_bs->is_armed(nm)) { if (_bs->is_armed(nm)) {
ShenandoahEvacOOMScope oom_evac_scope;
ShenandoahNMethod::heal_nmethod_metadata(nm_data); ShenandoahNMethod::heal_nmethod_metadata(nm_data);
_bs->disarm(nm); _bs->disarm(nm);
} }
@ -311,7 +312,6 @@ public:
virtual void work(uint worker_id) { virtual void work(uint worker_id) {
ICRefillVerifierMark mark(_verifier); ICRefillVerifierMark mark(_verifier);
ShenandoahEvacOOMScope evac_scope;
_iterator.nmethods_do(&_cl); _iterator.nmethods_do(&_cl);
} }