From 0a7501658c43bba75e8130f250ae6445eab0ea9f Mon Sep 17 00:00:00 2001 From: Rong Xu Date: Tue, 7 Oct 2014 04:06:12 +0000 Subject: params.def (PARAM_INDIR_CALL_TOPN_PROFILE): New param. 2014-10-06 Rong Xu * gcc/params.def (PARAM_INDIR_CALL_TOPN_PROFILE): New param. * gcc/tree-profile.c: (params.h): New include. (init_ic_make_global_vars): Make __gcov_indirect_call_topn_callee and __gcov_indirect_call_topn_counters for indirect_call_topn_profile. (gimple_init_edge_profiler): New decls for __gcov_indirect_call_topn_profiler. (gimple_gen_ic_profiler): Generate the correct profiler call. (gimple_gen_ic_func_profiler): Fix format. * gcc/value-prof.c (params.h): New include. (dump_histogram_value): Hanlde indirect_call_topn counters. (stream_in_histogram_value): Ditto. (gimple_indirect_call_to_profile): Use indirect_call_topn profile when PARAM_INDIR_CALL_TOPN_PROFILE is set. (gimple_find_values_to_profile): Hanlde indirect_call_topn counters. * gcc/value-prof.h (enum hist_type): Histrogram type for indirect_call_topn counters. * gcc/profile.c (instrument_values): Instrument indirect_call_topn counters. From-SVN: r215963 --- gcc/value-prof.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/value-prof.h') diff --git a/gcc/value-prof.h b/gcc/value-prof.h index 9d2c351..00a89fa 100644 --- a/gcc/value-prof.h +++ b/gcc/value-prof.h @@ -35,6 +35,8 @@ enum hist_type HIST_TYPE_AVERAGE, /* Compute average value (sum of all values). */ HIST_TYPE_IOR, /* Used to compute expected alignment. */ HIST_TYPE_TIME_PROFILE, /* Used for time profile */ + HIST_TYPE_INDIR_CALL_TOPN, /* Tries to identify the top N most frequently + called functions in indirect call. */ HIST_TYPE_MAX }; -- cgit v1.1