public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "matz at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/88345] -Os overrides -falign-functions=N on the command line
Date: Wed, 06 Dec 2023 13:38:01 +0000	[thread overview]
Message-ID: <bug-88345-4-SKnB3NKbmg@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-88345-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88345

--- Comment #19 from Michael Matz <matz at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #18)
> Reading all the discussion again, I am leaning towards -falign-all-functions
> + documentation update explaining that -falign-functions/-falign-loops are
> optimizations and ignored for -Os.
> 
> I do use -falign-functions/-falign-loops when tuning for new generations of
> CPUs and I definitely want to have way to specify alignment that is ignored
> for cold functions (as perforance optimization) and we have this behavior
> since profile code was introduced in 2002.
> 
> As an optimization, we also want to have hot functions aligned more than 8
> byte boundary needed for patching.
> 
> I will prepare patch for this and send it for disucssion.  Pehraps we want
> -flive-patching to also imply FUNCTION_BOUNDARY increase on x86-64? Or is
> live patching useful if function entries are not aligned?

Live patching (user-space) doesn't depend on any particular alignment of
functions, on x86-64 at least.  (The plan for other architectures wouldn't need
any specific alignment either).  Note that the above complaints about missing
alignment is for kernel (!) ftrace/livepatching on arm64 (!), not on x86_64.

  parent reply	other threads:[~2023-12-06 13:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-88345-4@http.gcc.gnu.org/bugzilla/>
2020-09-11 10:52 ` koen.zandberg at inria dot fr
2022-09-01  7:24 ` kito at gcc dot gnu.org
2023-01-12 11:34 ` mark at kernel dot org
2023-01-12 16:11 ` egallager at gcc dot gnu.org
2023-01-13 12:56 ` mark at kernel dot org
2023-01-17 16:26 ` ktkachov at gcc dot gnu.org
2023-01-17 16:37 ` kito at gcc dot gnu.org
2023-01-23 14:15 ` mark at kernel dot org
2023-09-12 11:47 ` rguenth at gcc dot gnu.org
2023-09-12 12:35 ` matz at gcc dot gnu.org
2023-11-22 13:20 ` hubicka at gcc dot gnu.org
2023-12-06  9:38 ` hubicka at gcc dot gnu.org
2023-12-06 13:38 ` matz at gcc dot gnu.org [this message]
2023-12-06 17:20 ` hubicka at ucw dot cz
2023-12-06 18:02 ` matz at gcc dot gnu.org
2023-12-07 10:49 ` jamborm at gcc dot gnu.org
2024-01-01 20:22 ` hubicka at gcc dot gnu.org
2024-01-24 17:13 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-88345-4-SKnB3NKbmg@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).