Skip to content

PGO: compiler warnings for source files with no profile data #117804

Closed

Description

@erlend-aasland

PGO builds do not generated profile data for all source files. This means that for a PGO build, you may end up with compiler warnings for source files with no profile data. Do we want to silence these warnings? If we do, it may be harder to spot if PGO builds fail to include profile data correctly.

Spotted while working on #117752.

Linked PRs

Activity

  1. erlend-aasland commented on Apr 12, 2024

    @erlend-aasland
    ContributorAuthor

    Example warning:

    gcc -bundle -undefined dynamic_lookup      Modules/syslogmodule.o   -o Modules/syslog.cpython-313-darwin.so
    gcc  -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall    -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -fprofile-instr-use=/Users/erlend.aasland/src/python/build-main/code.profclangd -I../main/Include/internal -I../main/Include/internal/mimalloc -IObjects -IInclude -IPython -I. -I../main/Include     -c ../main/Modules/termios.c -o Modules/termios.o
    warning: no profile data available for file "termios.c" [-Wprofile-instr-unprofiled]
  2. zooba commented on Apr 12, 2024

    @zooba
    Member

    Unless they're actually disruptive (breaking builds), I'd rather leave them there by default.

    Seems easy enough to add the suppression to CFLAGS manually, yeah? Should we just doc it?

  3. zooba commented on Apr 12, 2024

    @zooba
    Member

    It's one of these cases where if we suppress them once, we'll forget about coverage entirely, which is worse than simply continuing to not fix it (someone might be motivated to fix it in the future if they see it)

  4. erlend-aasland commented on Apr 12, 2024

    @erlend-aasland
    ContributorAuthor

    Seems easy enough to add the suppression to CFLAGS manually, yeah? Should we just doc it?

    I would be fine with that.

  5. added 2 commits that reference this issue on Apr 13, 2024
  6. added a commit that references this issue on Apr 15, 2024
  7. added a commit that references this issue on Apr 15, 2024
  8. added a commit that references this issue on Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-build

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions