Prev: [PATCH 7/7] perf: Report lost events in perf trace debug mode
Next: [PATCH 6/7] perf: Don't print traces when debugging ordering
From: Frederic Weisbecker on 24 Jun 2010 17:50 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(a)gmail.com> Cc: Will Deacon <will.deacon(a)arm.com> Cc: Prasad <prasad(a)linux.vnet.ibm.com> Cc: Mahesh Salgaonkar <mahesh(a)linux.vnet.ibm.com> Cc: Ingo Molnar <mingo(a)elte.hu> Cc: Peter Zijlstra <a.p.zijlstra(a)chello.nl> Cc: Arnaldo Carvalho de Melo <acme(a)redhat.com> Cc: Paul Mackerras <paulus(a)samba.org> Cc: Jason Wessel <jason.wessel(a)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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |