public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/extend-profile-report)] profile report: dump pass number.
Date: Tue,  9 Nov 2021 09:36:40 +0000 (GMT)	[thread overview]
Message-ID: <20211109093640.01FAC3858423@sourceware.org> (raw)

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;


                 reply	other threads:[~2021-11-09  9:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211109093640.01FAC3858423@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).