summaryrefslogtreecommitdiff
path: root/gcc/profile.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-10 19:02:21 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-10 19:02:21 +0000
commit834f169c095c2ebff5cb9d0376da2c5093e44be4 (patch)
tree854e36366a2cd453b70412c2e728a48810418a26 /gcc/profile.c
parente77bfc93deabc0d487b9a212b57e7e4d42d3cdb4 (diff)
downloadgcc-834f169c095c2ebff5cb9d0376da2c5093e44be4.tar.gz
* defaults.h (GCOV_TYPE_SIZE): Remove.
* gcov-io.h (gcov_type): Set to specific mode int on target. (gcov_unsigned_t, gcov_position_t): New. (GCOV_TYPE_NODE): New. (GCOV_TAG_SUMMARY_LENGTH): Adjust. (GCOV_COUNTERS_SUMMABLE): New. (gcov_ctr_summary, gcov_sumary, gcov_fn_info, gcov_merge_fn, gcov_ctr_info, gcov_info): Adjust types. (gcov_var): Adjust types. (gcov_write_unsigned, gcov_write_tag, gcov_write_length, gcov_write_tag_length, gcov_write_summary, gcov_read_unsigned, gcov_read_summary): Adjust gcov types. (gcov_position, gcov_sync, gcov_seek): Adjust gcov types. * gcov-io.c (gcov_write_unsigned, gcov_write_tag, gcov_write_length, gcov_write_tag_length, gcov_write_summary, gcov_read_unsigned, gcov_read_summary): Adjust gcov types. * libgcov.c (gcov_crc32, gcov_version_mismatch, gcov_exit, __gcov_init, __gcov_merge_add): Adjust gcov types. * coverage.c (ctr_merge_functions): Constify. (ctr_names): New. (read_counts_file): Adjust gcov types. Only summarize & merge summable counters. (coverage_counter_ref): Use GCOV_TYPE_NODE. (build_fn_info_type, build_fn_info_value, build_ctr_info_type, build_ctr_info_value, build_gcov_info): Adjust types. * profile.c (branch_prob): Adjust gcov types. * gcov_dump (dump_file): Adjust gcov types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66668 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/profile.c')
-rw-r--r--gcc/profile.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index 6a5548b47a9..f5ee9f31825 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -670,22 +670,25 @@ branch_prob ()
if (rtl_dump_file)
fprintf (rtl_dump_file, "%d ignored edges\n", ignored_edges);
- /* Write the .bbg data from which gcov can reconstruct the basic block
- graph. First output the number of basic blocks, and then for every
- edge output the source and target basic block numbers.
- NOTE: The format of this file must be compatible with gcov. */
+ /* Write the data from which gcov can reconstruct the basic block
+ graph. */
+ /* Basic block flags */
if (coverage_begin_output ())
{
- long offset;
+ gcov_position_t offset;
- /* Basic block flags */
offset = gcov_write_tag (GCOV_TAG_BLOCKS);
for (i = 0; i != (unsigned) (n_basic_blocks + 2); i++)
gcov_write_unsigned (0);
gcov_write_length (offset);
-
- /* Arcs */
+ }
+
+ /* Arcs */
+ if (coverage_begin_output ())
+ {
+ gcov_position_t offset;
+
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR, next_bb)
{
edge e;
@@ -716,12 +719,11 @@ branch_prob ()
}
}
- /* Output line number information about each basic block for GCOV
- utility. */
+ /* Line numbers. */
if (coverage_begin_output ())
{
char const *prev_file_name = NULL;
- long offset;
+ gcov_position_t offset;
FOR_EACH_BB (bb)
{