public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: "Martin Liška" <mliska@suse.cz>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] gcov: Add __gcov_info_to_gdca()
Date: Mon, 23 Nov 2020 15:35:55 +0100	[thread overview]
Message-ID: <1df244a2-8e31-5c2d-ea3f-98114c10b405@embedded-brains.de> (raw)
In-Reply-To: <4806f0f4-2fee-867e-87ad-6831aedd9be7@suse.cz>

Hello Martin,

On 23/11/2020 15:30, Martin Liška wrote:
>> +/* Convert the gcov info to a gcda data stream.  This function does 
>> not support
>> +   whole program statistics and top counters.  It is intended for 
>> free-standing
>> +   environments which do not support the C library file I/O. For the 
>> data
>> +   format, see also write_one_data().  */
>> +
>> +void
>> +__gcov_info_to_gcda (const struct gcov_info *gi_ptr,
>> +             void (*filename) (const char *, void *),
>> +             void (*dump) (const void *, unsigned, void *),
>> +             void *arg)
>
> Hello.
>
> I would prefer a better names for the hooks. What about something like
> open_filename_hook and write_data_hook?
>
>> +{
>> +  (*filename) (gi_ptr->filename, arg);
>> +  gcov_unsigned_t word = GCOV_DATA_MAGIC;
>> +  (*dump) (&word, sizeof (word), arg);
>
> And I would add a new macro like
> #define GCOV_WRITE_DATA(data) (*write_data_hook) (&DATA, sizeof 
> (DATA), arg
>
> What do you think?
sounds good.
>
> Note that we already entered a code freeze before the patch was sent 
> to the mailing list.
> That means we can install it in the next stage1. 
If I have to wait for next stage 1, I can also try to refactor 
write_one_data() after your patch which removes the buffering. This 
would avoid some duplicated code, however, it would require some changes 
in existing code. Is it allowed to remove external (hidden?) symbols 
from libgcov?

-- 
embedded brains GmbH
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
PGP: Public key available on request.

embedded brains GmbH
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/


  reply	other threads:[~2020-11-23 14:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-17  9:57 Sebastian Huber
2020-11-20  8:37 ` Martin Liška
2020-11-20  9:25   ` Sebastian Huber
2020-11-20  9:49     ` Martin Liška
2020-11-20 10:11       ` Sebastian Huber
2020-11-20 15:25         ` Martin Liška
2020-11-20 16:14           ` Sebastian Huber
2020-11-23 12:25             ` Sebastian Huber
2020-11-23 14:24               ` Martin Liška
2020-11-23 14:30 ` Martin Liška
2020-11-23 14:35   ` Sebastian Huber [this message]
2020-11-23 14:49     ` Martin Liška
2020-11-23 14:50       ` Sebastian Huber
2020-11-23 14:55         ` Martin Liška
2021-07-13 13:03 Sebastian Huber
2021-07-13 13:11 ` Sebastian Huber

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=1df244a2-8e31-5c2d-ea3f-98114c10b405@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).