Thread (4 messages) 4 messages, 2 authors, 2012-08-13

Re: [PATCH 1/2] ext4: Realign trace events structs to make it smaller

From: Theodore Ts'o <tytso@mit.edu>
Date: 2012-08-13 02:29:50

On Wed, Jul 18, 2012 at 10:07:33AM -0700, Anatol Pomozov wrote:
Most hardware architectures require that data (including struct fields)
have to be aligned in memory. To make it happen compiler inserts padding
between struct fields if they are not aligned correctly.

Reorder fields to remove paddings and make structures denser. Making data
smaller saves some memory that is very important for trace events.
Tracing buffer has limited size and making objects smaller we can put more
of them without overflowing the tracing buffer.

To find data struct holes I used 'pahole -H 1 -E -I vmlinux.o' from
'dwarves' package.

Signed-off-by: Anatol Pomozov <redacted>
Thanks, applied.

						- Ted
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help