Re: [RFC][PATCH] tracing: Remove useless 4 bytes of padding fromevery event

From: Steven Rostedt
Date: Thu May 17 2012 - 08:11:48 EST


On Thu, 2012-05-17 at 10:06 +0200, Ingo Molnar wrote:

> Nor should we waste too much time over these 4 bytes really. Is
> the kernel really in such a good shape that we must spend our
> time trying to break working apps, over a mostly cosmetic detail
> in an ABI which will soon be messed up with our next set up
> mistakes anyway? ;-)
>

4 bytes is not cosmetic for a 32 byte event. That's 1/8th overhead. If
we could get rid of 4 bytes from struct page, would we do that? It's
only just 4 bytes for ever 4096 bytes. Just a 1/1024 overhead. Of course
perf events are much bigger than 32 bytes. It's one of the biggest
complaints I hear about perf, the size of its events. We should be
trying hard to fix that.

And we are not spending time trying to break tools. The tools were
already broken. The main motivator for getting parse-events into
powertop was that the older version (due to this binary interface) could
not be used on a system running a 32bit userspace on a 64bit kernel.

With the proper parsing, it not only was able to run on a 32/64
environment, it can also parse the events like perf does and not need
direct padding of space.

-- Steve


--
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/