Looks good.

/Erik

On 2020-05-07 08:11, Magnus Ihse Bursie wrote:
On some systems the format of /proc/cpuinfo differs from what build-performance.m4 expects. This patch will look for lines beginning with "CPU" if no lines with "processor" is found.

Bug: https://bugs.openjdk.java.net/browse/JDK-8244615
Patch inline:
diff --git a/make/autoconf/build-performance.m4 b/make/autoconf/build-performance.m4
--- a/make/autoconf/build-performance.m4
+++ b/make/autoconf/build-performance.m4
@@ -32,7 +32,12 @@
   if test -f /proc/cpuinfo; then
     # Looks like a Linux (or cygwin) system
     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
-    FOUND_CORES=yes
+    if test "$NUM_CORES" -eq "0"; then
+      NUM_CORES=`cat /proc/cpuinfo  | grep -c ^CPU`
+    fi
+    if test "$NUM_CORES" -ne "0"; then
+      FOUND_CORES=yes
+    fi
   elif test -x /usr/sbin/psrinfo; then
     # Looks like a Solaris system
     NUM_CORES=`/usr/sbin/psrinfo -v | grep -c on-line`

/Magnus

Reply via email to