public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: "Linda A. Walsh" <gcc@tlinx.org>
To: Oleg Smolsky <osmolsky@netskope.com>,
	"libc-help@sourceware.org" <libc-help@sourceware.org>
Subject: Re: Q: -fno-omit-frame-pointer
Date: Wed, 07 Apr 2021 00:00:10 -0700	[thread overview]
Message-ID: <606D587A.6070007@tlinx.org> (raw)
In-Reply-To: <CAAucFJejMD41G5O3OwONe7cXZCVXwSL8NVOWv2zOPE2L4FCp0A@mail.gmail.com>

On 2021/03/31 14:23, Oleg Smolsky via Libc-help wrote:
> Folks, what is the default for x88-64 builds w.r.t. the frame pointers? (I
> think it's "off"). I couldn't find a configure.ac option to tweak that...
> yet it's easy to force via CFLAGS.
>   
The defaults may be different on your machine and by debug/optimization
switches.

To see which switches are turned on for a given optimization,
use -Q -O(0-3) --help=optimizers
On my machine, I ran
 gcc -c -Q -O3 --help=optimizers >/tmp/O3-opts 
subbing in O2, O1 and O0 then searching through the output:
grep omit-frame *opts
O0-opts:  -fomit-frame-pointer            [disabled]
O1-opts:  -fomit-frame-pointer            [enabled]
O2-opts:  -fomit-frame-pointer            [enabled]
O3-opts:  -fomit-frame-pointer            [enabled]
---

So looks like frame-ptr is usually omitted, but not in O0...
Debug options may also affect it being turned on or off...




      parent reply	other threads:[~2021-04-07  7:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 21:23 Oleg Smolsky
2021-04-01 14:38 ` Adhemerval Zanella
2021-04-07  7:00 ` Linda A. Walsh [this message]

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=606D587A.6070007@tlinx.org \
    --to=gcc@tlinx.org \
    --cc=libc-help@sourceware.org \
    --cc=osmolsky@netskope.com \
    /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).