Re: [patch 00/2] improve .text size on gcc 4.0 and newer compilers

From: Matt Mackall
Date: Thu Jan 05 2006 - 17:42:28 EST


On Thu, Jan 05, 2006 at 02:08:06PM -0800, Linus Torvalds wrote:
>
> On Thu, 5 Jan 2006, Matt Mackall wrote:
> >
> > I think it's a mistake to interleave this data into the C source. It's
> > expensive and tedious to change relative to its volatility.
>
> I don't believe it is actually all _that_ volatile. Yes, it would be a
> huge issue _initially_, but the incremental effects shouldn't be that big,
> or there is something wrong with the approach.

No, perhaps not. But it would be nice in theory for people to be able
to do things like profile their production system and relink. And
having to touch hundreds of files to do it would be painful.

> > What I was proposing was something like, say, arch/i386/popularity.lst,
> > which would simply contain a list of the most popular n% of functions
> > sorted by popularity. As text, of course.
>
> I suspect that would certainlty work for pure function-based popularity,
> and yes, it has the advantage of being simple (especially for something
> that ends up being almost totally separated from the compiler: if we're
> using this purely to modify link scripts etc with special tools).
>
> But what about the unlikely/likely conditional hints that we currently do
> by hand? How are you going to sanely maintain a list of those without
> doing that in source code?

Dunno. Those bits are all anonymous so marking them in situ is about
the only way to go. But we can do better for whole functions.

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