Re: [patch 3/3] tracepoints: use __u64_aligned/U64_ALIGN()

From: David Miller
Date: Fri Jan 21 2011 - 19:04:46 EST


From: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
Date: Fri, 21 Jan 2011 15:36:33 -0500

> commit 7e066fb870fcd1025ec3ba7bbde5d541094f4ce1 added the aligned(32) type and
> variable attribute to the tracepoint structures to deal with gcc happily
> aligning statically defined structures on 32-byte multiples.
>
> Working on issues within Ftrace, we came up with __64_aligned, which deals with
> this issue more elegantly by forcing an 8-byte alignment to both the type
> declaration and variable definition.
>
> This therefore saves space, bringing down the size of struct tracepoint from 64
> bytes to 38 on 64-bit architectures.
>
> Updating:
> - The type attribute (for iteration over the struct tracepoint array)
> - Added the variable attribute to the extern definition (needed to force gcc to
> consider this alignment for the following definition)
> - The definition variable attribute (to force gcc to this specific alignment for
> the static definitions)
> - The linker script (8-byte alignment can now replace the previous 32-byte
> alignment for the custom tracepoint section)
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>

Acked-by: David S. Miller <davem@xxxxxxxxxxxxx>
--
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/