public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Adding a warning to description of global flag "profile".
@ 2009-07-24  9:04 Samuli Suominen
  2009-07-26 20:48 ` Mike Frysinger
  2009-07-26 23:05 ` Mart Raudsepp
  0 siblings, 2 replies; 4+ messages in thread
From: Samuli Suominen @ 2009-07-24  9:04 UTC (permalink / raw
  To: gentoo-dev

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.

Thanks, Samuli



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] Adding a warning to description of global flag "profile".
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2009-07-26 20:48 UTC (permalink / raw
  To: gentoo-dev; +Cc: Samuli Suominen

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

On Friday 24 July 2009 05:04:28 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.)

the "WARNING:" is redundant

> Or something similar? Suggestions welcome. People seem to add it
> randomly in combination with -fomit-frame-pointer which breaks with -pg
> as expected.

seems a little harsh, but should be fine
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-dev] Adding a warning to description of global flag "profile".
  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   ` [gentoo-dev] " Ryan Hill
  1 sibling, 1 reply; 4+ messages in thread
From: Mart Raudsepp @ 2009-07-26 23:05 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]

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.
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.

-- 
Mart Raudsepp
Gentoo Developer
Mail: leio@gentoo.org
Weblog: http://planet.gentoo.org/developers/leio

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [gentoo-dev]  Re: Adding a warning to description of global flag "profile".
  2009-07-26 23:05 ` Mart Raudsepp
@ 2009-07-27  8:57   ` Ryan Hill
  0 siblings, 0 replies; 4+ messages in thread
From: Ryan Hill @ 2009-07-27  8:57 UTC (permalink / raw
  To: gentoo-dev

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-27  8:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` [gentoo-dev] " Ryan Hill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox