Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8298073: gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java causes …
…test task timeout on macosx

8241293: CompressedClassSpaceSizeInJmapHeap.java time out after 8 minutes

Reviewed-by: phh
Backport-of: 99a6c47855ad82e81a80726cf3aa4522c547716d
  • Loading branch information
GoeLin committed Feb 8, 2023
1 parent beaf5b1 commit a15041a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 0 additions & 1 deletion test/hotspot/jtreg/ProblemList.txt
Expand Up @@ -81,7 +81,6 @@ gc/stress/gclocker/TestExcessGCLockerCollections.java 8229120 generic-all
gc/stress/gclocker/TestGCLockerWithParallel.java 8180622 generic-all
gc/stress/gclocker/TestGCLockerWithG1.java 8180622 generic-all
gc/stress/TestJNIBlockFullGC/TestJNIBlockFullGC.java 8192647 generic-all
gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java 8241293 macosx-x64

applications/jcstress/acqrel.java 8277434 linux-aarch64

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022, 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
Expand Down Expand Up @@ -32,10 +32,11 @@
* @library /test/lib
* @modules java.base/jdk.internal.misc
* java.management
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:CompressedClassSpaceSize=48m gc.metaspace.CompressedClassSpaceSizeInJmapHeap
* @run main/timeout=240 gc.metaspace.CompressedClassSpaceSizeInJmapHeap
*/

import jdk.test.lib.JDKToolLauncher;
import jdk.test.lib.apps.LingeredApp;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
import jdk.test.lib.SA.SATestUtils;
Expand All @@ -49,7 +50,9 @@ public class CompressedClassSpaceSizeInJmapHeap {
public static void main(String[] args) throws Exception {
SATestUtils.skipIfCannotAttach(); // throws SkippedException if attach not expected to work.

String pid = Long.toString(ProcessTools.getProcessId());
LingeredApp theApp = new LingeredApp();
LingeredApp.startApp(theApp, "-XX:CompressedClassSpaceSize=48m");
String pid = Long.toString(theApp.getPid());

JDKToolLauncher jmap = JDKToolLauncher.create("jhsdb")
.addToolArg("jmap")
Expand All @@ -69,6 +72,8 @@ public static void main(String[] args) throws Exception {
OutputAnalyzer output = new OutputAnalyzer(read(out));
output.shouldContain("CompressedClassSpaceSize = 50331648 (48.0MB)");
out.delete();

LingeredApp.stopApp(theApp);
}

private static void run(ProcessBuilder pb) throws Exception {
Expand Down

1 comment on commit a15041a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.