aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-01-22 14:00:30 +0100
committerMartin Liska <mliska@suse.cz>2021-01-22 14:20:53 +0100
commitb46027c6544d3680b3647d3c771c9844b8b95772 (patch)
tree02024a2db47d08225b880a62f91aa3d47c24d3f5 /gcc
parent4804de453e7f5f90dd5e64114abbd272f9e8f62d (diff)
downloadgcc-b46027c6544d3680b3647d3c771c9844b8b95772.zip
gcc-b46027c6544d3680b3647d3c771c9844b8b95772.tar.gz
gcc-b46027c6544d3680b3647d3c771c9844b8b95772.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/profile.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/profile.c b/gcc/profile.c
index 1f1d60c..1fa4196 100644
--- a/gcc/profile.c
+++ b/gcc/profile.c
@@ -897,8 +897,16 @@ compute_value_histograms (histogram_values values, unsigned cfg_checksum,
node->tp_first_run = 0;
}
- if (dump_file)
- fprintf (dump_file, "Read tp_first_run: %d\n", node->tp_first_run);
+ /* Drop profile for -fprofile-reproducible=multithreaded. */
+ bool drop
+ = (flag_profile_reproducible == PROFILE_REPRODUCIBILITY_MULTITHREADED);
+ if (drop)
+ node->tp_first_run = 0;
+
+ if (dump_file)
+ fprintf (dump_file, "Read tp_first_run: %d%s\n", node->tp_first_run,
+ drop ? "; ignored because profile reproducibility is "
+ "multi-threaded" : "");
}
}