public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "esgergn at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/105238] Regression: using -fprofile-dir: gcno files not ccache cachable anymore / gcovr report broken
Date: Fri, 15 Apr 2022 22:41:57 +0000	[thread overview]
Message-ID: <bug-105238-4-UqWRFLwID1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105238-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105238

--- Comment #7 from Esger Abbink <esgergn at hotmail dot com> ---
Building a real project with the patched gcc9.4 and ccache 4.5.1 (replacing
-fprofile-dir with -fprofile-prefix-map=${CMAKE_SOURCE_DIR}=.) it looks ok at
first sight:

- 100% cache hits for the second compilation in a different directory
- gcda created next to .o & .gcda for both first and second
compilations/directories

However when running the unittests binaries there are quite a number of gcov
warnings:

[==========] 2807 tests from 297 test suites ran. (272928 ms total)
[  PASSED  ] 2807 tests.

libgcov profiling error:
:overwriting an existing profile data with a different timestamp
libgcov profiling error:#:overwriting an existing profile data with a different
timestamp
libgcov profiling error:
:overwriting an existing profile data with a different timestamp
libgcov profiling error::overwriting an existing profile data with a different
timestamp
libgcov profiling error::overwriting an existing profile data with a different
timestamp
libgcov profiling error:#:overwriting an existing profile data with a different
timestamp
libgcov profiling error:&:overwriting an existing profile data with a different
timestamp
libgcov profiling error:#:overwriting an existing profile data with a different
timestamp
libgcov profiling error:#:overwriting an existing profile data with a different
timestamp
libgcov profiling error:':overwriting an existing profile data with a different
timestamp
profiling::Cannot open
libgcov profiling error:#:overwriting an existing profile data with a different
timestamp
libgcov profiling error:#:overwriting an existing profile data with a different
timestamp
libgcov profiling error::overwriting an existing profile data with a different
timestamp
...
[this continues for quite a number of lines]

Note that these warnings are produced both for the directory where compilation
really took place as for the directory where .o & .gcno were taken from the
cache.

Since the gcda files are created next to the .o * .gcno there should not be any
name clashes (for identical names the path would still be different). So I am
not sure what is happening here? Unfortunately, the warning lines do not
include any information about which file is being written or which file is
clashing.



Still, gcovr is able to produce a coverage report with information that looks
sane, but there are differences with the gcc7.5 reports. I would assume because
of the above warnings. 

The coverage report for the second compilation (using cached .o & .gcno) is for
all intents and purposes the same as the one for the first compilation. The
difference being 2 lines and 2 branches on totals of 17515 and 14727.

  parent reply	other threads:[~2022-04-15 22:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12 11:32 [Bug gcov-profile/105238] New: " esgergn at hotmail dot com
2022-04-12 12:25 ` [Bug gcov-profile/105238] " marxin at gcc dot gnu.org
2022-04-12 13:28 ` esgergn at hotmail dot com
2022-04-13  8:12 ` marxin at gcc dot gnu.org
2022-04-14  9:11 ` esgergn at hotmail dot com
2022-04-15 12:19 ` esgergn at hotmail dot com
2022-04-15 13:55 ` esgergn at hotmail dot com
2022-04-15 22:41 ` esgergn at hotmail dot com [this message]
2022-04-19  9:55 ` marxin at gcc dot gnu.org
2023-04-03  8:57 ` marxin at gcc dot gnu.org
2023-04-03  9:03 ` marxin at gcc dot gnu.org
2024-05-07  7:40 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-105238-4-UqWRFLwID1@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).