[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190520144516.GL8945@kernel.org>
Date: Mon, 20 May 2019 11:45:16 -0300
From: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: Jiri Olsa <jolsa@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 01/22] perf intel-pt: Fix itrace defaults for perf script
Em Mon, May 20, 2019 at 02:37:07PM +0300, Adrian Hunter escreveu:
> Commit 4eb068157121 ("perf script: Make itrace script default to all
> calls") does not work because 'use_browser' is being used to determine
> whether to default to periodic sampling (i.e. better for perf report).
> The result is that nothing but CBR events display for perf script
> when no --itrace option is specified.
>
> Fix by using 'default_no_sample' and 'inject' instead.
Applied 1-3 for now, concentrating on fixes, will process 4-22 later.
- Arnaldo
> Example:
>
> Before:
>
> $ perf record -e intel_pt/cyc/u ls
> $ perf script > cmp1.txt
> $ perf script --itrace=cepwx > cmp2.txt
> $ diff -sq cmp1.txt cmp2.txt
> Files cmp1.txt and cmp2.txt differ
>
> After:
>
> $ perf script > cmp1.txt
> $ perf script --itrace=cepwx > cmp2.txt
> $ diff -sq cmp1.txt cmp2.txt
> Files cmp1.txt and cmp2.txt are identical
>
> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
> Fixes: 90e457f7be08 ("perf tools: Add Intel PT support")
> Cc: stable@...r.kernel.org # v4.20+
> ---
> tools/perf/util/intel-pt.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
> index 551ae10d1c7b..7a70693c1b91 100644
> --- a/tools/perf/util/intel-pt.c
> +++ b/tools/perf/util/intel-pt.c
> @@ -2626,7 +2626,8 @@ int intel_pt_process_auxtrace_info(union perf_event *event,
> } else {
> itrace_synth_opts__set_default(&pt->synth_opts,
> session->itrace_synth_opts->default_no_sample);
> - if (use_browser != -1) {
> + if (!session->itrace_synth_opts->default_no_sample &&
> + !session->itrace_synth_opts->inject) {
> pt->synth_opts.branches = false;
> pt->synth_opts.callchain = true;
> }
> --
> 2.17.1
--
- Arnaldo
Powered by blists - more mailing lists