diff options
author | Martin Liska <mliska@suse.cz> | 2017-04-28 14:49:26 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-04-28 12:49:26 +0000 |
commit | 34769baf7d9d8e5545c478d85db3261c6dda3c89 (patch) | |
tree | e7a12c6660305c53dab971f3347996185cd2e9af | |
parent | 5c5059bcf87715daa965eec3c04731f447fcbb0a (diff) | |
download | gcc-34769baf7d9d8e5545c478d85db3261c6dda3c89.zip gcc-34769baf7d9d8e5545c478d85db3261c6dda3c89.tar.gz gcc-34769baf7d9d8e5545c478d85db3261c6dda3c89.tar.bz2 |
gcno file: do not stream block flags (PR gcov-profile/80031).
2017-04-28 Martin Liska <mliska@suse.cz>
PR gcov-profile/80031
* gcov-dump.c (tag_blocks): Just print number of basic blocks.
* gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
* gcov.c (read_graph_file): Read just number of blocks.
* profile.c (branch_prob): Do not stream 0 flags per a basic
block.
From-SVN: r247370
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/gcov-dump.c | 22 | ||||
-rw-r--r-- | gcc/gcov-io.h | 1 | ||||
-rw-r--r-- | gcc/gcov.c | 7 | ||||
-rw-r--r-- | gcc/profile.c | 3 |
5 files changed, 13 insertions, 29 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b95fc7..8e21c35 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2017-04-28 Martin Liska <mliska@suse.cz> + PR gcov-profile/80031 + * gcov-dump.c (tag_blocks): Just print number of basic blocks. + * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro. + * gcov.c (read_graph_file): Read just number of blocks. + * profile.c (branch_prob): Do not stream 0 flags per a basic + block. + +2017-04-28 Martin Liska <mliska@suse.cz> + * gcov-dump.c (tag_*): Add new argument to declarations. (dump_gcov_file): Likewise. (tag_blocks): Add and use new argument depth. diff --git a/gcc/gcov-dump.c b/gcc/gcov-dump.c index 47db179..f252257 100644 --- a/gcc/gcov-dump.c +++ b/gcc/gcov-dump.c @@ -318,27 +318,9 @@ tag_function (const char *filename ATTRIBUTE_UNUSED, static void tag_blocks (const char *filename ATTRIBUTE_UNUSED, unsigned tag ATTRIBUTE_UNUSED, unsigned length ATTRIBUTE_UNUSED, - unsigned depth) + unsigned depth ATTRIBUTE_UNUSED) { - unsigned n_blocks = GCOV_TAG_BLOCKS_NUM (length); - - printf (" %u blocks", n_blocks); - - if (flag_dump_contents) - { - unsigned ix; - - for (ix = 0; ix != n_blocks; ix++) - { - if (!(ix & 7)) - { - printf ("\n"); - print_prefix (filename, depth, gcov_position ()); - printf (VALUE_PADDING_PREFIX VALUE_PREFIX, ix); - } - printf ("%04x ", gcov_read_unsigned ()); - } - } + printf (" %u blocks", gcov_read_unsigned ()); } static void diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index 1fb58dd..1c8ee8f 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -230,7 +230,6 @@ typedef uint64_t gcov_type_unsigned; #define GCOV_TAG_FUNCTION_LENGTH (3) #define GCOV_TAG_BLOCKS ((gcov_unsigned_t)0x01410000) #define GCOV_TAG_BLOCKS_LENGTH(NUM) (NUM) -#define GCOV_TAG_BLOCKS_NUM(LENGTH) (LENGTH) #define GCOV_TAG_ARCS ((gcov_unsigned_t)0x01430000) #define GCOV_TAG_ARCS_LENGTH(NUM) (1 + (NUM) * 2) #define GCOV_TAG_ARCS_NUM(LENGTH) (((LENGTH) - 1) / 2) @@ -129,7 +129,6 @@ typedef struct block_info /* Block execution count. */ gcov_type count; - unsigned flags : 12; unsigned count_valid : 1; unsigned valid_chain : 1; unsigned invalid_chain : 1; @@ -1374,12 +1373,8 @@ read_graph_file (void) bbg_file_name, fn->name); else { - unsigned ix, num_blocks = GCOV_TAG_BLOCKS_NUM (length); - fn->num_blocks = num_blocks; - + fn->num_blocks = gcov_read_unsigned (); fn->blocks = XCNEWVEC (block_t, fn->num_blocks); - for (ix = 0; ix != num_blocks; ix++) - fn->blocks[ix].flags = gcov_read_unsigned (); } } else if (fn && tag == GCOV_TAG_ARCS) diff --git a/gcc/profile.c b/gcc/profile.c index c6f462d..c7eed0e 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -1195,8 +1195,7 @@ branch_prob (void) /* Basic block flags */ offset = gcov_write_tag (GCOV_TAG_BLOCKS); - for (i = 0; i != (unsigned) (n_basic_blocks_for_fn (cfun)); i++) - gcov_write_unsigned (0); + gcov_write_unsigned (n_basic_blocks_for_fn (cfun)); gcov_write_length (offset); /* Arcs */ |