User: Password:
Subscribe / Log in / New account

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

From:  Steven Rostedt <>
To:  Ingo Molnar <>
Subject:  Re: [RFC][PATCH] tracing: Remove useless 4 bytes of padding from every event
Date:  Thu, 17 May 2012 08:11:47 -0400
Message-ID:  <>
Cc:  Arjan van de Ven <>, Dave Jones <>, Linus Torvalds <>, LKML <>, Ingo Molnar <>, Frederic Weisbecker <>, David Sharp <>, Vaibhav Nagarnaik <>, Peter Zijlstra <>, Andrew Morton <>
Archive-link:  Article

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

(Log in to post comments)

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds