From: Peter Zijlstra <peterz@infradead.org>
To: mingo@redhat.com, hpa@zytor.com, paulus@samba.org,
acme@redhat.com, linux-kernel@vger.kernel.org, efault@gmx.de,
fweisbec@gmail.com, rostedt@goodmis.org, tglx@linutronix.de,
mingo@elte.hu
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:perf/core] perf, trace: Fix IRQ-disable removal from perf/tracepoint interaction
Date: Tue, 25 May 2010 11:02:55 +0200 [thread overview]
Message-ID: <1274778175.5882.623.camel@twins> (raw)
In-Reply-To: <tip-23ef672d1e8236e6fe606a39963ba2d576972d84@git.kernel.org>
On Tue, 2010-05-25 at 08:06 +0000, tip-bot for Peter Zijlstra wrote:
> Commit-ID: 23ef672d1e8236e6fe606a39963ba2d576972d84
> Gitweb: http://git.kernel.org/tip/23ef672d1e8236e6fe606a39963ba2d576972d84
> Author: Peter Zijlstra <peterz@infradead.org>
> AuthorDate: Sun, 23 May 2010 20:16:27 +0200
> Committer: Ingo Molnar <mingo@elte.hu>
> CommitDate: Tue, 25 May 2010 09:02:08 +0200
>
> perf, trace: Fix IRQ-disable removal from perf/tracepoint interaction
>
> On x86 perf_arch_fetch_caller_regs() stores pt_regs::flags, which is the
> same as used in local_save_flags().
>
> So to avoid another local_save_flags() for the ftrace code, I wanted to
> reuse it, and totally forgot the !x86 side of things.
>
> [ Possibly we could remove the local_save_flags() from the
> perf_arch_fetch_caller_regs() as I'm not sure we actually use
> pt_regs::flags (Frederic?) and leave the ftrace thing to use
> local_save_flags(). ]
>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Acked-by: Paul Mackerras <paulus@samba.org>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Mike Galbraith <efault@gmx.de>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> LKML-Reference: <20100524042958.GA10628@drongo>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Could you replace this with:
---
Subject: perf, trace: Fix !x86 build issue
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
Date: Tue May 25 09:22:38 CEST 2010
Patch b7e2ecef92 (perf, trace: Optimize tracepoints by removing
IRQ-disable from perf/tracepoint interaction) made the unfortunate
mistake of assuming the world is x86 only, correct this.
The problem was that perf_fetch_caller_regs() did local_save_flags()
into regs->flags, and I re-used that to remove another
local_save_flags(), forgetting !x86 doesn't have regs->flags.
Do the reverse, remove the local_save_flags() from
perf_fetch_caller_regs() and let the ftrace site do the
local_save_flags() instead.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Paul Mackerras <paulus@samba.org>
---
arch/x86/kernel/cpu/perf_event.c | 6 +++++-
kernel/trace/trace_event_perf.c | 4 +++-
2 files changed, 8 insertions(+), 2 deletions(-)
Index: linux-2.6/arch/x86/kernel/cpu/perf_event.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/cpu/perf_event.c
+++ linux-2.6/arch/x86/kernel/cpu/perf_event.c
@@ -1717,7 +1717,11 @@ void perf_arch_fetch_caller_regs(struct
*/
regs->bp = rewind_frame_pointer(skip + 1);
regs->cs = __KERNEL_CS;
- local_save_flags(regs->flags);
+ /*
+ * We abuse bit 3 to pass exact information, see perf_misc_flags
+ * and the comment with PERF_EFLAGS_EXACT.
+ */
+ regs->flags = 0;
}
unsigned long perf_instruction_pointer(struct pt_regs *regs)
Index: linux-2.6/kernel/trace/trace_event_perf.c
===================================================================
--- linux-2.6.orig/kernel/trace/trace_event_perf.c
+++ linux-2.6/kernel/trace/trace_event_perf.c
@@ -157,6 +157,7 @@ __kprobes void *perf_trace_buf_prepare(i
struct pt_regs *regs, int *rctxp)
{
struct trace_entry *entry;
+ unsigned long flags;
char *raw_data;
int pc;
@@ -174,7 +175,8 @@ __kprobes void *perf_trace_buf_prepare(i
memset(&raw_data[size - sizeof(u64)], 0, sizeof(u64));
entry = (struct trace_entry *)raw_data;
- tracing_generic_entry_update(entry, regs->flags, pc);
+ local_save_flags(flags);
+ tracing_generic_entry_update(entry, flags, pc);
entry->type = type;
return raw_data;
next prev parent reply other threads:[~2010-05-25 9:03 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 9:02 [PATCH 00/10] perf tracepoint and output optimizations Peter Zijlstra
2010-05-21 9:02 ` [PATCH 01/10] perf, trace: Remove IRQ-disable from perf/tracepoint interaction Peter Zijlstra
2010-05-21 17:43 ` Frank Ch. Eigler
2010-05-21 17:53 ` Steven Rostedt
2010-05-21 18:07 ` Frank Ch. Eigler
2010-05-23 12:11 ` Paul Mackerras
2010-05-23 18:16 ` Peter Zijlstra
2010-05-24 4:29 ` Paul Mackerras
2010-05-25 8:06 ` [tip:perf/core] perf, trace: Fix IRQ-disable removal " tip-bot for Peter Zijlstra
2010-05-25 9:02 ` Peter Zijlstra [this message]
2010-05-25 9:30 ` [tip:perf/core] perf, trace: Fix !x86 build bug tip-bot for Peter Zijlstra
2010-05-24 11:31 ` [PATCH 01/10] perf, trace: Remove IRQ-disable from perf/tracepoint interaction Frederic Weisbecker
2010-05-25 7:30 ` [PATCH 01a/10] perf, trace: Fix !x86 build issue Peter Zijlstra
2010-05-21 9:02 ` [PATCH 02/10] perf, trace: Use per-tracepoint-per-cpu hlist to track events Peter Zijlstra
2010-05-21 9:40 ` Frederic Weisbecker
2010-05-21 10:02 ` Peter Zijlstra
2010-05-21 10:13 ` Frederic Weisbecker
2010-05-21 10:15 ` Peter Zijlstra
2010-05-21 10:19 ` Frederic Weisbecker
2010-05-21 10:38 ` Ingo Molnar
2010-05-21 10:51 ` Ingo Molnar
2010-05-21 10:19 ` Peter Zijlstra
2010-05-21 10:21 ` Frederic Weisbecker
2010-05-21 10:34 ` Peter Zijlstra
2010-05-21 10:38 ` Frederic Weisbecker
2010-05-21 10:41 ` [PATCH 02b/10] perf, trace: Fix probe unregister race Peter Zijlstra
2010-05-21 10:43 ` Frederic Weisbecker
2010-05-31 7:19 ` [tip:perf/urgent] perf_events, " tip-bot for Peter Zijlstra
2010-05-21 11:28 ` [tip:perf/core] perf, trace: Optimize tracepoints by using per-tracepoint-per-cpu hlist to track events tip-bot for Peter Zijlstra
2010-05-21 14:04 ` [PATCH 02/10] perf, trace: Use " Steven Rostedt
2010-05-21 14:18 ` Peter Zijlstra
2010-05-21 14:25 ` Peter Zijlstra
2010-05-31 7:20 ` [tip:perf/urgent] perf_events, trace: Fix perf_trace_destroy(), mutex went missing tip-bot for Peter Zijlstra
2010-05-21 9:02 ` [PATCH 03/10] perf: Ensure IOC_OUTPUT isnt used to create multi-writer buffers Peter Zijlstra
2010-05-21 11:28 ` [tip:perf/core] perf: Ensure that IOC_OUTPUT isn't " tip-bot for Peter Zijlstra
2010-05-21 9:02 ` [PATCH 04/10] perf-record: Remove -M Peter Zijlstra
2010-05-21 11:28 ` [tip:perf/core] " tip-bot for Peter Zijlstra
2010-05-21 9:02 ` [PATCH 05/10] perf-record: Share per-cpu buffers Peter Zijlstra
2010-05-21 9:44 ` Frederic Weisbecker
2010-05-21 10:03 ` Peter Zijlstra
2010-05-21 11:29 ` [tip:perf/core] " tip-bot for Peter Zijlstra
2010-05-21 9:02 ` [PATCH 06/10] perf: Fix wakeup storm for RO mmap()s Peter Zijlstra
2010-05-21 11:29 ` [tip:perf/core] " tip-bot for Peter Zijlstra
2010-05-21 9:02 ` [PATCH 07/10] perf: Optimize perf_output_copy Peter Zijlstra
2010-05-21 11:29 ` [tip:perf/core] perf: Optimize perf_output_copy() tip-bot for Peter Zijlstra
2010-05-21 9:02 ` [PATCH 08/10] perf: Optimize the !vmalloc backed buffer Peter Zijlstra
2010-05-21 11:29 ` [tip:perf/core] " tip-bot for Peter Zijlstra
2010-05-21 9:02 ` [PATCH 09/10] perf: Remove more fastpath code Peter Zijlstra
2010-05-21 11:15 ` Steven Rostedt
2010-05-21 11:18 ` Peter Zijlstra
2010-05-21 11:30 ` [tip:perf/core] perf: Remove more code from the fastpath tip-bot for Peter Zijlstra
2010-05-21 9:02 ` [PATCH 10/10] perf: Optimize perf_tp_event_match Peter Zijlstra
2010-05-21 11:30 ` [tip:perf/core] perf: Optimize perf_tp_event_match() tip-bot for Peter Zijlstra
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=1274778175.5882.623.camel@twins \
--to=peterz@infradead.org \
--cc=acme@redhat.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=rostedt@goodmis.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox