1 # |
1 # |
2 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. |
2 # Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # |
4 # |
5 # This code is free software; you can redistribute it and/or modify it |
5 # This code is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License version 2 only, as |
6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. Oracle designates this |
7 # published by the Free Software Foundation. Oracle designates this |
40 elif test -x /usr/sbin/system_profiler; then |
40 elif test -x /usr/sbin/system_profiler; then |
41 # Looks like a MacOSX system |
41 # Looks like a MacOSX system |
42 NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'` |
42 NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'` |
43 FOUND_CORES=yes |
43 FOUND_CORES=yes |
44 elif test "x$OPENJDK_BUILD_OS" = xaix ; then |
44 elif test "x$OPENJDK_BUILD_OS" = xaix ; then |
45 NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print [$]4 }'` |
45 NUM_LCPU=`lparstat -m 2> /dev/null | $GREP -o "lcpu=[[0-9]]*" | $CUT -d "=" -f 2` |
46 FOUND_CORES=yes |
46 if test -n "$NUM_LCPU"; then |
|
47 NUM_CORES=$NUM_LCPU |
|
48 FOUND_CORES=yes |
|
49 fi |
47 elif test -n "$NUMBER_OF_PROCESSORS"; then |
50 elif test -n "$NUMBER_OF_PROCESSORS"; then |
48 # On windows, look in the env |
51 # On windows, look in the env |
49 NUM_CORES=$NUMBER_OF_PROCESSORS |
52 NUM_CORES=$NUMBER_OF_PROCESSORS |
50 FOUND_CORES=yes |
53 FOUND_CORES=yes |
51 fi |
54 fi |