[Bug gcov-profile/90364] 521.wrf_r is 9.5 % slower with PGO on Zen CPUs at -Ofast and native march/mtune
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 10 11:09:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90364
--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #6)
> 6.22% 80774 wrf_r_peak.pgo
> __module_mp_wsm5_MOD_nislfv_rain_plm
> 5.50% 71494 wrf_r_peak.pgo __module_mp_wsm5_MOD_wsm52d
>
> vs.
>
> 4.04% 49253 wrf_r_peak.std __module_mp_wsm5_MOD_wsm52d
> 3.93% 47888 wrf_r_peak.std
> __module_mp_wsm5_MOD_nislfv_rain_plm
>
So it's quite clear what's happening, the profile is empty with:
PASS1_OPTIMIZE = -fprofile-generate
PASS2_OPTIMIZE = -fprofile-use
$ gcov-dump -l module_mp_wsm5.fppized.gcda
module_mp_wsm5.fppized.gcda:data:magic `gcda':version `B00e'
module_mp_wsm5.fppized.gcda:stamp 2705505138
module_mp_wsm5.fppized.gcda: a1000000: 2:OBJECT_SUMMARY runs=1,
sum_max=4450478
module_mp_wsm5.fppized.gcda: 01000000: 3:FUNCTION ident=1833382280,
lineno_checksum=0xc50142f7, cfg_checksum=0xa4c61a93
module_mp_wsm5.fppized.gcda: 01a10000: 28:COUNTERS arcs 14 counts
module_mp_wsm5.fppized.gcda: 0: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 8: 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 01af0000: 2:COUNTERS time_profiler 1 counts
module_mp_wsm5.fppized.gcda: 0: 0
module_mp_wsm5.fppized.gcda: 01000000: 3:FUNCTION ident=1714856802,
lineno_checksum=0x2828ada2, cfg_checksum=0xdf8e1de8
module_mp_wsm5.fppized.gcda: 01a10000: 244:COUNTERS arcs 122 counts
module_mp_wsm5.fppized.gcda: 0: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 8: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 16: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 24: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 32: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 40: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 48: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 56: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 64: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 72: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 80: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 88: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 96: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 104: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 112: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 120: 0 0
module_mp_wsm5.fppized.gcda: 01af0000: 2:COUNTERS time_profiler 1 counts
module_mp_wsm5.fppized.gcda: 0: 0
module_mp_wsm5.fppized.gcda: 01000000: 3:FUNCTION ident=1918459980,
lineno_checksum=0xbfa13ab3, cfg_checksum=0xc8579be8
module_mp_wsm5.fppized.gcda: 01a10000: 6:COUNTERS arcs 3 counts
module_mp_wsm5.fppized.gcda: 0: 0 0 0
module_mp_wsm5.fppized.gcda: 01af0000: 2:COUNTERS time_profiler 1 counts
module_mp_wsm5.fppized.gcda: 0: 0
module_mp_wsm5.fppized.gcda: 01000000: 3:FUNCTION ident=496119459,
lineno_checksum=0x6ee163ab, cfg_checksum=0xa35960e7
module_mp_wsm5.fppized.gcda: 01a10000: 14:COUNTERS arcs 7 counts
module_mp_wsm5.fppized.gcda: 0: 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 01af0000: 2:COUNTERS time_profiler 1 counts
module_mp_wsm5.fppized.gcda: 0: 0
module_mp_wsm5.fppized.gcda: 01000000: 3:FUNCTION ident=296982037,
lineno_checksum=0x6d77a6f1, cfg_checksum=0x136773da
module_mp_wsm5.fppized.gcda: 01a10000: 10:COUNTERS arcs 5 counts
module_mp_wsm5.fppized.gcda: 0: 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 01af0000: 2:COUNTERS time_profiler 1 counts
module_mp_wsm5.fppized.gcda: 0: 0
module_mp_wsm5.fppized.gcda: 01000000: 3:FUNCTION ident=1896179062,
lineno_checksum=0x7ca7aef8, cfg_checksum=0xb913c38e
module_mp_wsm5.fppized.gcda: 01a10000: 10:COUNTERS arcs 5 counts
module_mp_wsm5.fppized.gcda: 0: 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 01af0000: 2:COUNTERS time_profiler 1 counts
module_mp_wsm5.fppized.gcda: 0: 0
module_mp_wsm5.fppized.gcda: 01000000: 3:FUNCTION ident=882722517,
lineno_checksum=0x36b2a0c5, cfg_checksum=0xfd6c3dcf
module_mp_wsm5.fppized.gcda: 01a10000: 102:COUNTERS arcs 51 counts
module_mp_wsm5.fppized.gcda: 0: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 8: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 16: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 24: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 32: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 40: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 48: 0 0 0
module_mp_wsm5.fppized.gcda: 01af0000: 2:COUNTERS time_profiler 1 counts
module_mp_wsm5.fppized.gcda: 0: 0
module_mp_wsm5.fppized.gcda: 01000000: 3:FUNCTION ident=565368009,
lineno_checksum=0x3ec49713, cfg_checksum=0x524e7069
module_mp_wsm5.fppized.gcda: 01a10000: 40:COUNTERS arcs 20 counts
module_mp_wsm5.fppized.gcda: 0: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 8: 0 0 0 0 0 0 0 0
module_mp_wsm5.fppized.gcda: 16: 0 0 0 0
module_mp_wsm5.fppized.gcda: 01af0000: 2:COUNTERS time_profiler 1 counts
module_mp_wsm5.fppized.gcda: 0: 0
module_mp_wsm5.fppized.gcda: 01000000: 3:FUNCTION ident=1161842353,
lineno_checksum=0x74ac7c74, cfg_checksum=0xc0bbb23e
module_mp_wsm5.fppized.gcda: 01a10000: 4:COUNTERS arcs 2 counts
module_mp_wsm5.fppized.gcda: 0: 0 0
module_mp_wsm5.fppized.gcda: 01af0000: 2:COUNTERS time_profiler 1 counts
module_mp_wsm5.fppized.gcda: 0: 0
module_mp_wsm5.fppized.gcda: 01000000: 3:FUNCTION ident=1483697005,
lineno_checksum=0x28631a77, cfg_checksum=0x138f8244
module_mp_wsm5.fppized.gcda: 01a10000: 6:COUNTERS arcs 3 counts
module_mp_wsm5.fppized.gcda: 0: 0 0 0
module_mp_wsm5.fppized.gcda: 01af0000: 2:COUNTERS time_profiler 1 counts
module_mp_wsm5.fppized.gcda: 0: 0
As seen, all arcs are zero. On the other, when I added --coverage and did a
normal run (no PASS[12]_OPTIMIZE) and --size=train
I get a profile that is presented in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90364#c5. What's also strange is
that
I see 'runs=2' when doing --size=train run.
So I suspect specinvoke that's responsible for the profile smashing..
More information about the Gcc-bugs
mailing list