From: Frederic Weisbecker <fweisbec@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH][GIT PULL] tracing: Add __used annotation to event variable
Date: Tue, 25 May 2010 15:36:04 +0200 [thread overview]
Message-ID: <20100525133600.GB5286@nowhere> (raw)
In-Reply-To: <1274794290.22648.209.camel@gandalf.stny.rr.com>
On Tue, May 25, 2010 at 09:31:30AM -0400, Steven Rostedt wrote:
>
> Ingo,
>
> This fixes the warning/error on PowerPC.
>
> Please pull the latest tip/perf/core tree, which can be found at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
> tip/perf/core
>
>
> Steven Rostedt (1):
> tracing: Add __used annotation to event variable
>
> ----
> include/trace/ftrace.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> ---------------------------
> commit 49c177461bfbedeccbab22bf3905db2f9da7f1c3
> Author: Steven Rostedt <srostedt@redhat.com>
> Date: Tue May 25 06:19:35 2010 -0700
>
> tracing: Add __used annotation to event variable
>
> The TRACE_EVENT() macros automate creation of trace events. To automate
> initialization, the set up variables are loaded in a special section
> that is read on boot up. GCC is not aware that these static variables
> are used and will complain about them if we do not inform GCC that
> they are indeed used.
>
> One of the declarations of the event element was missing a __used
> annotation. This patch adds it.
>
> Reported-by: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
>
> diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
> index 0152b86..34bead7 100644
> --- a/include/trace/ftrace.h
> +++ b/include/trace/ftrace.h
> @@ -68,7 +68,7 @@
>
> #undef DEFINE_EVENT
> #define DEFINE_EVENT(template, name, proto, args) \
> - static struct ftrace_event_call \
> + static struct ftrace_event_call __used \
> __attribute__((__aligned__(4))) event_##name
Oh, I was writing the exact same patch...
In fact it appears only DEFINE_EVENT_PRINT() uses this declaration,
while before, we had various callbacks that always used it.
Anyway, thanks.
next prev parent reply other threads:[~2010-05-25 13:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-25 13:31 [PATCH][GIT PULL] tracing: Add __used annotation to event variable Steven Rostedt
2010-05-25 13:36 ` Frederic Weisbecker [this message]
2010-05-25 13:49 ` Ingo Molnar
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=20100525133600.GB5286@nowhere \
--to=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox