lkml.org 
[lkml]   [2013]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 5/9] perf tools: Set maximum precise value for event 'p' modifier
Date
On Thu,  9 May 2013 15:32:20 +0200, Jiri Olsa wrote:
> If single 'p' modifier is specified for event, set the
> system precise value for perf_events_attr::precise_ip.
>
> If more than a single 'p' is specified keep the intended
> value.

So there's no way to set precise=1 on a system suppports precise=2 using
this syntax, right? (I don't know whether it makes any sense though.)

>
> If precise is not supported by system, warning is disaplyed.

s/disaplyed/displayed/

>
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Andi Kleen <ak@linux.intel.com>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Stephane Eranian <eranian@google.com>
> ---
> tools/perf/util/parse-events.c | 40 ++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 38 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
> index 2e3ef10..6be4599 100644
> --- a/tools/perf/util/parse-events.c
> +++ b/tools/perf/util/parse-events.c
> @@ -533,6 +533,26 @@ int parse_events_add_breakpoint(struct list_head **list, int *idx,
> return add_event(list, idx, &attr, NULL);
> }
>
> +static int precise_default(void)
> +{
> + int precise = perf_precise__get();
> + static int warned;
> +
> + /*
> + * Precise info not supported by by this kernel,

s/by by/by/ :)


> + * set 1 as the precise value.
> + */
> + if (precise == -1)
> + precise = 1;
> +
> + /* PEBS is not supported here, display warning. */
> + if (precise == 0 && !warned++)
> + pr_warning("warning: no precise support, "
> + "using non-precise event(s)\n");

Please put the message on a single line.

Thanks,
Namhyung


\
 
 \ /
  Last update: 2013-05-10 04:21    [W:0.355 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site