20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.util.ArrayList;
25 import java.util.List;
26 import java.util.stream.Collectors;
27
28 import jdk.test.lib.apps.LingeredApp;
29 import jdk.test.lib.apps.LingeredAppWithDeadlock;
30
31 import jdk.testlibrary.Utils;
32 import jdk.testlibrary.Platform;
33 import jdk.testlibrary.JDKToolLauncher;
34 import jdk.testlibrary.OutputAnalyzer;
35 import jdk.testlibrary.ProcessTools;
36
37 /*
38 * @test
39 * @summary Test deadlock detection
40 * @library /../../test/lib/share/classes
41 * @library /lib/testlibrary
42 * @modules java.management
43 * @build jdk.testlibrary.*
44 * @build jdk.test.lib.apps.*
45 * @build DeadlockDetectionTest
46 * @run main DeadlockDetectionTest
47 */
48 public class DeadlockDetectionTest {
49
50 private static LingeredAppWithDeadlock theApp = null;
51 private static ProcessBuilder processBuilder = new ProcessBuilder();
52
53 private static OutputAnalyzer jstack(String... toolArgs) throws Exception {
54 JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jstack");
55 launcher.addVMArg("-XX:+UsePerfData");
56 if (toolArgs != null) {
57 for (String toolArg : toolArgs) {
58 launcher.addToolArg(toolArg);
59 }
60 }
|
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.util.ArrayList;
25 import java.util.List;
26 import java.util.stream.Collectors;
27
28 import jdk.test.lib.apps.LingeredApp;
29 import jdk.test.lib.apps.LingeredAppWithDeadlock;
30
31 import jdk.testlibrary.Utils;
32 import jdk.testlibrary.Platform;
33 import jdk.testlibrary.JDKToolLauncher;
34 import jdk.testlibrary.OutputAnalyzer;
35 import jdk.testlibrary.ProcessTools;
36
37 /*
38 * @test
39 * @summary Test deadlock detection
40 * @library /test/lib/share/classes
41 * @library /lib/testlibrary
42 * @modules java.management
43 * @build jdk.testlibrary.*
44 * @build jdk.test.lib.apps.*
45 * @build DeadlockDetectionTest
46 * @run main DeadlockDetectionTest
47 */
48 public class DeadlockDetectionTest {
49
50 private static LingeredAppWithDeadlock theApp = null;
51 private static ProcessBuilder processBuilder = new ProcessBuilder();
52
53 private static OutputAnalyzer jstack(String... toolArgs) throws Exception {
54 JDKToolLauncher launcher = JDKToolLauncher.createUsingTestJDK("jstack");
55 launcher.addVMArg("-XX:+UsePerfData");
56 if (toolArgs != null) {
57 for (String toolArg : toolArgs) {
58 launcher.addToolArg(toolArg);
59 }
60 }
|