10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /** 25 * @test TestUseNUMAInterleaving 26 * @summary Tests that UseNUMAInterleaving enabled for all collectors by 27 * ergonomics, on all platforms when UseNUMA feature is enabled. 28 * @bug 8059614 29 * @key gc 30 * @library /testlibrary 31 * @modules java.base/jdk.internal.misc 32 * java.management 33 * @run driver TestUseNUMAInterleaving 34 */ 35 import jdk.test.lib.ProcessTools; 36 import jdk.test.lib.OutputAnalyzer; 37 38 public class TestUseNUMAInterleaving { 39 40 public static void main(String[] args) throws Exception { 41 String[] vmargs = new String[]{ 42 "-XX:+UseNUMA", 43 "-XX:+PrintFlagsFinal", 44 "-version" 45 }; 46 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, vmargs); 47 OutputAnalyzer output = new OutputAnalyzer(pb.start()); 48 49 boolean isNUMAEnabled 50 = Boolean.parseBoolean(output.firstMatch(NUMA_FLAG_PATTERN, 1)); 51 52 if (isNUMAEnabled) { 53 output.shouldMatch("\\bUseNUMAInterleaving\\b.*?=.*?true"); 54 System.out.println(output.getStdout()); 55 } else { 56 System.out.println(output.firstMatch(NUMA_FLAG_PATTERN)); | 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 /** 25 * @test TestUseNUMAInterleaving 26 * @summary Tests that UseNUMAInterleaving enabled for all collectors by 27 * ergonomics, on all platforms when UseNUMA feature is enabled. 28 * @bug 8059614 29 * @key gc 30 * @library /test/lib 31 * @modules java.base/jdk.internal.misc 32 * java.management 33 * @run driver TestUseNUMAInterleaving 34 */ 35 import jdk.test.lib.process.OutputAnalyzer; 36 import jdk.test.lib.process.ProcessTools; 37 38 public class TestUseNUMAInterleaving { 39 40 public static void main(String[] args) throws Exception { 41 String[] vmargs = new String[]{ 42 "-XX:+UseNUMA", 43 "-XX:+PrintFlagsFinal", 44 "-version" 45 }; 46 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(true, vmargs); 47 OutputAnalyzer output = new OutputAnalyzer(pb.start()); 48 49 boolean isNUMAEnabled 50 = Boolean.parseBoolean(output.firstMatch(NUMA_FLAG_PATTERN, 1)); 51 52 if (isNUMAEnabled) { 53 output.shouldMatch("\\bUseNUMAInterleaving\\b.*?=.*?true"); 54 System.out.println(output.getStdout()); 55 } else { 56 System.out.println(output.firstMatch(NUMA_FLAG_PATTERN)); |