From: Frederic Weisbecker <fweisbec@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Will Deacon <will.deacon@arm.com>,
Prasad <prasad@linux.vnet.ibm.com>,
Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Paul Mackerras <paulus@samba.org>,
Jason Wessel <jason.wessel@windriver.com>
Subject: [PATCH 5/7] perf: Don't use 4 bytes as a default instruction breakpoint length
Date: Thu, 24 Jun 2010 23:40:56 +0200 [thread overview]
Message-ID: <1277415658-10036-6-git-send-regression-fweisbec@gmail.com> (raw)
In-Reply-To: <1277415658-10036-1-git-send-regression-fweisbec@gmail.com>
4 bytes is fine as a default access for data breakpoints. But
instruction breakpoints should take the native pointer length,
otherwise we get a -EINVAL in x86-64.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jason Wessel <jason.wessel@windriver.com>
---
tools/perf/util/parse-events.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 9bf0f40..4af5bd5 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -602,8 +602,15 @@ parse_breakpoint_event(const char **strp, struct perf_event_attr *attr)
return EVT_FAILED;
}
- /* We should find a nice way to override the access type */
- attr->bp_len = HW_BREAKPOINT_LEN_4;
+ /*
+ * We should find a nice way to override the access length
+ * Provide some defaults for now
+ */
+ if (attr->bp_type == HW_BREAKPOINT_X)
+ attr->bp_len = sizeof(long);
+ else
+ attr->bp_len = HW_BREAKPOINT_LEN_4;
+
attr->type = PERF_TYPE_BREAKPOINT;
return EVT_HANDLED;
--
1.6.2.3
next prev parent reply other threads:[~2010-06-24 21:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-24 21:40 [GIT PULL] perf events and breakpoints updates Frederic Weisbecker
2010-06-24 21:40 ` [PATCH 1/7] hw_breakpoints: Fix per task breakpoint tracking Frederic Weisbecker
2010-06-24 21:40 ` [PATCH 2/7] perf: Fix argument of perf_arch_fetch_caller_regs Frederic Weisbecker
2010-06-24 21:40 ` [PATCH 3/7] x86: Set resume bit before returning from breakpoint exception Frederic Weisbecker
2010-06-24 21:40 ` [PATCH 4/7] x86: Support for instruction breakpoints Frederic Weisbecker
2010-06-24 21:40 ` Frederic Weisbecker [this message]
2010-06-24 21:40 ` [PATCH 6/7] perf: Don't print traces when debugging ordering Frederic Weisbecker
2010-06-24 21:40 ` [PATCH 7/7] perf: Report lost events in perf trace debug mode Frederic Weisbecker
2010-06-25 9:33 ` [GIT PULL] perf events and breakpoints updates 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=1277415658-10036-6-git-send-regression-fweisbec@gmail.com \
--to=fweisbec@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=prasad@linux.vnet.ibm.com \
--cc=will.deacon@arm.com \
/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