From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA7573858401; Thu, 7 Mar 2024 06:45:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA7573858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1709793924; bh=fcnZFu0Bx2jhWBfl8UNnsQQj59c4P8MLT0l3HT0j/jo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DGEJO1vxvGlyD+NgJTXAdRgW3AxD9eWyv9rjoofKAcj7HJNYVQey3N43yuhvTm+6j FTWWfApYAG8zFW4awn3mBtpqyv90oIEF3MKC387t3RfrXAezcuSYPr/qGrQx19HtSv T7My/B1qHLBr9CWZ+0clWWtZNZSstkvGCj7oDxT8= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111523] Unexpected performance regression with -ftrivial-auto-var-init=zero for e.g. systemctl unmask Date: Thu, 07 Mar 2024 06:45:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: MOVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111523 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |MOVED --- Comment #9 from Andrew Pinski --- Turns out systemd had a 1MB buffer in their serializer formating code (serialize_item_format) that would be executed a lot and -ftrivial-auto-var-init=3Dzero would cause this buffer to be zero'd each ti= me the function was called (a decent thing for this flag to do). It just happens serialize_item_format is called a lot when it came serialization. With arm memory systems being slower than most, it just expo= sed this issue. Anways systemd has now changed the buffer to 256 which is much much smaller= and for most calls enough in size before needing to reallocate the buffer that = it has now become fast. Anyways -ftrivial-auto-var-init=3Dzero just exposed a performance (stack si= ze) issue with already existing issue inside the systemd code. A good thing rea= lly.=20 So closing as moved.=