diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-26 07:52:10 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-26 07:52:10 +0000 |
commit | 0a9d9b9ca6db84df665a902e59c8cdd875064c3f (patch) | |
tree | 705173673c74024b0bd270eb542967036fde5a26 /gcc/gcov-io.h | |
parent | 804e497bac66c188ca8be9698c5426dc36ceca28 (diff) | |
download | gcc-0a9d9b9ca6db84df665a902e59c8cdd875064c3f.tar.gz |
* value-prof.c: New.
* value-prof.h: New.
* Makefile.in (value-prof.o): New.
(LIBGCOV): Add _gcov_merge_single and _gcov_merge_delta
(profile.o): Add value-prof.h and tree.h dependency.
* flags.h (flag_profile_values): Declare.
* gcov-io.h (GCOV_COUNTERS, GCOV_COUNTER_NAMES, GCOV_MERGE_FUNCTIONS):
Add new counters.
(GCOV_COUNTER_V_INTERVAL, GCOV_COUNTER_V_POW2, GCOV_COUNTER_V_SINGLE,
GCOV_COUNTER_V_DELTA): New counter sections.
(__gcov_merge_single, __gcov_merge_delta): Declare.
* flow.c (mark_used_regs): Set subregs_of_mode only when the
structure is initialized.
* libgcov.c (__gcov_merge_single, __gcov_merge_delta): New functions.
* profile.c: Include value-prof.h and tree.h.
(gen_interval_profiler, gen_pow2_profiler, gen_one_value_profiler,
gen_const_delta_profiler, instrument_values): New static functions.
(get_exec_counts): Fix comment.
(branch_prob): Invoke instrument_values.
* toplev.c (flag_profile_values): New flag.
* doc/invoke.texi (-fprofile-values): Document.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68519 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcov-io.h')
-rw-r--r-- | gcc/gcov-io.h | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index 55654081037..769fd8a276f 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -269,14 +269,24 @@ typedef HOST_WIDEST_INT gcov_type; #define GCOV_COUNTER_ARCS 0 /* Arc transitions. */ #define GCOV_COUNTERS_SUMMABLE 1 /* Counters which can be summaried. */ -#define GCOV_COUNTERS 1 - -/* A list of human readable names of the counters */ -#define GCOV_COUNTER_NAMES {"arcs"} - -/* Names of merge functions for counters. */ -#define GCOV_MERGE_FUNCTIONS {"__gcov_merge_add"} - +#define GCOV_COUNTER_V_INTERVAL 1 /* Histogram of value inside an interval. */ +#define GCOV_COUNTER_V_POW2 2 /* Histogram of exact power2 logarithm + of a value. */ +#define GCOV_COUNTER_V_SINGLE 3 /* The most common value of expression. */ +#define GCOV_COUNTER_V_DELTA 4 /* The most common difference between + consecutive values of expression. */ +#define GCOV_COUNTERS 5 + + /* A list of human readable names of the counters */ +#define GCOV_COUNTER_NAMES {"arcs", "interval", "pow2", "single", "delta"} + + /* Names of merge functions for counters. */ +#define GCOV_MERGE_FUNCTIONS {"__gcov_merge_add", \ + "__gcov_merge_add", \ + "__gcov_merge_add", \ + "__gcov_merge_single", \ + "__gcov_merge_delta"} + /* Convert a counter index to a tag. */ #define GCOV_TAG_FOR_COUNTER(COUNT) \ (GCOV_TAG_COUNTER_BASE + ((gcov_unsigned_t)(COUNT) << 17)) @@ -380,6 +390,13 @@ extern void __gcov_flush (void); /* The merge function that just sums the counters. */ extern void __gcov_merge_add (gcov_type *, unsigned); + +/* The merge function to choose the most often value. */ +extern void __gcov_merge_single (gcov_type *, unsigned); + +/* The merge function to choose the most often difference between consecutive + values. */ +extern void __gcov_merge_delta (gcov_type *, unsigned); #endif /* IN_LIBGCOV */ #if IN_LIBGCOV >= 0 |