lkml.org 
[lkml]   [2013]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND 3/5] perf tools: Add breakpoint address mask to the mem event parser
On Thu, Jan 10, 2013 at 02:10:57PM -0600, Jacob Shin wrote:
> From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
>
> Allow perf tool to pass in breakpoint address mask to match an address
> range, i.e.:
>
> $ perf stat -e mem:0x1000:w:0xf a.out
>
> Will count writes to [0x1000 ~ 0x1010)
>
> Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> Signed-off-by: Jacob Shin <jacob.shin@amd.com>
> ---
> tools/perf/util/parse-events.c | 3 ++-
> tools/perf/util/parse-events.h | 2 +-
> tools/perf/util/parse-events.y | 14 ++++++++++++--
> 3 files changed, 15 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
> index 2d8d53be..2679e48 100644
> --- a/tools/perf/util/parse-events.c
> +++ b/tools/perf/util/parse-events.c
> @@ -466,12 +466,13 @@ do { \
> }
>
> int parse_events_add_breakpoint(struct list_head **list, int *idx,
> - void *ptr, char *type)
> + void *ptr, char *type, void *msk)
> {
> struct perf_event_attr attr;
>
> memset(&attr, 0, sizeof(attr));
> attr.bp_addr = (unsigned long) ptr;
> + attr.bp_addr_mask = (unsigned long) msk;

looks like the 'msk' argument could be unsigned long directly

jirka


\
 
 \ /
  Last update: 2013-01-11 15:43    [W:0.080 / U:1.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site