| Submitter | Khem Raj |
|---|---|
| Date | March 21, 2011, 6:11 p.m. |
| Message ID | <00f980d5a81d4cd6273ec10b67e4d288b8fd64de.1300730825.git.raj.khem@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/1651/ |
| State | New, archived |
| Headers | show |
Comments
On Mon, 2011-03-21 at 11:11 -0700, Khem Raj wrote: > -fexpensive-optimizations is enabled by default at -O2 > > -fomit-frame-pointer is enabled at -O2 selectively by gcc depending upon > architecture if debug info is not hurt > > -frename-registers - This might have some performance advantage on top > of O2 on architectures which have more registers and registers are left > after scheduling but it affects debuggability quite a bit so as a i > tradeoff we do not use it. > > -feliminate-dwarf2-dups - We use this option to reduce the size of debug > information by removing duplicates this is only valid for dwarf2+ and we > use dwarf2 by default I've disabled this flag for now as it was causing too many failures across the board (various apps, prelinker). We can add it back when this has been tested more extensively and its been confirmed to work with the prelinker. Cheers, Richard
On (29/03/11 14:34), Richard Purdie wrote: > On Mon, 2011-03-21 at 11:11 -0700, Khem Raj wrote: > > -fexpensive-optimizations is enabled by default at -O2 > > > > -fomit-frame-pointer is enabled at -O2 selectively by gcc depending upon > > architecture if debug info is not hurt > > > > -frename-registers - This might have some performance advantage on top > > of O2 on architectures which have more registers and registers are left > > after scheduling but it affects debuggability quite a bit so as a i > > tradeoff we do not use it. > > > > -feliminate-dwarf2-dups - We use this option to reduce the size of debug > > information by removing duplicates this is only valid for dwarf2+ and we > > use dwarf2 by default > > I've disabled this flag for now as it was causing too many failures > across the board (various apps, prelinker). We can add it back when this > has been tested more extensively and its been confirmed to work with the > prelinker. It would have been better to disable one by one we would be able to utilize current testing. Most probaly the prelink issue is due to -feliminate-dwarf2-dups did you try to remove that out ? > > Cheers, > > Richard > > > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
On 03/29/2011 09:00 AM, Khem Raj wrote: > On (29/03/11 14:34), Richard Purdie wrote: >> On Mon, 2011-03-21 at 11:11 -0700, Khem Raj wrote: >>> -fexpensive-optimizations is enabled by default at -O2 >>> >>> -fomit-frame-pointer is enabled at -O2 selectively by gcc depending upon >>> architecture if debug info is not hurt >>> >>> -frename-registers - This might have some performance advantage on top >>> of O2 on architectures which have more registers and registers are left >>> after scheduling but it affects debuggability quite a bit so as a i >>> tradeoff we do not use it. >>> >>> -feliminate-dwarf2-dups - We use this option to reduce the size of debug >>> information by removing duplicates this is only valid for dwarf2+ and we >>> use dwarf2 by default >> >> I've disabled this flag for now as it was causing too many failures >> across the board (various apps, prelinker). We can add it back when this >> has been tested more extensively and its been confirmed to work with the >> prelinker. > > It would have been better to disable one by one we would be able to > utilize current testing. Most probaly the prelink issue is due to -feliminate-dwarf2-dups did you try to remove that out ? This change, in particular adding -feliminate-dwarf2-dups, breaks my build of chromium(*) (in strange ways, it ends up building .a libraries which the linker can't parse). Everything else I've tried to build seems OK though. For now, I've just dropped this option in my DISTRO.conf (*) It took quite some time to isolate this as the problem as it is a royal pain to test BTW as it takes more than an hour to build this one package on my hefty build server!
On Tue, Mar 29, 2011 at 8:00 AM, Khem Raj <raj.khem@gmail.com> wrote: > On (29/03/11 14:34), Richard Purdie wrote: >> On Mon, 2011-03-21 at 11:11 -0700, Khem Raj wrote: >> > -fexpensive-optimizations is enabled by default at -O2 >> > >> > -fomit-frame-pointer is enabled at -O2 selectively by gcc depending upon >> > architecture if debug info is not hurt >> > >> > -frename-registers - This might have some performance advantage on top >> > of O2 on architectures which have more registers and registers are left >> > after scheduling but it affects debuggability quite a bit so as a i >> > tradeoff we do not use it. >> > >> > -feliminate-dwarf2-dups - We use this option to reduce the size of debug >> > information by removing duplicates this is only valid for dwarf2+ and we >> > use dwarf2 by default >> >> I've disabled this flag for now as it was causing too many failures >> across the board (various apps, prelinker). We can add it back when this >> has been tested more extensively and its been confirmed to work with the >> prelinker. > > It would have been better to disable one by one we would be able to > utilize current testing. Most probaly the prelink issue is due to -feliminate-dwarf2-dups did you try to remove that out ? > To answer myself. I should have looked at the committed patch. :) >> >> Cheers, >> >> Richard >> >> >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > > -- > -Khem >
On Tue, Mar 29, 2011 at 4:53 PM, Gary Thomas <gary@mlbassoc.com> wrote: > On 03/29/2011 09:00 AM, Khem Raj wrote: >> >> On (29/03/11 14:34), Richard Purdie wrote: >>> >>> On Mon, 2011-03-21 at 11:11 -0700, Khem Raj wrote: >>>> >>>> -fexpensive-optimizations is enabled by default at -O2 >>>> >>>> -fomit-frame-pointer is enabled at -O2 selectively by gcc depending upon >>>> architecture if debug info is not hurt >>>> >>>> -frename-registers - This might have some performance advantage on top >>>> of O2 on architectures which have more registers and registers are left >>>> after scheduling but it affects debuggability quite a bit so as a i >>>> tradeoff we do not use it. >>>> >>>> -feliminate-dwarf2-dups - We use this option to reduce the size of debug >>>> information by removing duplicates this is only valid for dwarf2+ and >>>> we >>>> use dwarf2 by default >>> >>> I've disabled this flag for now as it was causing too many failures >>> across the board (various apps, prelinker). We can add it back when this >>> has been tested more extensively and its been confirmed to work with the >>> prelinker. >> >> It would have been better to disable one by one we would be able to >> utilize current testing. Most probaly the prelink issue is due to >> -feliminate-dwarf2-dups did you try to remove that out ? > > This change, in particular adding -feliminate-dwarf2-dups, breaks my > build of chromium(*) (in strange ways, it ends up building .a libraries > which the linker can't parse). Everything else I've tried to build > seems OK though. For now, I've just dropped this option in my DISTRO.conf You dont have to after Richard already dropped it from bitbake.conf its better to stay close enough to defaults > > (*) It took quite some time to isolate this as the problem as it is a royal > pain to test BTW as it takes more than an hour to build this one package on > my > hefty build server! hmmm I wonder if its disabling PARALLE_MAKE ? > > -- > ------------------------------------------------------------ > Gary Thomas | Consulting for the > MLB Associates | Embedded world > ------------------------------------------------------------ >
On 03/29/2011 07:31 PM, Khem Raj wrote: > On Tue, Mar 29, 2011 at 4:53 PM, Gary Thomas<gary@mlbassoc.com> wrote: >> On 03/29/2011 09:00 AM, Khem Raj wrote: >>> >>> On (29/03/11 14:34), Richard Purdie wrote: >>>> >>>> On Mon, 2011-03-21 at 11:11 -0700, Khem Raj wrote: >>>>> >>>>> -fexpensive-optimizations is enabled by default at -O2 >>>>> >>>>> -fomit-frame-pointer is enabled at -O2 selectively by gcc depending upon >>>>> architecture if debug info is not hurt >>>>> >>>>> -frename-registers - This might have some performance advantage on top >>>>> of O2 on architectures which have more registers and registers are left >>>>> after scheduling but it affects debuggability quite a bit so as a i >>>>> tradeoff we do not use it. >>>>> >>>>> -feliminate-dwarf2-dups - We use this option to reduce the size of debug >>>>> information by removing duplicates this is only valid for dwarf2+ and >>>>> we >>>>> use dwarf2 by default >>>> >>>> I've disabled this flag for now as it was causing too many failures >>>> across the board (various apps, prelinker). We can add it back when this >>>> has been tested more extensively and its been confirmed to work with the >>>> prelinker. >>> >>> It would have been better to disable one by one we would be able to >>> utilize current testing. Most probaly the prelink issue is due to >>> -feliminate-dwarf2-dups did you try to remove that out ? >> >> This change, in particular adding -feliminate-dwarf2-dups, breaks my >> build of chromium(*) (in strange ways, it ends up building .a libraries >> which the linker can't parse). Everything else I've tried to build >> seems OK though. For now, I've just dropped this option in my DISTRO.conf > > You dont have to after Richard already dropped it from bitbake.conf > its better to stay close enough to defaults Absolutely. Thanks, Richard, for moving quickly on this. >> >> (*) It took quite some time to isolate this as the problem as it is a royal >> pain to test BTW as it takes more than an hour to build this one package on >> my >> hefty build server! > > hmmm I wonder if its disabling PARALLE_MAKE ? Nah, it's just *HUGE* - the tmp/work build tree is ~8GB
Patch
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf index d5f1fc5..52e66a5 100644 --- a/meta/conf/bitbake.conf +++ b/meta/conf/bitbake.conf @@ -495,11 +495,11 @@ EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} " ################################################################## # Optimization flags. ################################################################## - -FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types" -DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer -g" +DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types -feliminate-dwarf2-dups" +FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}" +DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe" SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}" -BUILD_OPTIMIZATION = "-O2" +BUILD_OPTIMIZATION = "-O2 -pipe" ################################################################## # Bootstrap stuff.
-fexpensive-optimizations is enabled by default at -O2 -fomit-frame-pointer is enabled at -O2 selectively by gcc depending upon architecture if debug info is not hurt -frename-registers - This might have some performance advantage on top of O2 on architectures which have more registers and registers are left after scheduling but it affects debuggability quite a bit so as a i tradeoff we do not use it. -feliminate-dwarf2-dups - We use this option to reduce the size of debug information by removing duplicates this is only valid for dwarf2+ and we use dwarf2 by default -pipe uses buffers instead of temporary files internally it can speed up compilation it has has issues with other assemblers but not with GNU assembler and we use gas. Separate out debug information related flags into a separate variable DEBUG_FLAGS so distros can use/notuse them as they like Signed-off-by: Khem Raj <raj.khem@gmail.com> --- meta/conf/bitbake.conf | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)