[Ce-android-mainline] logger update - jan 25

Andy Green andy.green at linaro.org
Thu Jan 26 00:35:19 UTC 2012


On 01/26/2012 03:01 AM, Somebody in the thread at some point said:

Hi -

> as suggested by Android Morton.

^^  Actually that has a nice ring to it.

> With respect to this, I have found one thing that I didn't expect.
> Andrew Morton said that the 'inline' attribute on small functions
> is not needed, since the compilers generaly do the right thing with them.
> My experience with a gcc 4.2.1 ARM cross compiler is different.

It's pretty old compiler version.  I use a not quite so old 4.5 cross
toolchain and I regularly see it has inlined single-use static functions
into callers directly without inline.

> If I don't specify 'inline', then the code does NOT get inlined
> This is for a very simple one-line function, where the call
> overhead is larger than the code to execute the function.
> 
> Am I missing something, or is gcc just dumb?
> I don't want to ignore Andrew, but I'm inclined to keep the 'inline'
> attribute on some functions.

gcc 4.7 is out there I guess it's worth cooking with later tools.

-Andy
-- 
Andy Green | TI Landing Team Leader
Linaro.org │ Open source software for ARM SoCs | Follow Linaro
http://facebook.com/pages/Linaro/155974581091106  -
http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog


More information about the Ce-android-mainline mailing list