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 via email to