[gcc(refs/users/marxin/heads/PR98739-drop-tp_first_run-in-multi-threaded-training)] Drop time profile for multi-threaded training run.

Martin Liska marxin@gcc.gnu.org
Fri Jan 22 13:02:25 GMT 2021


https://gcc.gnu.org/g:0be300d1d69e98624f7be5b54931126965f1436e

commit 0be300d1d69e98624f7be5b54931126965f1436e
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Jan 22 14:00:30 2021 +0100

    Drop time profile for multi-threaded training run.
    
    gcc/ChangeLog:
    
            PR gcov-profile/98739
            * profile.c (compute_value_histograms): Drop time profile for
            -fprofile-reproducible=multithreaded.

Diff:
---
 gcc/profile.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gcc/profile.c b/gcc/profile.c
index 1f1d60c8180..010c5627c89 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -897,7 +897,10 @@ compute_value_histograms (histogram_values values, unsigned cfg_checksum,
 	      node->tp_first_run = 0;
 	    }
 
-          if (dump_file)
+	  /* Drop profile for -fprofile-reproducible=multithreaded.  */
+	  if (flag_profile_reproducible == PROFILE_REPRODUCIBILITY_MULTITHREADED)
+	    node->tp_first_run = 0;
+	  else if (dump_file)
             fprintf (dump_file, "Read tp_first_run: %d\n", node->tp_first_run);
         }
     }


More information about the Gcc-cvs mailing list