From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: "Martin Liška" <mliska@suse.cz>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] gcov-tool: Allow merging of empty profile lists
Date: Mon, 28 Mar 2022 18:23:40 +0200 [thread overview]
Message-ID: <9b3bc65d-be92-0a99-d5c3-c96b9fec881c@embedded-brains.de> (raw)
In-Reply-To: <f260b454-8843-ccc9-12e1-1d7af4e7c64b@suse.cz>
On 24/03/2022 13:03, Martin Liška wrote:
> On 3/24/22 11:51, Sebastian Huber wrote:
>> Maybe we could add the file path into the gcov information stream
>> using a new tag:
>>
>> #define GCOV_TAG_GCDA_FILE_NAME ((gcov_unsigned_t)0xa5000000)
>>
>> Then the complete gcov information can be dumped using a single base64
>> encoded stream. We could add some support to the gcov-tool to read
>> this stream and merge it into gcda files.
>
> I would support such patch!
Ok, good. I work currently on a prototype implementation. My use case
would be like this.
Run a test executable which dumps all gcov info objects in a serial data
stream. It could be encoded as base64. It could be also compressed. On
the host you unpack the encoded data stream and feed it into gcov-tool
using the new "merge-stream" subcommand:
gcov-tool --help
Usage: gcov-tool [OPTION]... SUB_COMMAND [OPTION]...
Offline tool to handle gcda counts
-h, --help Print this help, then exit
-v, --version Print version number, then exit
merge-stream [options] [stream-file] Merge coverage stream file (or
stdin)
and coverage file contents
-v, --verbose Verbose mode
-w, --weight <w1,w2> Set weights (float point values)
Example:
base64 -d log.txt | gcov-tool merge-stream
The gcov-tool uses a new tag which contains the filename of the
associated gcov info file:
gcov-dump b-xilinx_zynq_a9_qemu/init.gcda
b-xilinx_zynq_a9_qemu/init.gcda:data:magic `gcda':version `B20 '
b-xilinx_zynq_a9_qemu/init.gcda:stamp 3496756572
b-xilinx_zynq_a9_qemu/init.gcda:checksum 137326246
b-xilinx_zynq_a9_qemu/init.gcda: a5000000: 62:FILENAME
`/home/EB/sebastian_h/src/lwip/b-xilinx_zynq_a9_qemu/init.gcda'
b-xilinx_zynq_a9_qemu/init.gcda: a1000000: 8:OBJECT_SUMMARY runs=0,
sum_max=0
b-xilinx_zynq_a9_qemu/init.gcda: 01000000: 12:FUNCTION
ident=1016818396, lineno_checksum=0xd31791e7, cfg_checksum=0x4529789a
b-xilinx_zynq_a9_qemu/init.gcda: 01a10000: 232:COUNTERS arcs 29 counts
Should I generate this filename tag to all configurations or just in
case inhibit_libc is defined?
Advantage:
* No dependency on the GCC configuration
Disadvantages:
* Bigger files
* Actual filename and the filename of the tag differ if file is moved
* Potential information leak
In any case, I would add the support for the (optional) filename tag to
all readers.
--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax: +49-89-18 94 741 - 08
Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
next prev parent reply other threads:[~2022-03-28 16:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-23 9:34 Sebastian Huber
2022-03-23 12:19 ` Martin Liška
2022-03-23 14:50 ` Sebastian Huber
2022-03-24 10:29 ` Martin Liška
2022-03-24 10:51 ` Sebastian Huber
2022-03-24 12:03 ` Martin Liška
2022-03-28 16:23 ` Sebastian Huber [this message]
2022-03-30 11:56 ` Martin Liška
2022-03-30 13:30 ` Sebastian Huber
2022-03-30 14:48 ` Sebastian Huber
2022-03-31 6:58 ` Martin Liška
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=9b3bc65d-be92-0a99-d5c3-c96b9fec881c@embedded-brains.de \
--to=sebastian.huber@embedded-brains.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=mliska@suse.cz \
/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).