summaryrefslogtreecommitdiff
path: root/gcc/basic-block.h
diff options
context:
space:
mode:
authortejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-03 20:51:28 +0000
committertejohnson <tejohnson@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-03 20:51:28 +0000
commit8515a84d85b234ea831bb275a6c01fbd3cdd4118 (patch)
treeadc203a589f57f6641e15408a2579a630f743208 /gcc/basic-block.h
parent687a1ea1e7115e06810cc1e7b59d3831eabdb0dc (diff)
downloadgcc-8515a84d85b234ea831bb275a6c01fbd3cdd4118.tar.gz
This patch enables the gcov-dump tool to optionally compute and dump
the working set information from the counter histogram, via a new -w option. This is useful to help understand and tune how the compiler will use the counter histogram, since it first computes the working set and selects thresholds based on that. This required moving the bulk of the compute_working_sets functionality into gcov-io.c so that it was accessible by gcov-dump.c. 2013-04-03 Teresa Johnson <tejohnson@google.com> * gcov-io.c (compute_working_sets): Moved most of body of old compute_working_sets here from profile.c. * gcov-io.h (NUM_GCOV_WORKING_SETS): Moved here from profile.c. (gcov_working_set_t): Moved typedef here from basic-block.h (compute_working_set): Declare. * profile.c (NUM_GCOV_WORKING_SETS): Moved to gcov-io.h. (get_working_sets): Renamed from compute_working_set, replace most of body with call to new compute_working_sets. (get_exec_counts): Replace call to compute_working_sets to get_working_sets. * profile.h (get_working_sets): Renamed from compute_working_set. * lto-cgraph.c (input_symtab): Replace call to compute_working_sets to get_working_sets. * basic-block.h (gcov_working_set_t): Moved to gcov-io.h. * gcov-dump.c (dump_working_sets): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197457 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/basic-block.h')
-rw-r--r--gcc/basic-block.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 69876e0a188..d8377308b7f 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -87,16 +87,6 @@ enum cfg_edge_flags {
profile.c. */
extern const struct gcov_ctr_summary *profile_info;
-/* Working set size statistics for a given percentage of the entire
- profile (sum_all from the counter summary). */
-typedef struct gcov_working_set_info
-{
- /* Number of hot counters included in this working set. */
- unsigned num_counters;
- /* Smallest counter included in this working set. */
- gcov_type min_counter;
-} gcov_working_set_t;
-
/* Structure to gather statistic about profile consistency, per pass.
An array of this structure, indexed by pass static number, is allocated
in passes.c. The structure is defined here so that different CFG modes
@@ -935,6 +925,7 @@ extern void rtl_profile_for_edge (edge);
extern void default_rtl_profile (void);
/* In profile.c. */
+typedef struct gcov_working_set_info gcov_working_set_t;
extern gcov_working_set_t *find_working_set(unsigned pct_times_10);
/* Check tha probability is sane. */