On 1/21/20 4:27 PM, Jan Hubicka wrote:
If distro build takes seriously FDO and reproducibility it will eventually run into the limitation for single-threaded programs and we will need to do reproducible runs for multithread apps which means putting indirect call profiles into thread local storage I think, and giving up on time profiling.
Well, a distro should take it seriously, but a reasonable level of reliability is enough. Right now, we're using gcc9 compiler with backport of -1 invalidation patch and people in distro seems fine.
I think non-reproducible merging could be implemneted easier atop of current infrastructure by simply adding HIST_TYPE_INDIR_CALL_REPRODUCIBLE, HIST_TYPE_INDR_CALL_NONRERPODUCIBGL and HIST_TYPE_TOPN_VALUE_REPRODUCIBLE, HIST_TYPE_TOPN_VALUE_NONREPRODUCIBLE and use appropriate merging function (i.e. one which invalidates full counter versus one whic does not)
So I would not invent one another level of complexity unless it's really needed.
I wonder if we want to teach one of our autotesters to verify that profiledbootstrap is reproducible? I guess we could-re-use our exisitng bootstrap comparsion, we just need to produce two sets of train data and then do the comparsion.
I'll setup a Buildbot builder that will do that on weekly bases. I'm planning to do both PGO and PGO+LTO, where I'll do 2 (or maybe 3) builds with comparison based on md5sum of .text section of cc1plus and some other FE. Martin