Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Need to change the method for determining the number of CPUs on Linux
https://bugs.webkit.org/show_bug.cgi?id=273675 Reviewed by Carlos Garcia Campos. Try to use sysconf(_SC_NPROCESSORS_ONLN) on Linux to determine the amount of usable CPU cores. While Perl provides access to the function in its POSIX module, the _SC_NPROCESSORS_ONLN constant is not defined and the value of the constant is used instead. Using the value is fine as it is part of the user space API and not expected to ever change. As a fallback, make Perl parse /proc/cpuinfo directly instead of shelling out to a cat|grep pipeline: Perl knows how to regex and how to count just fine. * Tools/Scripts/webkitdirs.pm: (determineNumberOfCPUs): Replace usage of nproc command with sysconf, update /proc/cpuinfo parsing fallback. Canonical link: https://commits.webkit.org/278879@main
- Loading branch information