Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: Profiling binaries?
Date: Mon, 22 Oct 2012 09:44:35 -0500	[thread overview]
Message-ID: <50855BD3.3020509@windriver.com> (raw)
In-Reply-To: <1350913794.3259.299.camel@phil-desktop>

On 10/22/12 8:49 AM, Phil Blundell wrote:
> On Mon, 2012-10-22 at 14:40 +0100, Richard Purdie wrote:
>> On Mon, 2012-10-22 at 14:58 +0200, Steffen Sledz wrote:
>>> Just a short question: Does oe[-core] provide a generic method to
>>> create packages containing binaries/libraries with profiling support?
>>
>> Have a look at the section "Optimization flags" in bitbake.conf. You
>> should be able to add the -pg flag to
>> FULL_OPTIMIZATION/DEBUG_OPTIMIZATION and get what you're looking for.
>
> I think you need a bit of special handling around eglibc as well.  But
> otherwise yes, I've done basically this in the past and it seems to work
> fine.

For our environment we do:

# Add profiling optimization type
PROFILING_OPTIMIZATION = "${FULL_OPTIMIZATION} -fno-omit-frame-pointer 
-fvisibility=default"
SELECTED_OPTIMIZATION[vardeps] += "PROFILING_OPTIMIZATION"

# Uncomment to enable profiling
#SELECTED_OPTIMIZATION = "${PROFILING_OPTIMIZATION}"


You can certainly add -pg to the optimization arguments as well.  As others have 
said, you'll need to have the profiling libgcc/libc components if you use -pg.

But this is a simple way to make your own customized optimization.  If you want 
to only enable it for one package you can do something like:

SELECTED_OPTIMIZATION_pn-<recipe> = "${PROFILING_OPTIMIZATION}"

--Mark

> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>




      reply	other threads:[~2012-10-22 14:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-22 12:58 Profiling binaries? Steffen Sledz
2012-10-22 13:12 ` Samuel Stirtzel
2012-10-22 13:20   ` Steffen Sledz
2012-10-22 13:23     ` Samuel Stirtzel
2012-10-22 13:30       ` Jack Mitchell
2012-10-22 15:08       ` Samuel Stirtzel
2012-10-22 13:40 ` Richard Purdie
2012-10-22 13:49   ` Phil Blundell
2012-10-22 14:44     ` Mark Hatle [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=50855BD3.3020509@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.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