aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraleonard <unknown>2019-08-22 17:51:13 +0100
committerbell-sw <liberica@bell-sw.com>2019-10-23 16:22:15 +0300
commit8d9bf3662a3539113f662b02bfd4f29002073c19 (patch)
tree1be29b0a597ded8506811f12572fd214427cdac4
parenta5dcaa3947c587042b6c8ab64b10fdc9ad753a15 (diff)
downloadjdk8u-8d9bf3662a3539113f662b02bfd4f29002073c19.tar.gz
8217896: Make better use of LCPUs when building on AIX
Reviewed-by: sgehwolf, andrew Contributed-by: andrew_m_leonard@uk.ibm.com
-rw-r--r--common/autoconf/build-performance.m49
-rw-r--r--common/autoconf/generated-configure.sh11
2 files changed, 13 insertions, 7 deletions
diff --git a/common/autoconf/build-performance.m4 b/common/autoconf/build-performance.m4
index ea4a99e..8f03538 100644
--- a/common/autoconf/build-performance.m4
+++ b/common/autoconf/build-performance.m4
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -42,8 +42,11 @@ AC_DEFUN([BPERF_CHECK_CORES],
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
FOUND_CORES=yes
elif test "x$OPENJDK_BUILD_OS" = xaix ; then
- NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print [$]4 }'`
- FOUND_CORES=yes
+ NUM_LCPU=`lparstat -m 2> /dev/null | $GREP -o "lcpu=[[0-9]]*" | $CUT -d "=" -f 2`
+ if test -n "$NUM_LCPU"; then
+ NUM_CORES=$NUM_LCPU
+ FOUND_CORES=yes
+ fi
elif test -n "$NUMBER_OF_PROCESSORS"; then
# On windows, look in the env
NUM_CORES=$NUMBER_OF_PROCESSORS
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index 3d154b1..15f0021 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -3647,7 +3647,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -4376,7 +4376,7 @@ VS_SDK_PLATFORM_NAME_2017=
#CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1560366811
+DATE_WHEN_GENERATED=1565358475
###############################################################################
#
@@ -51982,8 +51982,11 @@ $as_echo_n "checking for number of cores... " >&6; }
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print $5}'`
FOUND_CORES=yes
elif test "x$OPENJDK_BUILD_OS" = xaix ; then
- NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
- FOUND_CORES=yes
+ NUM_LCPU=`lparstat -m 2> /dev/null | $GREP -o "lcpu=[0-9]*" | $CUT -d "=" -f 2`
+ if test -n "$NUM_LCPU"; then
+ NUM_CORES=$NUM_LCPU
+ FOUND_CORES=yes
+ fi
elif test -n "$NUMBER_OF_PROCESSORS"; then
# On windows, look in the env
NUM_CORES=$NUMBER_OF_PROCESSORS