]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Dump profile_info in ipa-profile dump
authorJan Hubicka <hubicka@ucw.cz>
Wed, 3 Sep 2025 16:00:42 +0000 (18:00 +0200)
committerJan Hubicka <hubicka@ucw.cz>
Wed, 3 Sep 2025 16:00:42 +0000 (18:00 +0200)
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.

gcc/ipa-profile.cc

index c8b8529e38b7f7720f1035f4911d445eb442651c..d4725ce626264a92ec4b4bd98bba7c8df00e6c00 100644 (file)
@@ -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;