lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 11 Jan 2013 14:56:08 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Jacob Shin <jacob.shin@....com>
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Stephane Eranian <eranian@...gle.com>,
	linux-kernel@...r.kernel.org,
	Suravee Suthikulpanit <suravee.suthikulpanit@....com>
Subject: Re: [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@....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@....com>
> Signed-off-by: Jacob Shin <jacob.shin@....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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ