> On 1/21/21 8:13 PM, Martin Liška wrote: > > Yes, it will be a better place! > > > > Martin > > There's an updated version of the patch. > > Thoughts? > Thanks, > Martin
> From 0be300d1d69e98624f7be5b54931126965f1436e Mon Sep 17 00:00:00 2001 > From: Martin Liska <mli...@suse.cz> > Date: Fri, 22 Jan 2021 14:00:30 +0100 > Subject: [PATCH] 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. This is OK. To save future debugging, perhaps I would keep the code printing the tp first run value to dump file and do fprintf (dump_file, "Read tp_first_run: %d; ignored because profile reproducibility is multithreaded\n", node->tp_first_run); In few years we may forget about this logic and wonder why it does not work... Thanks, Honza > --- > 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); > } > } > -- > 2.30.0 >