602 fatal("%s: Thread %s: expected gc-state %d, actual %d", _label, t->name(), _expected, actual); |
602 fatal("%s: Thread %s: expected gc-state %d, actual %d", _label, t->name(), _expected, actual); |
603 } |
603 } |
604 } |
604 } |
605 }; |
605 }; |
606 |
606 |
|
607 class ShenandoahGCStateResetter : public StackObj { |
|
608 private: |
|
609 ShenandoahHeap* const _heap; |
|
610 char _gc_state; |
|
611 |
|
612 public: |
|
613 ShenandoahGCStateResetter() : _heap(ShenandoahHeap::heap()) { |
|
614 _gc_state = _heap->gc_state(); |
|
615 _heap->_gc_state.clear(); |
|
616 } |
|
617 |
|
618 ~ShenandoahGCStateResetter() { |
|
619 _heap->_gc_state.set(_gc_state); |
|
620 assert(_heap->gc_state() == _gc_state, "Should be restored"); |
|
621 } |
|
622 }; |
|
623 |
607 void ShenandoahVerifier::verify_at_safepoint(const char *label, |
624 void ShenandoahVerifier::verify_at_safepoint(const char *label, |
608 VerifyForwarded forwarded, VerifyMarked marked, |
625 VerifyForwarded forwarded, VerifyMarked marked, |
609 VerifyCollectionSet cset, |
626 VerifyCollectionSet cset, |
610 VerifyLiveness liveness, VerifyRegions regions, |
627 VerifyLiveness liveness, VerifyRegions regions, |
611 VerifyGCState gcstate) { |
628 VerifyGCState gcstate) { |