Hans-Peter Nilsson <h...@axis.com> writes:

>> From: Sam James <s...@gentoo.org>
>> Date: Sun, 17 Sep 2023 05:00:37 +0100
>
>> Hans-Peter Nilsson via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
>> 
>> >> Date: Tue, 29 Aug 2023 15:42:27 -0400
>> >> From: Marek Polacek via Gcc-patches <gcc-patches@gcc.gnu.org>
>> >
>> >> Surely, there must be no ABI impact, the option cannot cause
>> >> severe performance issues,
>> >
>> >> Currently, -fhardened enables:
>> > ...
>> >>   -ftrivial-auto-var-init=zero
>> >
>> >> Thoughts?
>> >
>> > Regarding -ftrivial-auto-var-init=zero, I was consulted when
>> > colleagues investigating a performance regression
>> > pint-pointed it as *causing severe performance issues*;
>> > cf. https://github.com/systemd/systemd.git commit 1a4e392760
>> > (TL;DR: adds "-ftrivial-auto-var-init=zero" to the systemd
>> > build).
>> >
>> > The situation was described as "we noticed that some test
>> > suites takes 35% percent longer time to finish.  After
>> > further investigation it was noticed that running systemctl
>> > unmask x takes around 5s more time on [version including
>> > patch vs. before that patch]" (timing out some tests).
>> > Reverting that patch fixed the drop in performance.
>> 
>> Did some bug ever get filed for this to see if we can do a bit
>> better here?
>
> Not that I know of; neither for systemd nor gcc.
>
>> Some slowdown doesn't mean it's of the expected magnitude.
>
> Can you please rephrase that?

Sorry, what I meant was: yes, I'd expect a bit of a slowdown
with this option that's unavoidable, but what you're describing
sounds far beyond the normal case.

(to the extent that it might be
we're either missing an optimisation in GCC for the relevant bits,
or the systemd parts being exercised here are pathological.)


Reply via email to