From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
David Miller <davem@davemloft.net>,
Frederic Weisbecker <fweisbec@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Rusty Russell <rusty@rustcorp.com.au>
Subject: Re: [PATCH 2/2] Tracepoints: Fix section alignment using pointer array
Date: Wed, 2 Feb 2011 14:32:09 -0500 [thread overview]
Message-ID: <20110202193209.GA29590@Krystal> (raw)
In-Reply-To: <1296673015.10797.66.camel@gandalf.stny.rr.com>
* Steven Rostedt (rostedt@goodmis.org) wrote:
> On Wed, 2011-02-02 at 13:31 -0500, Mathieu Desnoyers wrote:
>
> > > History:
> > >
> > > 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.
> > >
> > > commit 15e3540ce2159705f18fad6147ffedf04445ad64 tried to use a 8-byte alignment
> > > for tracepoint structures by applying both the variable and type attribute to
> > > tracepoint structures definitions and declarations. It worked fine with gcc
> > > 4.5.1, but broke with gcc 4.4.4 and 4.4.5.
> >
> > Small nit: this reference to commit 15e3540ce2159705f18fad6147ffedf04445ad64
> > should be changed to a non-commit-id-related explanation, because the commit has
> > been rolled back from -tip.
>
> OK, I just did a git commit --amend to fix it. Here's the new text:
>
>
> commit 7e066fb870fcd1025ec3ba7bbde5d541094f4ce1 added the aligned(32) type a
> variable attribute to the tracepoint structures to deal with gcc happily
> aligning statically defined structures on 32-byte multiples.
>
> One attempt was to use a 8-byte alignment for tracepoint structures by apply
> both the variable and type attribute to tracepoint structures definitions an
> declarations. It worked fine with gcc 4.5.1, but broke with gcc 4.4.4 and 4.
>
> The reason is that the "aligned" attribute only specify the _minimum_ alignm
> for a structure, leaving both the compiler and the linker free to align on
> larger multiples. Because tracepoint.c expects the structures to be placed a
> array within each section, up-alignment cause NULL-pointer exceptions due to
> extra unexpected padding.
>
> This version has just been pushed. I just changed the wording to leave
> out the reference to the reverted commit.
Looks good!
Thanks,
Mathieu
>
> -- Steve
>
>
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2011-02-02 19:32 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-02 18:06 [PATCH 0/2] [GIT PULL][v2.6.38]: tracing: alignment fixes (take 2) Steven Rostedt
2011-02-02 18:06 ` [PATCH 1/2] tracing: Replace trace_event struct array with pointer array Steven Rostedt
2011-02-02 18:42 ` Mathieu Desnoyers
2011-02-02 18:53 ` Steven Rostedt
2011-02-02 22:50 ` David Miller
2011-02-03 0:46 ` Steven Rostedt
2011-02-03 0:49 ` David Miller
2011-02-02 18:06 ` [PATCH 2/2] Tracepoints: Fix section alignment using " Steven Rostedt
2011-02-02 18:31 ` Mathieu Desnoyers
2011-02-02 18:47 ` Steven Rostedt
2011-02-02 18:56 ` Steven Rostedt
2011-02-02 19:32 ` Mathieu Desnoyers [this message]
2011-02-02 22:20 ` Thomas Gleixner
2011-02-03 0:43 ` Steven Rostedt
2011-02-02 22:51 ` David Miller
2011-02-03 0:44 ` [PATCH 0/2] [GIT PULL][v2.6.38]: tracing: alignment fixes (take 2) Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110202193209.GA29590@Krystal \
--to=mathieu.desnoyers@efficios.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.