lkml.org 
[lkml]   [2006]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 00/2] improve .text size on gcc 4.0 and newer compilers
Matt Mackall wrote:
> On Thu, Jan 05, 2006 at 01:19:12PM +0100, Arjan van de Ven wrote:
>
>>>What would be nice to do is pack all the frequently used code together
>>>in close proximity. Would probably have much larger effects with
>>>userspace code, esp where we touch disk (which is more page-size
>>>granularity), but is probably worth doing with kernel code too (where
>>>AFAICS we'd only get cacheline granular).
>>
>>in the kernel we could make a .text.rare section for functions, which we
>>could annotate with __rare.
>>The other way around, __fastpath or whatever is a bad idea, everyone
>>will consider all of their own functions as such (just like inline ;)...
>>go-fast-stripes all the way :-(
>
>
> Gah, we don't want to do this by hand in either direction. It's the
> inline nightmare all over again.

Absolutely.

> It'd be better to take a tool like oprofile and run it against some
> test suite to generate a usage map, then re-sort based on the map.
> Then ship a "standard" map in the stock tarball. Note that the map
> need only list the popular functions.
>
> The ideal sampling tool can collect second order information: which
> functions are executed near each other as well as which are executed
> most frequently.

There are tools already around to do this sort of thing as well -
"profile directed optimization" or whatever they called it. Seems to be
fairly commonly done with userspace, but not with the kernel. I'm not
sure why not ... possibly because it's not available for gcc ?

M.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-05 19:08    [W:0.118 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site