Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c7eb356e88103dcd676246fdffdeb979b2a591bd
https://github.com/WebKit/WebKit/commit/c7eb356e88103dcd676246fdffdeb979b2a591bd
Author: Dewei Zhu <[email protected]>
Date: 2026-10-02 (Fri, 02 Oct 2026)
Changed paths:
M Tools/Scripts/collect-pgo-profiles
M Tools/Scripts/webkitpy/llvm_profile_utils.py
M Tools/Scripts/webkitpy/llvm_profile_utils_unittest.py
Log Message:
-----------
Fix a bug that coolect-pgo-profiles can produce profiles with different
versions in one invocation.
https://bugs.webkit.org/show_bug.cgi?id=326053
rdar://188988850
Reviewed by Jonathan Bedard.
ExecutablesFromEnvAndXcode.preference_ordered_paths moved to the next
llvm-profdata before every call instead of reusing the last one that worked.
With several llvm-profdata versions installed, each framework could be merged
by a different version, and the output takes the format of the binary that
wrote it.
The fix is keeping using the last llvm-profdata that worked, and move to the
next one only when it fails. Order llvm-profdata binaries by version, oldest
first, with unversioned ones last.
Pass --verbose from collect-pgo-profiles to every pgo-profile sub-command so
the exact llvm-profdata command shows in the log.
* Tools/Scripts/collect-pgo-profiles:
(collect_pgo_profiles):
(main):
* Tools/Scripts/webkitpy/llvm_profile_utils.py:
(ExecutablesFromEnvAndXcode):
(ExecutablesFromEnvAndXcode.order_binaries):
(ExecutablesFromEnvAndXcode.detect_binaries):
(ExecutablesFromEnvAndXcode.preference_ordered_paths):
(ExecutablesFromEnvAndXcode.run):
(LLVMProfDataExecutable):
(LLVMProfDataExecutable.binary_version):
(LLVMProfDataExecutable.order_binaries):
* Tools/Scripts/webkitpy/llvm_profile_utils_unittest.py:
(LLVMProfDataExecutableTest):
(LLVMProfDataExecutableTest._executable_class):
(LLVMProfDataExecutableTest._executable_class.Executable):
(LLVMProfDataExecutableTest._executable_class.run):
(LLVMProfDataExecutableTest.test_detected_binaries_are_ordered_from_oldest_to_newest_version):
(LLVMProfDataExecutableTest.test_versions_compare_numerically):
(LLVMProfDataExecutableTest.test_binaries_without_a_version_go_after_the_versioned_ones):
(LLVMProfDataExecutableTest.test_a_binary_that_cannot_be_launched_has_no_version):
(LLVMProfDataExecutableTest.test_the_last_working_binary_keeps_being_used):
(LLVMProfDataExecutableTest.test_a_failing_binary_falls_back_and_the_fallback_sticks):
(LLVMProfDataExecutableTest.test_when_the_preferred_binary_stops_working_the_next_one_is_tried_before_wrapping_around):
(LLVMProfDataExecutableTest.test_every_binary_is_tried_once_when_all_fail):
Canonical link: https://commits.webkit.org/322526@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications