From cb9e4555c10ea2b918d7cee80ebde29887e652bb Mon Sep 17 00:00:00 2001 From: Zdenek Dvorak Date: Wed, 26 Feb 2003 17:55:10 +0100 Subject: gcov-dump.c (print_prefix): Fix signedness warning. * gcov-dump.c (print_prefix): Fix signedness warning. * gcov-io.h (struct counter_section, struct counter_section_data): New. (struct function_info): n_arc_counts field removed, n_counter_sections, counter_sections fields added. (struct gcov_info): arc_counts, n_arc_counts fields removed, n_counter_sections, counter_sections fields added. * libgcov.c (gcov_exit, __gcov_flush): Add support for multiple profile sections. * profile.h (MAX_COUNTER_SECTIONS): New. (struct section_info): New. (struct profile_info): count_instrumented_edges, count_edges_instrumented_now fields removed, n_sections, section_info fields added. (find_counters_section): Declare. * profile.c (struct function_list): count_edges field removed, n_counter_sections, counter_sections fields added. (set_purpose, label_for_tag, build_counter_section_fields, build_counter_section_value, build_counter_section_data_fields, build_counter_section_data_value, build_function_info_fields, build_function_info_value, build_gcov_info_fields, build_gcov_info_value): New static functions. (find_counters_section): New function. (instrument_edges, get_exec_counts, compute_branch_probabilities, branch_prob, create_profiler): Modified to support multiple profile sections. From-SVN: r63474 --- gcc/gcov-io.h | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'gcc/gcov-io.h') diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index 6976bc3..ce29f67 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -216,16 +216,33 @@ struct gcov_summary gcov_type arc_sum_max; /* sum of max_one */ }; -#if IN_LIBGCC2 /* Structures embedded in coveraged program. The structures generated by write_profile must match these. */ +/* Information about section of counters for a function. */ +struct counter_section +{ + unsigned tag; /* Tag of the section. */ + unsigned n_counters; /* Number of counters in the section. */ +}; + +#if IN_LIBGCC2 +/* Information about section of counters for an object file. */ +struct counter_section_data +{ + unsigned tag; /* Tag of the section. */ + unsigned n_counters; /* Number of counters in the section. */ + gcov_type *counters; /* The data. */ +}; + /* Information about a single function. */ struct function_info { const char *name; /* (mangled) name of function */ unsigned checksum; /* function checksum */ - unsigned n_arc_counts; /* number of instrumented arcs */ + unsigned n_counter_sections; /* Number of types of counters */ + const struct counter_section *counter_sections; + /* The section descriptions */ }; /* Information about a single object file. */ @@ -237,11 +254,12 @@ struct gcov_info const char *filename; /* output file name */ long wkspc; /* libgcc workspace */ - const struct function_info *functions; /* table of functions */ unsigned n_functions; /* number of functions */ + const struct function_info *functions; /* table of functions */ - gcov_type *arc_counts; /* table of arc counts */ - unsigned n_arc_counts; /* number of arc counts */ + unsigned n_counter_sections; /* Number of types of counters */ + const struct counter_section_data *counter_sections; + /* The data to be put into the sections. */ }; /* Register a new object file module. */ -- cgit v1.1