On Thu, Jan 10, 2013 at 02:10:57PM -0600, Jacob Shin wrote: > From: Suravee Suthikulpanit <suravee.suthikulpa...@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.suthikulpa...@amd.com> > Signed-off-by: Jacob Shin <jacob.s...@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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/