[oe] profiling howto?
Steffen Sledz
sledz at dresearch.de
Thu Feb 3 08:05:50 UTC 2011
Am 02.02.2011 14:12, schrieb Holger Freyther:
> On 02/02/2011 01:59 PM, Steffen Sledz wrote:
>> Am 02.02.2011 10:54, schrieb Steffen Sledz:
>>
>> But is it possible to enable profiling for selected libs and/or binaries only?
>
> yes, you can use the classic override system... just place _pn-PN to these
> variables or such. But be aware that if your app will call some other library
> and there are no framepointers there will be no backtrace.. same applies to
> functions written in assembly, e.g. memcpy...
Hmmmm? This doesn't seem to work. :(
If local.conf contains this
------------->snip<------------
PROFILE_OPTIMIZATION = "-pg"
SELECTED_OPTIMIZATION_pn-libsoup = "${PROFILE_OPTIMIZATION}"
LDFLAGS_pn-libsoup =+ "-pg"
SELECTED_OPTIMIZATION_pn-libgupnp = "${PROFILE_OPTIMIZATION}"
LDFLAGS_pn-libgupnp =+ "-pg"
SELECTED_OPTIMIZATION_pn-libgssdp = "${PROFILE_OPTIMIZATION}"
LDFLAGS_pn-libgssdp =+ "-pg"
------------->snip<------------
after a clean build tmp.6/work/armv5te-angstrom-linux-gnueabi/libsoup-2.4-2.29.91-r0/temp/run.do_compile.7972 contains this
------------->snip<------------
export TARGET_CFLAGS="-isystem/home/DRESEARCH/sledz/work/HydraIP/OE/tmp.6/sysroots/armv5te-angstrom-linux-gnueabi/usr/include -fexpensive-optimizations -frename-registers -fomit-frame-pointer -O2 -ggdb2"
------------->snip<------------
If setting the optimization params globally in local.conf to
------------->snip<------------
PROFILE_OPTIMIZATION = "-pg"
SELECTED_OPTIMIZATION = "${PROFILE_OPTIMIZATION}"
LDFLAGS =+ "-pg"
------------->snip<------------
everything seems to be OK:
------------->snip<------------
export TARGET_CFLAGS="-isystem/home/DRESEARCH/sledz/work/HydraIP/OE/tmp.6/sysroots/armv5te-angstrom-linux-gnueabi/usr/include -pg"
------------->snip<------------
Steffen
--
DResearch Fahrzeugelektronik GmbH
Otto-Schmirgal-Str. 3, 10319 Berlin, Germany
Tel: +49 30 515932-237 mailto:sledz at DResearch.de
Fax: +49 30 515932-299
Geschäftsführer: Dr. Michael Weber, Werner Mögle;
Amtsgericht Berlin Charlottenburg; HRB 130120 B;
Ust.-IDNr. DE273952058
More information about the Openembedded-devel
mailing list