[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121128154038.GE1038@krava.brq.redhat.com>
Date: Wed, 28 Nov 2012 16:40:38 +0100
From: Jiri Olsa <jolsa@...hat.com>
To: Andi Kleen <andi@...stfloor.org>
Cc: linux-kernel@...r.kernel.org, acme@...hat.com,
peterz@...radead.org, eranian@...gle.com, mingo@...nel.org,
namhyung@...nel.org, Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 25/32] tools, perf: Add a precise event qualifier
On Fri, Nov 09, 2012 at 05:27:41PM -0800, Andi Kleen wrote:
> From: Andi Kleen <ak@...ux.intel.com>
>
> Add a precise qualifier, like cpu/event=0x3c,precise=1/
>
> This is needed so that the kernel can request enabling PEBS
> for TSX events. The parser bails out on any sysfs parse errors,
> so this is needed in any case to handle any event on the TSX
> perf kernel.
>
> Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> ---
> tools/perf/util/parse-events.c | 6 ++++++
> tools/perf/util/parse-events.h | 1 +
> tools/perf/util/parse-events.l | 1 +
> 3 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
> index c0b785b..5b97a2b 100644
> --- a/tools/perf/util/parse-events.c
> +++ b/tools/perf/util/parse-events.c
> @@ -526,6 +526,12 @@ do { \
> case PARSE_EVENTS__TERM_TYPE_NAME:
> CHECK_TYPE_VAL(STR);
> break;
> + case PARSE_EVENTS__TERM_TYPE_PRECISE:
> + CHECK_TYPE_VAL(NUM);
> + if ((unsigned)term->val.num > 2)
> + return -EINVAL;
Should we test for >3?
* precise_ip:
*
* 0 - SAMPLE_IP can have arbitrary skid
* 1 - SAMPLE_IP must have constant skid
* 2 - SAMPLE_IP requested to have 0 skid
* 3 - SAMPLE_IP must have 0 skid
Maybe it's not implemented in hw yet, but in general it's allowed.
thanks,
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