8217896: Make better use of LCPUs when building on AIX jdk8u232-b05

Thu, 22 Aug 2019 17:51:13 +0100

author
aleonard
date
Thu, 22 Aug 2019 17:51:13 +0100
changeset 2451
2cd484c5b7f8
parent 2450
cd2e5f820a0d
child 2452
a29e19e1c0ee

8217896: Make better use of LCPUs when building on AIX
Reviewed-by: sgehwolf, andrew
Contributed-by: andrew_m_leonard@uk.ibm.com

common/autoconf/build-performance.m4 file | annotate | diff | comparison | revisions
common/autoconf/generated-configure.sh file | annotate | diff | comparison | revisions
     1.1 --- a/common/autoconf/build-performance.m4	Thu Aug 15 02:50:53 2019 +0100
     1.2 +++ b/common/autoconf/build-performance.m4	Thu Aug 22 17:51:13 2019 +0100
     1.3 @@ -1,5 +1,5 @@
     1.4  #
     1.5 -# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
     1.6 +# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
     1.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8  #
     1.9  # This code is free software; you can redistribute it and/or modify it
    1.10 @@ -42,8 +42,11 @@
    1.11      NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print [$]5}'`
    1.12      FOUND_CORES=yes
    1.13    elif test "x$OPENJDK_BUILD_OS" = xaix ; then
    1.14 -    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print [$]4 }'`
    1.15 -    FOUND_CORES=yes
    1.16 +    NUM_LCPU=`lparstat -m 2> /dev/null | $GREP -o "lcpu=[[0-9]]*" | $CUT -d "=" -f 2`
    1.17 +    if test -n "$NUM_LCPU"; then
    1.18 +      NUM_CORES=$NUM_LCPU
    1.19 +      FOUND_CORES=yes
    1.20 +    fi
    1.21    elif test -n "$NUMBER_OF_PROCESSORS"; then
    1.22      # On windows, look in the env
    1.23      NUM_CORES=$NUMBER_OF_PROCESSORS
     2.1 --- a/common/autoconf/generated-configure.sh	Thu Aug 15 02:50:53 2019 +0100
     2.2 +++ b/common/autoconf/generated-configure.sh	Thu Aug 22 17:51:13 2019 +0100
     2.3 @@ -3647,7 +3647,7 @@
     2.4  
     2.5  
     2.6  #
     2.7 -# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
     2.8 +# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
     2.9  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    2.10  #
    2.11  # This code is free software; you can redistribute it and/or modify it
    2.12 @@ -4376,7 +4376,7 @@
    2.13  #CUSTOM_AUTOCONF_INCLUDE
    2.14  
    2.15  # Do not change or remove the following line, it is needed for consistency checks:
    2.16 -DATE_WHEN_GENERATED=1560366811
    2.17 +DATE_WHEN_GENERATED=1565358475
    2.18  
    2.19  ###############################################################################
    2.20  #
    2.21 @@ -51978,8 +51978,11 @@
    2.22      NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
    2.23      FOUND_CORES=yes
    2.24    elif test "x$OPENJDK_BUILD_OS" = xaix ; then
    2.25 -    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
    2.26 -    FOUND_CORES=yes
    2.27 +    NUM_LCPU=`lparstat -m 2> /dev/null | $GREP -o "lcpu=[0-9]*" | $CUT -d "=" -f 2`
    2.28 +    if test -n "$NUM_LCPU"; then
    2.29 +      NUM_CORES=$NUM_LCPU
    2.30 +      FOUND_CORES=yes
    2.31 +    fi
    2.32    elif test -n "$NUMBER_OF_PROCESSORS"; then
    2.33      # On windows, look in the env
    2.34      NUM_CORES=$NUMBER_OF_PROCESSORS

mercurial