diff options
author | Martin Liska <mliska@suse.cz> | 2019-06-10 09:38:59 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-06-10 07:38:59 +0000 |
commit | 92d417175b9f7b41d5ebe3ceb723f808917ed964 (patch) | |
tree | 68db0aeb3fb07bf5bb068e205d5a3cb895a45a01 /gcc/gcov-io.h | |
parent | b076a52602320955ca7f4b8b54a5451f9f3c7658 (diff) | |
download | gcc-92d417175b9f7b41d5ebe3ceb723f808917ed964.zip gcc-92d417175b9f7b41d5ebe3ceb723f808917ed964.tar.gz gcc-92d417175b9f7b41d5ebe3ceb723f808917ed964.tar.bz2 |
Implement N disk counters for single value and indirect call counters.
2019-06-10 Martin Liska <mliska@suse.cz>
* gcov-io.h (GCOV_DISK_SINGLE_VALUES): New.
(GCOV_SINGLE_VALUE_COUNTERS): Likewise.
* ipa-profile.c (ipa_profile_generate_summary):
Use get_most_common_single_value.
* tree-profile.c (gimple_init_gcov_profiler):
Instrument with __gcov_one_value_profiler_v2
and __gcov_indirect_call_profiler_v4.
* value-prof.c (dump_histogram_value):
Print all values for HIST_TYPE_SINGLE_VALUE.
(stream_out_histogram_value): Update assert for
N values.
(stream_in_histogram_value): Set number of
counters for HIST_TYPE_SINGLE_VALUE.
(get_most_common_single_value): New.
(gimple_divmod_fixed_value_transform):
Use get_most_common_single_value.
(gimple_ic_transform): Likewise.
(gimple_stringops_transform): Likewise.
(gimple_find_values_to_profile): Set number
of counters for HIST_TYPE_SINGLE_VALUE.
* value-prof.h (get_most_common_single_value):
New.
2019-06-10 Martin Liska <mliska@suse.cz>
* Makefile.in: Add __gcov_one_value_profiler_v2,
__gcov_one_value_profiler_v2_atomic and
__gcov_indirect_call_profiler_v4.
* libgcov-merge.c (__gcov_merge_single): Change
function signature.
(merge_single_value_set): New.
* libgcov-profiler.c (__gcov_one_value_profiler_body):
Update functionality.
(__gcov_one_value_profiler): Remove.
(__gcov_one_value_profiler_v2): ... this.
(__gcov_one_value_profiler_atomic): Rename to ...
(__gcov_one_value_profiler_v2_atomic): this.
(__gcov_indirect_call_profiler_v3): Rename to ...
(__gcov_indirect_call_profiler_v4): ... this.
* libgcov.h (__gcov_one_value_profiler): Remove.
(__gcov_one_value_profiler_atomic): Remove.
(__gcov_one_value_profiler_v2_atomic): New.
(__gcov_indirect_call_profiler_v3): Remove.
(__gcov_one_value_profiler_v2): New.
(__gcov_indirect_call_profiler_v4): New.
(gcov_get_counter_ignore_scaling): New function.
From-SVN: r272106
Diffstat (limited to 'gcc/gcov-io.h')
-rw-r--r-- | gcc/gcov-io.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index 69c9a73..0f2905c 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -266,6 +266,13 @@ GCOV_COUNTERS #define GCOV_N_VALUE_COUNTERS \ (GCOV_LAST_VALUE_COUNTER - GCOV_FIRST_VALUE_COUNTER + 1) +/* Number of single value histogram values that live + on disk representation. */ +#define GCOV_DISK_SINGLE_VALUES 4 + +/* Total number of single value counters. */ +#define GCOV_SINGLE_VALUE_COUNTERS (2 * GCOV_DISK_SINGLE_VALUES + 1) + /* Convert a counter index to a tag. */ #define GCOV_TAG_FOR_COUNTER(COUNT) \ (GCOV_TAG_COUNTER_BASE + ((gcov_unsigned_t)(COUNT) << 17)) |