From: Jiri Olsa <jolsa@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andi Kleen <andi@firstfloor.org>, Oleg Nesterov <oleg@redhat.com>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Vince Weaver <vincent.weaver@maine.edu>
Subject: [RFC 0/5] perf, signal x86: Fix breakpoint events overflow handling
Date: Fri, 1 Mar 2013 19:11:47 +0100 [thread overview]
Message-ID: <1362161512-16803-1-git-send-email-jolsa@redhat.com> (raw)
hi,
while porting Vince's overflow tests I found perf event
breakpoint overflow does not work properly.
I found the x86 RF EFLAG bit not being set when returning
from debug exception after triggering signal handler. Which
is exactly what you get when you set perf breakpoint overflow
SIGIO handler.
Patches 1 and 2 are trying to fix that and make attached
tests pass. But it's very likely I'm breaking something
else by these changes, so please consider those as RFC
patches.. pure suggestions to make my point ;-)
Patch 3 fixes the period handling for breakpoint events.
Patches 4 and 5 provide automated perf tests for testing
all 3 kernel changes.
Also available at:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/linux.git
perf/RF1
thanks for comments,
jirka
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>
---
Jiri Olsa (5):
signal x86: Propage RF EFLAGS bit throught the signal restore call
signal x86: Clear RF EFLAGS bit for signal handler
perf: Fix hw breakpoints overflow period sampling
perf tests: Test breakpoint overflow signal handler
perf tests: Test breakpoint overflow signal handler counts
arch/x86/ia32/ia32_signal.c | 2 -
arch/x86/include/asm/sighandling.h | 4 +-
arch/x86/kernel/signal.c | 13 ++++---
include/linux/perf_event.h | 2 +
kernel/events/core.c | 2 +-
kernel/events/hw_breakpoint.c | 5 +++
tools/perf/Makefile | 2 +
tools/perf/tests/bp_signal.c | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tools/perf/tests/bp_signal_overflow.c | 126 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tools/perf/tests/builtin-test.c | 8 ++++
tools/perf/tests/tests.h | 2 +
11 files changed, 342 insertions(+), 11 deletions(-)
create mode 100644 tools/perf/tests/bp_signal.c
create mode 100644 tools/perf/tests/bp_signal_overflow.c
next reply other threads:[~2013-03-01 18:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-01 18:11 Jiri Olsa [this message]
2013-03-01 18:11 ` [PATCH 1/5] signal x86: Propage RF EFLAGS bit throught the signal restore call Jiri Olsa
2013-03-01 18:11 ` [PATCH 2/5] signal x86: Clear RF EFLAGS bit for signal handler Jiri Olsa
2013-03-01 18:57 ` H. Peter Anvin
2013-03-03 10:43 ` Jiri Olsa
2013-03-10 17:15 ` Jiri Olsa
2013-03-10 18:31 ` Jiri Olsa
2013-03-01 18:11 ` [PATCH 3/5] perf: Fix hw breakpoints overflow period sampling Jiri Olsa
2013-03-01 18:11 ` [PATCH 4/5] perf tests: Test breakpoint overflow signal handler Jiri Olsa
2013-03-01 18:11 ` [PATCH 5/5] perf tests: Test breakpoint overflow signal handler counts Jiri Olsa
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=1362161512-16803-1-git-send-email-jolsa@redhat.com \
--to=jolsa@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=andi@firstfloor.org \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
--cc=vincent.weaver@maine.edu \
/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
all inboxes | Powered by JetHome®