public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1946] profile: do not collect stats unless TDF_DETAILS
@ 2022-08-03  8:56 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-08-03  8:56 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7585e5ecb47761516b8f397002819f2c95b8c32e

commit r13-1946-g7585e5ecb47761516b8f397002819f2c95b8c32e
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Aug 3 10:53:22 2022 +0200

    profile: do not collect stats unless TDF_DETAILS
    
    gcc/ChangeLog:
    
            * profile.cc (compute_branch_probabilities): Do not collect
            stats unless TDF_DETAILS.

Diff:
---
 gcc/profile.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gcc/profile.cc b/gcc/profile.cc
index 92de821b8bb..96121d60711 100644
--- a/gcc/profile.cc
+++ b/gcc/profile.cc
@@ -753,7 +753,8 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum)
 	    bb->count = profile_count::from_gcov_type (bb_gcov_count (bb));
 	  else
 	    bb->count = profile_count::guessed_zero ();
-	  if (dump_file && bb->index >= 0)
+
+	  if (dump_file && (dump_flags & TDF_DETAILS) && bb->index >= 0)
 	    {
 	      double freq1 = cnt.to_sreal_scale (old_entry_cnt).to_double ();
 	      double freq2 = bb->count.to_sreal_scale
@@ -776,8 +777,8 @@ compute_branch_probabilities (unsigned cfg_checksum, unsigned lineno_checksum)
 	      nsum2 += stat.feedback;
 	      fprintf (dump_file,
 		       " Basic block %4i guessed freq: %12.3f"
-		       " cummulative:%6.2f%% "
-		       " feedback freq: %12.3f cummulative:%7.2f%%"
+		       " cumulative:%6.2f%% "
+		       " feedback freq: %12.3f cumulative:%7.2f%%"
 		       " cnt: 10%" PRId64 "\n", stat.bb->index,
 		       stat.guessed,
 		       nsum1 * 100 / sum1,


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

only message in thread, other threads:[~2022-08-03  8:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03  8:56 [gcc r13-1946] profile: do not collect stats unless TDF_DETAILS 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).