--- jsr166/src/test/tck/JSR166TestCase.java 2015/10/08 22:39:57 1.170 +++ jsr166/src/test/tck/JSR166TestCase.java 2015/10/08 23:06:01 1.171 @@ -20,6 +20,8 @@ import java.lang.management.ThreadMXBean import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.lang.reflect.Modifier; +import java.nio.file.Files; +import java.nio.file.Paths; import java.security.CodeSource; import java.security.Permission; import java.security.PermissionCollection; @@ -52,6 +54,7 @@ import java.util.concurrent.ThreadFactor import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicReference; +import java.util.regex.Matcher; import java.util.regex.Pattern; import junit.framework.AssertionFailedError; @@ -207,6 +210,7 @@ public class JSR166TestCase extends Test + lastTestCase + " (" + currentRun + "/" + runsPerTest + ")"); System.err.println("availableProcessors=" + Runtime.getRuntime().availableProcessors()); + System.err.printf("cpu model = %s%n", cpuModel()); dumpTestThreads(); // one stack dump is probably enough; more would be spam break; @@ -218,6 +222,16 @@ public class JSR166TestCase extends Test thread.start(); } + public static String cpuModel() { + try { + Matcher matcher = Pattern.compile("model name\\s*: (.*)") + .matcher(new String( + Files.readAllBytes(Paths.get("/proc/cpuinfo")), "UTF-8")); + matcher.find(); + return matcher.group(1); + } catch (Exception ex) { return null; } + } + public void runBare() throws Throwable { currentTestCase = this; if (methodFilter == null