public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/extend-profile-report)] profile report: dump pass number.
@ 2021-11-09  9:36 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-11-09  9:36 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c202dc5c58f3a37d3ba57d8d64d60cc6219bf696

commit c202dc5c58f3a37d3ba57d8d64d60cc6219bf696
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Nov 9 10:35:53 2021 +0100

    profile report: dump pass number.
    
    Example:
    
    Profile consistency report:
    
                                         |mismatch     |mismatch     |                     |
    Pass name                            |IN    |IN    |OUT   |OUT   |overall              |
                                         |freq  |count |freq  |count |size      |time      |
    023.cfg                  ------------|      |      |      |      |          |          |
    025.ompexp                           |      |      |      |      |   +100.0%|          |
    026.walloca              ------------|      |      |      |      |          |          |
    029.fixup_cfg                        |      |      |      |      |     -3.5%|          |
    030.ssa                              |      |      |      |      |     -5.6%|          |
    033.nothrow                          |      |      |      |      |     -2.1%|          |
    035.fixup_cfg            ------------|      |      |      |      |          |          |
    036.local-fnsummary      ------------|      |      |      |      |          |          |
    037.einline                          |      |      |      |      |     -0.7%|          |
    ...
    
    gcc/ChangeLog:
    
            * passes.c (pass_manager::dump_profile_report): Dump also pass
            number.

Diff:
---
 gcc/passes.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gcc/passes.c b/gcc/passes.c
index 64550b00b43..95df511c5ea 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1906,9 +1906,9 @@ pass_manager::dump_profile_report () const
     dump_file = stderr;
 
   fprintf (dump_file, "Profile consistency report:\n\n");
-  fprintf (dump_file, "                                 |mismatch     |mismatch     |                     |\n");
-  fprintf (dump_file, "Pass name                        |IN    |IN    |OUT   |OUT   |overall              |\n");
-  fprintf (dump_file, "                                 |freq  |count |freq  |count |size      |time      |\n");
+  fprintf (dump_file, "                                     |mismatch     |mismatch     |                     |\n");
+  fprintf (dump_file, "Pass name                            |IN    |IN    |OUT   |OUT   |overall              |\n");
+  fprintf (dump_file, "                                     |freq  |count |freq  |count |size      |time      |\n");
 	   
   for (int i = 1; i < passes_by_id_size; i++)
     if (profile_record[i].run)
@@ -1931,7 +1931,9 @@ pass_manager::dump_profile_report () const
 	    || rel_time_change || rel_size_change)
 	  {
 	    last_reported = i;
-	    fprintf (dump_file, "%-33s", passes_by_id[i]->name);
+
+	    fprintf (dump_file, "%03d.%-33s", passes_by_id[i]->static_pass_number,
+		     passes_by_id[i]->name);
 	    if (profile_record[i].num_mismatched_freq_in != last_freq_in)
 	      fprintf (dump_file, "| %+5i",
 		       profile_record[i].num_mismatched_freq_in
@@ -1980,8 +1982,8 @@ pass_manager::dump_profile_report () const
 	else if (last_reported != i)
 	  {
 	    last_reported = i;
-	    fprintf (dump_file, "%-20s ------------|      |      |      |      |          |          |\n",
-		     passes_by_id[i]->name);
+	    fprintf (dump_file, "%03d.%-20s ------------|      |      |      |      |          |          |\n",
+		     passes_by_id[i]->static_pass_number, passes_by_id[i]->name);
 	  }
 	last_time = profile_record[i].time;
 	last_size = profile_record[i].size;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-09  9:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-09  9:36 [gcc(refs/users/marxin/heads/extend-profile-report)] profile report: dump pass number Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).