From af166e5d276114872596002803f7c300fc41a511 Mon Sep 17 00:00:00 2001 From: Zdenek Dvorak Date: Thu, 26 Jun 2003 09:52:10 +0200 Subject: value-prof.c: New. * 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. From-SVN: r68519 --- gcc/toplev.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/toplev.c') diff --git a/gcc/toplev.c b/gcc/toplev.c index 68fbb29..6d1dd44 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -410,6 +410,10 @@ int profile_flag = 0; int profile_arc_flag = 0; +/* Nonzero if value histograms should be measured. */ + +int flag_profile_values = 0; + /* Nonzero if generating info for gcov to calculate line test coverage. */ int flag_test_coverage = 0; @@ -1184,6 +1188,8 @@ static const lang_independent_options f_options[] = N_("Create data files needed by gcov") }, {"branch-probabilities", &flag_dummy, 1, N_("Use profiling information for branch probabilities") }, + {"profile-values", &flag_profile_values, 1, + N_("Insert code to profile values of expressions") }, {"profile", &flag_dummy, 1, N_("Enable basic program profiling code") }, {"reorder-blocks", &flag_dummy, 1, -- cgit v1.1