Skip to content

Commit

Permalink
add separate tests to SysmMapTest for ZGC case
Browse files Browse the repository at this point in the history
  • Loading branch information
stooke committed Dec 20, 2024
1 parent 4d77dba commit 7c1d72e
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
14 changes: 13 additions & 1 deletion test/hotspot/jtreg/serviceability/dcmd/vm/SystemDumpMapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

/*
* @test
* @summary Test of diagnostic command System.map
* @summary Test of diagnostic command System.dump_map
* @library /test/lib
* @requires (os.family == "linux" | os.family == "windows" | os.family == "mac")
* @modules java.base/jdk.internal.misc
Expand All @@ -42,6 +42,18 @@
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run testng/othervm -XX:+UsePerfData SystemDumpMapTest
*/

/*
* @test
* @summary Test of diagnostic command System.dump_map using ZGC
* @library /test/lib
* @requires (os.family == "linux" | os.family == "windows" | os.family == "mac")
* @modules java.base/jdk.internal.misc
* java.compiler
* java.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run testng/othervm -XX:+UsePerfData -XX:+UseZGC SystemDumpMapTest
*/
public class SystemDumpMapTest extends SystemMapTestBase {

private void run_test(CommandExecutor executor, boolean useDefaultFileName) {
Expand Down
12 changes: 12 additions & 0 deletions test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run testng/othervm -XX:+UsePerfData SystemMapTest
*/

/*
* @test
* @summary Test of diagnostic command System.map using ZGC
* @library /test/lib
* @requires (os.family == "linux" | os.family == "windows" | os.family == "mac")
* @modules java.base/jdk.internal.misc
* java.compiler
* java.management
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @run testng/othervm -XX:+UsePerfData -XX:+UseZGC SystemMapTest
*/
public class SystemMapTest extends SystemMapTestBase {
public void run(CommandExecutor executor) {
OutputAnalyzer output = executor.execute("System.map");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ private static class MacOSPatterns implements MapPatterns {

static final String macow = "cow";
static final String macprivate = "pvt";
static final String macprivate_or_shared = "(pvt|tsh)";
static final String macshared = "pvt";
static final String macprivatealiased = "p/a";

static final String macOSbase = range + space + someSize + space + macprot + space;
Expand All @@ -173,7 +173,7 @@ private static class MacOSPatterns implements MapPatterns {

static final String shouldMatchIfNMTIsEnabled_macOS[] = {
// heap is private with G1GC, shared with ZGC
macOSbase + macprivate_or_shared + space + someNumber + space + "JAVAHEAP.*",
macOSbase + macprivate + space + someNumber + space + "JAVAHEAP.*",
// metaspace
macOSbase + macprivate + space + someNumber + space + "META.*",
// code cache
Expand Down

0 comments on commit 7c1d72e

Please sign in to comment.