diff options
author | marxin <mliska@suse.cz> | 2020-11-18 16:13:23 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-05-13 10:59:36 +0200 |
commit | 23eb66d1d46a34cb28c4acbdf8a1deb80a7c5a05 (patch) | |
tree | f85d88f4907c66988173541d8229a1d334d7d811 /libgcc | |
parent | c3e02c2e442e6b0c298dbe769e0e3b120b5201b2 (diff) | |
download | gcc-23eb66d1d46a34cb28c4acbdf8a1deb80a7c5a05.zip gcc-23eb66d1d46a34cb28c4acbdf8a1deb80a7c5a05.tar.gz gcc-23eb66d1d46a34cb28c4acbdf8a1deb80a7c5a05.tar.bz2 |
gcov: Use system IO buffering
gcc/ChangeLog:
* gcov-io.c (gcov_write_block): Remove.
(gcov_write_words): Likewise.
(gcov_read_words): Re-implement using gcov_read_bytes.
(gcov_allocate): Remove.
(GCOV_BLOCK_SIZE): Likewise.
(struct gcov_var): Remove most of the fields.
(gcov_position): Implement with ftell.
(gcov_rewrite): Remove setting of start and offset fields.
(from_file): Re-format.
(gcov_open): Remove setbuf call. It should not be needed.
(gcov_close): Remove internal buffer handling.
(gcov_magic): Use __builtin_bswap32.
(gcov_write_counter): Use directly gcov_write_unsigned.
(gcov_write_string): Use direct fwrite and do not round
to 4 bytes.
(gcov_seek): Use directly fseek.
(gcov_write_tag): Use gcov_write_unsigned directly.
(gcov_write_length): Likewise.
(gcov_write_tag_length): Likewise.
(gcov_read_bytes): Use directly fread.
(gcov_read_unsigned): Use gcov_read_words.
(gcov_read_counter): Likewise.
(gcov_read_string): Use gcov_read_bytes.
* gcov-io.h (GCOV_WORD_SIZE): Adjust to reflect
that size is not in bytes, but words (4B).
(GCOV_TAG_FUNCTION_LENGTH): Likewise.
(GCOV_TAG_ARCS_LENGTH): Likewise.
(GCOV_TAG_ARCS_NUM): Likewise.
(GCOV_TAG_COUNTER_LENGTH): Likewise.
(GCOV_TAG_COUNTER_NUM): Likewise.
(GCOV_TAG_SUMMARY_LENGTH): Likewise.
libgcc/ChangeLog:
* libgcov-driver.c: Fix GNU coding style.
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/libgcov-driver.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c index cbdf2ca..df7ccb2 100644 --- a/libgcc/libgcov-driver.c +++ b/libgcc/libgcov-driver.c @@ -558,10 +558,8 @@ read_fatal:; fn_buffer = free_fn_data (gi_ptr, fn_buffer, GCOV_COUNTERS); if ((error = gcov_close ())) - gcov_error (error < 0 ? - GCOV_PROF_PREFIX "Overflow writing\n" : - GCOV_PROF_PREFIX "Error writing\n", - gf->filename); + gcov_error ((error < 0 ? GCOV_PROF_PREFIX "Overflow writing\n" + : GCOV_PROF_PREFIX "Error writing\n"), gf->filename); } |