8304448: Kitchensink failed: assert(!thread->is_in_any_VTMS_transition()) failed: class prepare events are not allowed in any VTMS transition
Co-authored-by: Alan Bateman <alanb@openjdk.org> Reviewed-by: rpressler, alanb
This commit is contained in:
parent
3b88b2a9f8
commit
554bccf046
@ -31,12 +31,8 @@ import jdk.internal.vm.annotation.DontInline;
|
||||
import jdk.internal.vm.annotation.IntrinsicCandidate;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
|
||||
import java.lang.invoke.MethodHandles;
|
||||
import java.lang.invoke.VarHandle;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Supplier;
|
||||
import jdk.internal.access.JavaLangAccess;
|
||||
import jdk.internal.access.SharedSecrets;
|
||||
@ -46,6 +42,7 @@ import jdk.internal.access.SharedSecrets;
|
||||
*/
|
||||
public class Continuation {
|
||||
private static final Unsafe U = Unsafe.getUnsafe();
|
||||
private static final long MOUNTED_OFFSET = U.objectFieldOffset(Continuation.class, "mounted");
|
||||
private static final boolean PRESERVE_SCOPED_VALUE_CACHE;
|
||||
private static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess();
|
||||
static {
|
||||
@ -58,8 +55,6 @@ public class Continuation {
|
||||
PRESERVE_SCOPED_VALUE_CACHE = (value == null) || Boolean.parseBoolean(value);
|
||||
}
|
||||
|
||||
private static final VarHandle MOUNTED;
|
||||
|
||||
/** Reason for pinning */
|
||||
public enum Pinned {
|
||||
/** Native frame on stack */ NATIVE,
|
||||
@ -104,9 +99,6 @@ public class Continuation {
|
||||
|
||||
// init Pinned to avoid classloading during mounting
|
||||
pinnedReason(2);
|
||||
|
||||
MethodHandles.Lookup l = MethodHandles.lookup();
|
||||
MOUNTED = l.findVarHandle(Continuation.class, "mounted", boolean.class);
|
||||
} catch (Exception e) {
|
||||
throw new InternalError(e);
|
||||
}
|
||||
@ -125,7 +117,7 @@ public class Continuation {
|
||||
private StackChunk tail;
|
||||
|
||||
private boolean done;
|
||||
private volatile boolean mounted = false;
|
||||
private volatile boolean mounted;
|
||||
private Object yieldInfo;
|
||||
private boolean preempted;
|
||||
|
||||
@ -461,9 +453,8 @@ public class Continuation {
|
||||
}
|
||||
|
||||
private boolean compareAndSetMounted(boolean expectedValue, boolean newValue) {
|
||||
boolean res = MOUNTED.compareAndSet(this, expectedValue, newValue);
|
||||
return res;
|
||||
}
|
||||
return U.compareAndSetBoolean(this, MOUNTED_OFFSET, expectedValue, newValue);
|
||||
}
|
||||
|
||||
private void setMounted(boolean newValue) {
|
||||
mounted = newValue; // MOUNTED.setVolatile(this, newValue);
|
||||
|
Loading…
x
Reference in New Issue
Block a user