--- old/test/gc/shenandoah/options/TestExplicitGC.java 2019-11-11 16:10:28.378341154 +0100 +++ new/test/gc/shenandoah/options/TestExplicitGC.java 2019-11-11 16:10:28.290341159 +0100 @@ -1,4 +1,4 @@ -/* +'/* * Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved. * * This code is free software; you can redistribute it and/or modify it @@ -51,11 +51,16 @@ "Pause Full" }; - String[] concurrent = new String[] { + String[] concNormal = new String[] { "Pause Init Mark", "Pause Final Mark", }; + String[] concTraversal = new String[] { + "Pause Init Traversal", + "Pause Final Traversal", + }; + { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( "-XX:+UnlockExperimentalVMOptions", @@ -67,9 +72,12 @@ for (String p : full) { output.shouldNotContain(p); } - for (String p : concurrent) { + for (String p : concNormal) { output.shouldContain(p); } + for (String p : concTraversal) { + output.shouldNotContain(p); + } } { @@ -84,7 +92,10 @@ for (String p : full) { output.shouldNotContain(p); } - for (String p : concurrent) { + for (String p : concNormal) { + output.shouldNotContain(p); + } + for (String p : concTraversal) { output.shouldNotContain(p); } } @@ -101,9 +112,12 @@ for (String p : full) { output.shouldNotContain(p); } - for (String p : concurrent) { + for (String p : concNormal) { output.shouldContain(p); } + for (String p : concTraversal) { + output.shouldNotContain(p); + } } { @@ -111,6 +125,27 @@ "-XX:+UnlockExperimentalVMOptions", "-XX:+UseShenandoahGC", "-verbose:gc", + "-XX:+ExplicitGCInvokesConcurrent", + "-XX:ShenandoahGCMode=traversal", + TestExplicitGC.class.getName(), + "test"); + OutputAnalyzer output = new OutputAnalyzer(pb.start()); + for (String p : full) { + output.shouldNotContain(p); + } + for (String p : concNormal) { + output.shouldNotContain(p); + } + for (String p : concTraversal) { + output.shouldContain(p); + } + } + + { + ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( + "-XX:+UnlockExperimentalVMOptions", + "-XX:+UseShenandoahGC", + "-verbose:gc", "-XX:-ExplicitGCInvokesConcurrent", TestExplicitGC.class.getName(), "test"); @@ -118,7 +153,10 @@ for (String p : full) { output.shouldContain(p); } - for (String p : concurrent) { + for (String p : concNormal) { + output.shouldNotContain(p); + } + for (String p : concTraversal) { output.shouldNotContain(p); } }