Skip to content

[PGO] [BUILD] Compilation fails with --enable-pgo-use #55852

@ptr1337

Description

@ptr1337

Version

23.2.0

Platform

6.11.7

Subsystem

No response

What steps will reproduce the bug?

Archlinux enviroment:

git clone https://github.com/cachyos/cachyos-pkgbuilds
cd nodejs
makepkg -si

How often does it reproduce? Is there a required condition?

All time

What is the expected behavior? Why is that the expected behavior?

Compilation is successful

What do you see instead?

The profile is gathered with "make test". See here:
https://github.com/CachyOS/CachyOS-PKGBUILDS/blob/master/nodejs/PKGBUILD#L53-L83

This issue has been started with node 23.1 - before the compilation was successful
Compilation fails at the second compilation with the PGO profile:

../deps/ada/ada.cpp:13698:6: error: number of counters in profile data for function ‘ada::url_aggregator::set_host_or_hostname<true>(std::basic_string_view<char, std::char_traits<char> >)bool’ does not match its profile data (counter ‘arcs’, expected 246 and have 244) [-Werror=coverage-mismatch]
13698 | bool url_aggregator::set_host_or_hostname(const std::string_view input) {
      |      ^~~~~~~~~~~~~~
../deps/ada/ada.cpp:13698:6: error: the control flow of function ‘ada::url_aggregator::set_host_or_hostname<true>(std::basic_string_view<char, std::char_traits<char> >)bool’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp: In member function ‘ada::url_aggregator::set_host_or_hostname<false>(std::basic_string_view<char, std::char_traits<char> >)bool’:
../deps/ada/ada.cpp:13698:6: error: number of counters in profile data for function ‘ada::url_aggregator::set_host_or_hostname<false>(std::basic_string_view<char, std::char_traits<char> >)bool’ does not match its profile data (counter ‘arcs’, expected 251 and have 249) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp:13698:6: error: the control flow of function ‘ada::url_aggregator::set_host_or_hostname<false>(std::basic_string_view<char, std::char_traits<char> >)bool’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp: In member function ‘ada::url::set_host_or_hostname<true>(std::basic_string_view<char, std::char_traits<char> >)bool’:
../deps/ada/ada.cpp:11912:6: error: the control flow of function ‘ada::url::set_host_or_hostname<true>(std::basic_string_view<char, std::char_traits<char> >)bool’ does not match its profile data (counter ‘arcs’) [-Werror=coverage-mismatch]
11912 | bool url::set_host_or_hostname(const std::string_view input) {
      |      ^~~
../deps/ada/ada.cpp:11912:6: error: the control flow of function ‘ada::url::set_host_or_hostname<true>(std::basic_string_view<char, std::char_traits<char> >)bool’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp: In member function ‘ada::url::set_host_or_hostname<false>(std::basic_string_view<char, std::char_traits<char> >)bool’:
../deps/ada/ada.cpp:11912:6: error: the control flow of function ‘ada::url::set_host_or_hostname<false>(std::basic_string_view<char, std::char_traits<char> >)bool’ does not match its profile data (counter ‘arcs’) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp:11912:6: error: the control flow of function ‘ada::url::set_host_or_hostname<false>(std::basic_string_view<char, std::char_traits<char> >)bool’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp: In function ‘ada::parser::parse_url_impl<ada::url_aggregator, false>(std::basic_string_view<char, std::char_traits<char> >, ada::url_aggregator const*)ada::url_aggregator’:
../deps/ada/ada.cpp:12144:13: error: number of counters in profile data for function ‘ada::parser::parse_url_impl<ada::url_aggregator, false>(std::basic_string_view<char, std::char_traits<char> >, ada::url_aggregator const*)ada::url_aggregator’ does not match its profile data (counter ‘arcs’, expected 601 and have 596) [-Werror=coverage-mismatch]
12144 | result_type parse_url_impl(std::string_view user_input,
      |             ^~~~~~~~~~~~~~
../deps/ada/ada.cpp:12144:13: error: the control flow of function ‘ada::parser::parse_url_impl<ada::url_aggregator, false>(std::basic_string_view<char, std::char_traits<char> >, ada::url_aggregator const*)ada::url_aggregator’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp: In member function ‘ada::url_aggregator::consume_prepared_path(std::basic_string_view<char, std::char_traits<char> >)’:
../deps/ada/ada.cpp:14751:13: error: the control flow of function ‘ada::url_aggregator::consume_prepared_path(std::basic_string_view<char, std::char_traits<char> >)’ does not match its profile data (counter ‘arcs’) [-Werror=coverage-mismatch]
14751 | inline void url_aggregator::consume_prepared_path(std::string_view input) {
      |             ^~~~~~~~~~~~~~
../deps/ada/ada.cpp:14751:13: error: the control flow of function ‘ada::url_aggregator::consume_prepared_path(std::basic_string_view<char, std::char_traits<char> >)’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
  g++ -o /tmp/pkg/src/node/out/Release/obj.target/v8_libbase/deps/v8/src/base/platform/semaphore.o ../deps/v8/src/base/platform/semaphore.cc '-D_GLIBCXX_USE_CXX11_ABI=1' '-DNODE_OPENSSL_CONF_NAME=nodejs_conf' '-DICU_NO_USER_DATA_OVERRIDE' '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64' '-D__STDC_FORMAT_MACROS' '-DV8_TARGET_ARCH_X64' '-DV8_HAVE_TARGET_OS' '-DV8_TARGET_OS_LINUX' '-DV8_EMBEDDER_STRING="-node.11"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION' '-DV8_SHORT_BUILTIN_CALLS' '-DOBJECT_PRINT' '-DV8_INTL_SUPPORT' '-DV8_ATOMIC_OBJECT_FIELD_WRITES' '-DV8_ENABLE_LAZY_SOURCE_POSITIONS' '-DV8_USE_SIPHASH' '-DV8_SHARED_RO_HEAP' '-DNDEBUG' '-DV8_WIN64_UNWINDING_INFO' '-DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH' '-DV8_USE_ZLIB' '-DV8_ENABLE_SPARKPLUG' '-DV8_ENABLE_MAGLEV' '-DV8_ENABLE_TURBOFAN' '-DV8_ENABLE_WEBASSEMBLY' '-DV8_ENABLE_JAVASCRIPT_PROMISE_HOOKS' '-DV8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA' '-DV8_ALLOCATION_FOLDING' '-DV8_ALLOCATION_SITE_TRACKING' '-DV8_ADVANCED_BIGINT_ALGORITHMS' '-DBUILDING_V8_BASE_SHARED' -I../deps/v8 -I../deps/v8/include  -pthread -Wno-unused-parameter -Wno-strict-overflow -Wno-return-type -Wno-int-in-bool-context -Wno-deprecated -Wno-stringop-overflow -Wno-stringop-overread -Wno-restrict -Wno-array-bounds -Wno-nonnull -Wno-dangling-pointer -flax-vector-conversions -m64 -m64 -O3 -flto=4 -fuse-linker-plugin -ffat-lto-objects -fno-omit-frame-pointer -fprofile-use -fprofile-correction -fdata-sections -ffunction-sections -O3 -fno-rtti -fno-exceptions -fno-strict-aliasing -std=gnu++20 -Wno-invalid-offsetof -MMD -MF /tmp/pkg/src/node/out/Release/.deps//tmp/pkg/src/node/out/Release/obj.target/v8_libbase/deps/v8/src/base/platform/semaphore.o.d.raw  -march=native -O3 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -mpclmul -fno-semantic-interposition -Wp,-D_GLIBCXX_ASSERTIONS -g -ffile-prefix-map=/tmp/pkg/src=/usr/src/debug/nodejs -fno-semantic-interposition -c
../deps/ada/ada.cpp: In member function ‘ada::url_aggregator::set_protocol(std::basic_string_view<char, std::char_traits<char> >)’:
../deps/ada/ada.cpp:13392:6: error: the control flow of function ‘ada::url_aggregator::set_protocol(std::basic_string_view<char, std::char_traits<char> >)’ does not match its profile data (counter ‘arcs’) [-Werror=coverage-mismatch]
13392 | bool url_aggregator::set_protocol(const std::string_view input) {
      |      ^~~~~~~~~~~~~~
../deps/ada/ada.cpp:13392:6: error: the control flow of function ‘ada::url_aggregator::set_protocol(std::basic_string_view<char, std::char_traits<char> >)’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp: In function ‘ada::parser::parse_url_impl<ada::url_aggregator, true>(std::basic_string_view<char, std::char_traits<char> >, ada::url_aggregator const*)ada::url_aggregator’:
../deps/ada/ada.cpp:12144:13: error: the control flow of function ‘ada::parser::parse_url_impl<ada::url_aggregator, true>(std::basic_string_view<char, std::char_traits<char> >, ada::url_aggregator const*)ada::url_aggregator’ does not match its profile data (counter ‘arcs’) [-Werror=coverage-mismatch]
12144 | result_type parse_url_impl(std::string_view user_input,
      |             ^~~~~~~~~~~~~~
../deps/ada/ada.cpp:12144:13: error: the control flow of function ‘ada::parser::parse_url_impl<ada::url_aggregator, true>(std::basic_string_view<char, std::char_traits<char> >, ada::url_aggregator const*)ada::url_aggregator’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp: In function ‘ada::parser::parse_url_impl<ada::url, true>(std::basic_string_view<char, std::char_traits<char> >, ada::url const*)ada::url’:
../deps/ada/ada.cpp:12144:13: error: number of counters in profile data for function ‘ada::parser::parse_url_impl<ada::url, true>(std::basic_string_view<char, std::char_traits<char> >, ada::url const*)ada::url’ does not match its profile data (counter ‘arcs’, expected 747 and have 740) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp:12144:13: error: the control flow of function ‘ada::parser::parse_url_impl<ada::url, true>(std::basic_string_view<char, std::char_traits<char> >, ada::url const*)ada::url’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp: In member function ‘ada::url::set_protocol(std::basic_string_view<char, std::char_traits<char> >)’:
../deps/ada/ada.cpp:12091:6: error: the control flow of function ‘ada::url::set_protocol(std::basic_string_view<char, std::char_traits<char> >)’ does not match its profile data (counter ‘arcs’) [-Werror=coverage-mismatch]
12091 | bool url::set_protocol(const std::string_view input) {
      |      ^~~
../deps/ada/ada.cpp:12091:6: error: the control flow of function ‘ada::url::set_protocol(std::basic_string_view<char, std::char_traits<char> >)’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp: In member function ‘ada::url::set_pathname(std::basic_string_view<char, std::char_traits<char> >)’:
../deps/ada/ada.cpp:12082:6: error: number of counters in profile data for function ‘ada::url::set_pathname(std::basic_string_view<char, std::char_traits<char> >)’ does not match its profile data (counter ‘arcs’, expected 428 and have 424) [-Werror=coverage-mismatch]
12082 | bool url::set_pathname(const std::string_view input) {
      |      ^~~
../deps/ada/ada.cpp:12082:6: error: the control flow of function ‘ada::url::set_pathname(std::basic_string_view<char, std::char_traits<char> >)’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
../deps/ada/ada.cpp: In function ‘ada::href_from_file[abi:cxx11](std::basic_string_view<char, std::char_traits<char> >)’:
../deps/ada/ada.cpp:10366:13: error: number of counters in profile data for function ‘ada::href_from_file[abi:cxx11](std::basic_string_view<char, std::char_traits<char> >)’ does not match its profile data (counter ‘arcs’, expected 206 and have 202) [-Werror=coverage-mismatch]
10366 | std::string href_from_file(std::string_view input) {
      |             ^~~~~~~~~~~~~~
../deps/ada/ada.cpp:10366:13: error: the control flow of function ‘ada::href_from_file[abi:cxx11](std::basic_string_view<char, std::char_traits<char> >)’ does not match its profile data (counter ‘time_profiler’) [-Werror=coverage-mismatch]
  g++ 

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions