changeset 49198:68b283918441

8198269: Allow GCCauseSetter to be used outside of safepoints Reviewed-by: stefank, sjohanss
author pliden
date Mon, 19 Feb 2018 15:44:56 +0100
parents f7caa2aecc86
children 6d61be5959e0
files src/hotspot/share/gc/shared/collectedHeap.hpp
diffstat 1 files changed, 0 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/shared/collectedHeap.hpp	Mon Feb 19 15:07:21 2018 +0100
+++ b/src/hotspot/share/gc/shared/collectedHeap.hpp	Mon Feb 19 15:44:56 2018 +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);
   }
 };