RFR: 8302155: [AIX] NUM_LCPU is not required variable

Magnus Ihse Bursie ihse at openjdk.org
Mon Feb 13 14:25:31 UTC 2023


On Thu, 9 Feb 2023 15:21:42 GMT, Amit Kumar <duke at openjdk.org> wrote:

> We don't need NUM_LCPU, it's just a small code change which removes this variable. I've tested it on AIX and cores are detected successfully with changes. 
> @backwaterred please take look at it. 
>  Suggestions are welcomed :)

(github needs me to repeat the comment here)

make/autoconf/build-performance.m4 line 41:

> 39:     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
> 40:   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
> 41:     NUM_CORES=`lparstat -m 2> /dev/null | $GREP -o "lcpu=[[0-9]]*" | $CUT -d "=" -f 2`

The assignment of `NUM_CORES=0` on line 29 was to cover the case that `lparstat` failed. If you are certain that it works, fine, make this change. But please also remove the unnecessary initialization of `NUM_CORES` then.

-------------

Changes requested by ihse (Reviewer).

PR: https://git.openjdk.org/jdk/pull/12494



More information about the build-dev mailing list