summaryrefslogtreecommitdiff
path: root/gcc/gcov-io.h
diff options
context:
space:
mode:
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>2003-02-26 17:55:10 +0100
committerZdenek Dvorak <rakdver@gcc.gnu.org>2003-02-26 16:55:10 +0000
commitcb9e4555c10ea2b918d7cee80ebde29887e652bb (patch)
treef82b07c8e80193a8fc0c8a5fe9eabdc6f54a41eb /gcc/gcov-io.h
parentb0d7ef9afda5f6ddc09446e6387301ebe761616f (diff)
downloadgcc-cb9e4555c10ea2b918d7cee80ebde29887e652bb.tar.gz
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
Diffstat (limited to 'gcc/gcov-io.h')
-rw-r--r--gcc/gcov-io.h28
1 files changed, 23 insertions, 5 deletions
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h
index 6976bc3ddc8..ce29f67c8cb 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. */