From cdb2376773696240929622b1504fa8e2d4c29843 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 23 Apr 2003 14:05:11 +0000 Subject: Makefile.in (LIBGCC_DEPS): Add gcov headers. * Makefile.in (LIBGCC_DEPS): Add gcov headers. (libgcov.a): Depends on LIBGCC_DEPS. * basic-block.h (profile_info): Moved here from coverage.h. Made a pointer. * coverage.c (struct function_list): Fixed array of counter types. (struct counts_entry): Keyed by counter type, contains summary. (profile_info): Moved to profile.c. (prg_ctr_mask, prg_n_ctrs, fn_ctr_mask, fn_n_ctrs): New global vars. (profiler_label): Remove. (ctr_labels): New. (set_purpose, label_for_tag, build_counter_section_fields, build_counter_section_value, build_counter_section_data_fields, build_counter_section_data_values, build_function_info_fields, build_function_info_value, gcov_info_fields, gcov_info_value): Remove. (build_fn_info_type, build_fn_info_value, build_ctr_info_type, build_ctr_info_value, build_gcov_info): New. (htab_counts_entry_hash, htab_counts_entry_eq): Adjust. (reads_counts_file): Adjust. (get_coverage_counts): Takes counter number. Add summary parameter. Adjust. (coverage_counter_ref): Tkaes counter number. Adjust. Lazily create counter array labels. (coverage_end_function): Adjust. (create_coverage): Adjust. (find_counters_section): Remove. * coverage.h (MAX_COUNTER_SECTIONS): Remove. (struct section_info, struct profile_info): Remove. (profile_info): Moved to basic-block.h. (coverage_counter_ref): Takes a counter number. (get_coverage_counts): Takes a counter number. Added summary parameter. (find_counters_section): Remove. * gcov-dump.c (tag_arc_counts): Rename to ... (tag_counters): ... here. Adjust. (tag_table): Move tag_counters to 3rd entry. Remove PROGRAM_PLACEHOLDER and PROGRAM_INCORRECT entries. (dump_file): Check for counter tag values here. (tag_summary): Adjust. * gcov-io.c (gcov_write_summary, gcov_read_summary): Adjust. * gcov-io.h (GCOV_LOCKED): New. (GCOV_TAG_ARC_COUNTS): Rename to ... (GCOV_TAG_COUNTS_BASE): ... here. (GCOV_TAG_PLACEHOLDER_SUMMARY, GCOV_TAG_INCORRECT_SUMMARY): Remove. (GCOV_COUNTER_ARCS, GCOV_COUNTERS, GCOV_NAMES): New. (GCOV_TAG_FOR_COUNTER, GCOV_COUNTER_FOR_TAG, GCOV_TAG_IS_COUNTER): New. (struct gcov_ctr_summary): New. (struct gcov_summary): Adjust. (struct gcov_counter_section): Remove. struct gcov_counter_section_data): Remove. (struct gcov_function_info): Rename to ... (struct gcov_fn_info): ... here. Adjust. (struct gcov_ctr_info): New. (struct gcov_info): Adjust. * gcov.c (read_count_file): Adjust. (output_lines): Adjust. * libgcov.c (gcov_exit): Adjust. (__gcov_flush): Adjust. * mklibgcc.in (libgcc2_c_dep): Add gcov headers. * predict.c (maybe_hot_bb_p, probably_cold_bb_p, probably_never_executed_bb_p, compute_frequency_function): Adjust profile_info use. * profile.c (struct counts_entry): Remove. (profile_info): Define here. (get_exec_counts): Adjust get_coverage_counts call. (compute_branch_probablilities): Remove find_counters_section call. (gen_edge_profiler): Adjust coverage_counter_ref call. * tracer.c (tail_duplicate): Adjust profile_info use. From-SVN: r65990 --- gcc/coverage.h | 44 ++++---------------------------------------- 1 file changed, 4 insertions(+), 40 deletions(-) (limited to 'gcc/coverage.h') diff --git a/gcc/coverage.h b/gcc/coverage.h index f6ead44..8817b80 100644 --- a/gcc/coverage.h +++ b/gcc/coverage.h @@ -23,50 +23,14 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "gcov-io.h" -/* The number of different counter sections. */ -#define MAX_COUNTER_SECTIONS 1 - -/* Info about number of counters in the section. */ -struct section_info -{ - unsigned tag; /* Section tag. */ - int present; /* Are the data from this section read into gcc? */ - int n_counters; /* Total number of counters. */ - int n_counters_now; /* Number of counters in the current function. */ -}; - -struct profile_info - { - /* Information about numbers of counters in counter sections, for - allocating the storage and storing the sizes. */ - unsigned n_sections; - struct section_info section_info[MAX_COUNTER_SECTIONS]; - - /* Checksum of the cfg. Used for 'identification' of code. - Used by final. */ - - unsigned current_function_cfg_checksum; - - /* Max. value of counter in program corresponding to the profile data - for the current function. */ - - gcov_type max_counter_in_program; - - /* The number of profiles merged to form the profile data for the current - function. */ - int count_profiles_merged; - }; - -extern struct profile_info profile_info; - extern void coverage_init (const char *); extern void coverage_finish (void); extern void coverage_end_function (void); extern int coverage_begin_output (void); -extern rtx coverage_counter_ref (unsigned /*tag*/, unsigned/*num*/); - -gcov_type *get_coverage_counts (unsigned /*tag*/, unsigned /*expected*/); -struct section_info *find_counters_section PARAMS ((unsigned)); +extern rtx coverage_counter_ref (unsigned /*counter*/, unsigned/*num*/); +extern gcov_type *get_coverage_counts (unsigned /*counter*/, + unsigned /*expected*/, + const struct gcov_ctr_summary **); #endif -- cgit v1.1