--- old/src/hotspot/share/gc/shared/collectedHeap.hpp 2018-02-16 14:08:21.753402222 +0100 +++ new/src/hotspot/share/gc/shared/collectedHeap.hpp 2018-02-16 14:08:21.600395640 +0100 @@ -622,16 +622,12 @@ GCCause::Cause _previous_cause; public: GCCauseSetter(CollectedHeap* heap, GCCause::Cause cause) { - assert(SafepointSynchronize::is_at_safepoint(), - "This method manipulates heap state without locking"); _heap = heap; _previous_cause = _heap->gc_cause(); _heap->set_gc_cause(cause); } ~GCCauseSetter() { - assert(SafepointSynchronize::is_at_safepoint(), - "This method manipulates heap state without locking"); _heap->set_gc_cause(_previous_cause); } };