https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99105
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> --- Thank you for the bug report. It's really something we should improve for the next GCC release. A small improvement can be achieved by the removal of libgcov I/O buffering: https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=5a17015c096012b9e43a8dd45768a8d5fb3a3aee But the key thing is likely the ability to omit profile modifications (read/modify/write) for parts of a binary that are not trained.