public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: Sebastian Huber <sebastian.huber@embedded-brains.de>,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] gcov: Add __gcov_info_to_gdca()
Date: Mon, 23 Nov 2020 15:55:44 +0100	[thread overview]
Message-ID: <242760ed-f428-0442-8147-b3f7bec9f03c@suse.cz> (raw)
In-Reply-To: <ebf1cf93-d27e-f34f-d330-5ce7474f777b@embedded-brains.de>

On 11/23/20 3:50 PM, Sebastian Huber wrote:
> On 23/11/2020 15:49, Martin Liška wrote:
> 
>> On 11/23/20 3:35 PM, Sebastian Huber wrote:
>>> 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.
>>
>> Yes, please build your patches on top of the file buffering removal.
> Ok.
>>
>>> 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?
>>
>> Which functions do you mean?
> Refactoring write_one_data() to use hooks requires that
> 
> gcov_write_counter()
> 
> gcov_write_tag_length()
> 
> gcov_write_summary()

I bet these 3 can be actually moved to gcov-io.h, these functions are very small.
So yes, it should be doable.

Martin

> 
> move from gcc/gcov-io.c to libgcc/libgcov-buffer.c. They can be made static. I am not sure if the external symbols can be removed
> 
> /* In libgcov we need these functions to be extern, so prefix them with
>      __gcov.  In libgcov they must also be hidden so that the instance in
>      the executable is not also used in a DSO.  */
> #define gcov_write_tag_length __gcov_write_tag_length
> #define gcov_write_counter __gcov_write_counter
> #define gcov_write_summary __gcov_write_summary
> 


  reply	other threads:[~2020-11-23 14:55 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
2020-11-23 14:49     ` Martin Liška
2020-11-23 14:50       ` Sebastian Huber
2020-11-23 14:55         ` Martin Liška [this message]
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=242760ed-f428-0442-8147-b3f7bec9f03c@suse.cz \
    --to=mliska@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=sebastian.huber@embedded-brains.de \
    /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).