common/autoconf/build-performance.m4

changeset 2458
daa47f8cf745
parent 2316
64a3eeabf6e5
parent 2451
2cd484c5b7f8
     1.1 --- a/common/autoconf/build-performance.m4	Sat Nov 09 20:15:27 2019 +0800
     1.2 +++ b/common/autoconf/build-performance.m4	Sat Nov 09 20:29:44 2019 +0800
     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

mercurial