From: Jan Hubicka Date: Wed, 3 Sep 2025 16:00:42 +0000 (+0200) Subject: Dump profile_info in ipa-profile dump X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bda76b479dc8492183dbf73236ff30805674f6f5;p=thirdparty%2Fgcc.git Dump profile_info in ipa-profile dump WPA currently does not print profile_info which might have been modified by profile merging logic. this patch adds dumping logic to ipa-profile pass. Bootstrapped/regtested x86_64-linux, comitted. gcc/ChangeLog: * ipa-profile.cc (ipa_profile): Dump profile_info. --- diff --git a/gcc/ipa-profile.cc b/gcc/ipa-profile.cc index c8b8529e38b..d4725ce6262 100644 --- a/gcc/ipa-profile.cc +++ b/gcc/ipa-profile.cc @@ -773,7 +773,17 @@ ipa_profile (void) gcov_type threshold; if (dump_file) - dump_histogram (dump_file, histogram); + { + if (profile_info) + { + fprintf (dump_file, + "runs: %i sum_max: %" PRId64 " cutoff: %" PRId64"\n", + profile_info->runs, profile_info->sum_max, profile_info->cutoff); + fprintf (dump_file, "hot bb threshold: %" PRId64 "\n", + get_hot_bb_threshold ()); + } + dump_histogram (dump_file, histogram); + } for (i = 0; i < (int)histogram.length (); i++) { overall_time += ((widest_int)histogram[i]->count) * histogram[i]->time;