From: Ryan Hill <dirtyepic@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] Re: Adding a warning to description of global flag "profile".
Date: Mon, 27 Jul 2009 02:57:23 -0600 [thread overview]
Message-ID: <20090727025723.5220e91c@gentoo.org> (raw)
In-Reply-To: 1248649548.31412.14.camel@localhost
[-- Attachment #1: Type: text/plain, Size: 2335 bytes --]
On Mon, 27 Jul 2009 02:05:48 +0300
Mart Raudsepp <leio@gentoo.org> wrote:
> On Fri, 2009-07-24 at 12:04 +0300, Samuli Suominen wrote:
> > Would it be OK if I change
> >
> > [- ] profile - Adds support for software performance analysis (will
> > likely vary from ebuild to ebuild)
> >
> > To
> >
> > [- ] profile - Adds support for software performance analysis
> > (WARNING: DON'T ENABLE UNLESS YOU KNOW WHAT YOU ARE DOING.)
> >
> > Or something similar? Suggestions welcome. People seem to add it
> > randomly in combination with -fomit-frame-pointer which breaks with -pg
> > as expected.
>
> Note that -fomit-frame-pointer is the default with stable gcc (4.3 at
> least) on many architectures - some of those that can still debug with
> gdb without frame pointers thanks to location lists generated to debug
> sections by default with -g on those platforms. This includes at least
> amd64, and I believe x86.
For x86/amd64 -fomit-frame-pointer is enabled at -O1 and higher only if
TARGET_64BIT is true. Not sure about other archs but you can check with
something like...
dirtyepic@halo ~ $ echo "int main() { return 0; }" > test.c
dirtyepic@halo ~ $ gcc -c test.c -Q -O2 --help=optimizers | grep fomit
-fomit-frame-pointer [enabled]
> However it might not default enable in combination with -pg, not sure
> about that. Lets say this is a call for testing that, as combinatory
> CFLAGS enabling -fomit-frame-pointer is your reasoning here.
FRAME_POINTER_REQUIRED is defined when profiling is enabled, so
-fomit-frame-pointer by default will be disabled. If -fomit-frame-pointer
and -pg are both explicitly given on the command line it's an error.
I think the best practise is to strip -fomit-frame-pointer when USE=profile.
Pretty much everyone has it in their CFLAGS (useful or not), and relatively
few packages have the option of building with profiling info. Adding a
warning wouldn't hurt anything though. Or just change the description to
something that doesn't sound as cool. "Build with extra debugging
information for code coverage and branch analysis." or something.
--
gcc-porting, Character is what you are in the dark.
treecleaner,
wxwidgets @ gentoo EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
prev parent reply other threads:[~2009-07-27 8:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-24 9:04 [gentoo-dev] Adding a warning to description of global flag "profile" Samuli Suominen
2009-07-26 20:48 ` Mike Frysinger
2009-07-26 23:05 ` Mart Raudsepp
2009-07-27 8:57 ` Ryan Hill [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=20090727025723.5220e91c@gentoo.org \
--to=dirtyepic@gentoo.org \
--cc=gentoo-dev@lists.gentoo.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