< prev index next > test/jdk/jdk/internal/vm/Continuation/Basic.java
Print this page
/*
! * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
/*
! * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
/**
* @test
* @summary Basic tests for jdk.internal.vm.Continuation
* @requires vm.continuations
* @modules java.base/jdk.internal.vm
+ * @library /test/lib
* @build java.base/java.lang.StackWalkerHelper
*
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:+ShowHiddenFrames -Xint Basic
*
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:+ShowHiddenFrames -Xcomp -XX:TieredStopAtLevel=3 -XX:CompileOnly=jdk.internal.vm.Continuation::*,Basic::* Basic
/**
* @test
* @requires vm.continuations
* @requires vm.debug
* @modules java.base/jdk.internal.vm
+ * @library /test/lib
* @build java.base/java.lang.StackWalkerHelper
*
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:+ShowHiddenFrames -XX:+VerifyStack -Xint Basic
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:+ShowHiddenFrames -XX:+VerifyStack -Xcomp -XX:TieredStopAtLevel=3 -XX:CompileOnly=jdk.internal.vm.Continuation::*,Basic::* Basic
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:+ShowHiddenFrames -XX:+VerifyStack -Xcomp -XX:-TieredCompilation -XX:CompileOnly=jdk.internal.vm.Continuation::*,Basic::* Basic
*/
import jdk.internal.vm.Continuation;
import jdk.internal.vm.ContinuationScope;
+ import jdk.test.lib.Platform;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
return "" + r;
}
@Test
public void testPinnedMonitor() {
+ if (Platform.isX64() || Platform.isAArch64() || Platform.isRISCV64()) return;
+
// Test pinning due to held monitor
final AtomicReference<Continuation.Pinned> res = new AtomicReference<>();
Continuation cont = new Continuation(FOO, ()-> {
syncFoo(1);
< prev index next >