aboutsummaryrefslogtreecommitdiff
path: root/gcc/profile.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/profile.h
parentb0d7ef9afda5f6ddc09446e6387301ebe761616f (diff)
downloadgcc-cb9e4555c10ea2b918d7cee80ebde29887e652bb.zip
gcc-cb9e4555c10ea2b918d7cee80ebde29887e652bb.tar.gz
gcc-cb9e4555c10ea2b918d7cee80ebde29887e652bb.tar.bz2
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/profile.h')
-rw-r--r--gcc/profile.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/gcc/profile.h b/gcc/profile.h
index 4b7ac56..5d681e8 100644
--- a/gcc/profile.h
+++ b/gcc/profile.h
@@ -21,18 +21,25 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifndef GCC_PROFILE_H
#define GCC_PROFILE_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
{
- /* Used by final, for allocating the proper amount of storage for the
- instrumented arc execution counts. */
-
- int count_instrumented_edges;
-
- /* Used by final, for writing correct # of instrumented edges
- in this function. */
-
- int count_edges_instrumented_now;
-
+ /* 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. */
@@ -46,9 +53,10 @@ struct profile_info
/* The number of profiles merged to form the profile data for the current
function. */
int count_profiles_merged;
-
};
extern struct profile_info profile_info;
+struct section_info *find_counters_section PARAMS ((unsigned));
+
#endif