public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug gcov-profile/89961] When "--intermediate-format" is used "--preserve-paths"/"--hash-filenames" is ignored
Date: Tue, 17 Aug 2021 14:22:42 +0000	[thread overview]
Message-ID: <bug-89961-4-1yAGnE7gDQ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-89961-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #16 from Martin Liška <marxin at gcc dot gnu.org> ---
All right, so what's different about JSON and non-JSON mode:

1) normal mode:

gcov src/a.c test/a.c

First, gcda/gcno files are searched for both the arguments (so src/a.gcda, ..)
and then output is emitted for all mentioned source files (can be .c or .h
files). Note the output files x.gcov are based on *SOURCE* file names, so e.g.:

File 'tramp3d-v4.cpp'
Lines executed:0.00% of 7339
Creating 'tramp3d-v4.cpp.gcov'

File '/usr/include/c++/6/ext/new_allocator.h'
Lines executed:0.00% of 14
Creating 'new_allocator.h.gcov'

File '/usr/include/c++/6/ext/aligned_buffer.h'
Lines executed:0.00% of 8
Creating 'aligned_buffer.h.gcov'

File '/usr/include/c++/6/bits/move.h'
Lines executed:0.00% of 11
Creating 'move.h.gcov'
...


2) in JSON mode, we basically emit JSON output for each GCDA file (deduced from
arguments). What's currently wrong is that for
$ gcov src/a.xxxxx b.yyyyyy --json-format

The following 2 files should be created (right now b.gcov.json.gz and
a.gcov.json.gz are created)

b.gcov.json.gz
src/a.gcov.json.gz

and so -p and -x does not play any role here.

Does it make sense to you? If so, I'm prepared sending a patch candidate.

  parent reply	other threads:[~2021-08-17 14:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-89961-4@http.gcc.gnu.org/bugzilla/>
2021-05-31 12:28 ` xaizek at posteo dot net
2021-05-31 12:48 ` marxin at gcc dot gnu.org
2021-08-16 12:26 ` marxin at gcc dot gnu.org
2021-08-16 17:11 ` xaizek at posteo dot net
2021-08-16 17:16 ` xaizek at posteo dot net
2021-08-17 14:22 ` marxin at gcc dot gnu.org [this message]
2021-08-17 14:23 ` marxin at gcc dot gnu.org
2021-08-17 16:52 ` xaizek at posteo dot net
2021-08-18  9:46 ` marxin at gcc dot gnu.org
2021-08-18 20:31 ` xaizek at posteo dot net
2021-08-19  8:56 ` marxin at gcc dot gnu.org
2021-08-19  8:57 ` marxin at gcc dot gnu.org
2021-08-19 21:20 ` xaizek at posteo dot net
2021-08-20  8:06 ` marxin at gcc dot gnu.org
2021-08-20  8:07 ` cvs-commit at gcc dot gnu.org
2021-08-20  8:09 ` marxin at gcc dot gnu.org
2021-08-23  8:55 ` cvs-commit at gcc dot gnu.org
2021-08-23  8:56 ` marxin 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-89961-4-1yAGnE7gDQ@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).