From 0565650add6ae61cadf2b43b9551f36e84781b56 Mon Sep 17 00:00:00 2001 From: Frederic Weisbecker Date: Thu, 24 Jun 2010 21:36:19 +0200 Subject: [PATCH] --- yaml --- r: 205275 b: refs/heads/master c: aa59a48596d8358a908bfb458300b5625cd47785 h: refs/heads/master i: 205273: 50298e70853e74f316dc08707e2c5e34eb2b4cec 205271: 9f5b4b524ac3d292346f34dbcde47ea3b56fd2b9 v: v3 --- [refs] | 2 +- trunk/tools/perf/util/parse-events.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 502f2155e640..30f893a3f435 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f7809daf64bf119fef70af172db6a0636fa51f92 +refs/heads/master: aa59a48596d8358a908bfb458300b5625cd47785 diff --git a/trunk/tools/perf/util/parse-events.c b/trunk/tools/perf/util/parse-events.c index 9bf0f402ca73..4af5bd59cfd1 100644 --- a/trunk/tools/perf/util/parse-events.c +++ b/trunk/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;