lkml.org 
[lkml]   [2009]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/8] tracing: create automated trace defines

[ removed Pekka@firstfloor.org due to mail errors ]

On Tue, 21 Apr 2009, Frank Ch. Eigler wrote:

> Hi -
>
> On Tue, Apr 21, 2009 at 05:17:17PM -0400, Steven Rostedt wrote:
>
> > [...] Perhaps we should fork off gcc and ship Linux with its own
> > compiler. This way we can optimize it for the kernel and not worry
> > about any userland optimizations.
>
> In this regard, kernel land does not seem that unlike user land.
>
> > if (unlikely(err)) {
> > __section__(".error_sect") {
> > /* put error code here */
> > }
> > }
> >
> > And have gcc in the error section (if it is big enough perhaps) do:
> > jmp .L123
> > .L124 [...]
> > [...]
> > jmp .L124
>
> > We could do the same for trace points. That is, any part of code that
> > really would happen once in a while (error handling for one) we can move
> > off to its own section and keep hot paths hot.
>
> This is called -freorder-blocks or -freorder-blocks-and-partition
> (depending on how far you would like gcc to move unlikely blocks).

That does not let us pick and choose what and where to put the code.

But still, a fork of gcc would let us optimize it for the kernel, and not
for generic programs.

/me has been sitting too close to the furnace and must have been taking
up some of those fumes, to be considering a fork of gcc a good idea ;-)

-- Steve



\
 
 \ /
  Last update: 2009-04-21 23:37    [W:1.736 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site