[webkit-changes] [WebKit/WebKit] 9bf347: Need to change the method for determining the numb...

Adrian Perez noreply at github.com
Thu May 16 11:54:25 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9bf347ad34b389847eb5238221eeb0b4d4b42a15
      https://github.com/WebKit/WebKit/commit/9bf347ad34b389847eb5238221eeb0b4d4b42a15
  Author: Adrian Perez de Castro <aperez at igalia.com>
  Date:   2024-05-16 (Thu, 16 May 2024)

  Changed paths:
    M Tools/Scripts/webkitdirs.pm

  Log Message:
  -----------
  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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list