* [PATCH] perf script/intel-pt: set synth_opts.callchain for use_browser > 0
@ 2019-06-10 23:42 Song Liu
2019-06-11 6:45 ` Adrian Hunter
0 siblings, 1 reply; 4+ messages in thread
From: Song Liu @ 2019-06-10 23:42 UTC (permalink / raw)
To: linux-kernel
Cc: kernel-team, davidca, Song Liu, Milian Wolff, Jiri Olsa,
Arnaldo Carvalho de Melo, Adrian Hunter
Currently, intel_pt_process_auxtrace_info() sets synth_opts.callchain for
use_browser != -1, which is not accurate after we set use_browser to 0 in
cmd_script(). As a result, the following commands sees a lot more errors
like:
perf record -e intel_pt//u -C 10 -- sleep 3
perf script
...
instruction trace error type 1 time ...
...
This patch fixes this by checking use_browser > 0 instead.
Fixes: c1c9b9695cc8 ("perf script: Allow extended console debug output")
Reported-by: David Carrillo Cisneros <davidca@fb.com>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
---
tools/perf/util/intel-pt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index 6d288237887b..15692c104ca8 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -2588,7 +2588,7 @@ 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 (use_browser > 0) {
pt->synth_opts.branches = false;
pt->synth_opts.callchain = true;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf script/intel-pt: set synth_opts.callchain for use_browser > 0
2019-06-10 23:42 [PATCH] perf script/intel-pt: set synth_opts.callchain for use_browser > 0 Song Liu
@ 2019-06-11 6:45 ` Adrian Hunter
2019-06-11 7:18 ` Song Liu
0 siblings, 1 reply; 4+ messages in thread
From: Adrian Hunter @ 2019-06-11 6:45 UTC (permalink / raw)
To: Song Liu, linux-kernel
Cc: kernel-team, davidca, Milian Wolff, Jiri Olsa,
Arnaldo Carvalho de Melo
On 11/06/19 2:42 AM, Song Liu wrote:
> Currently, intel_pt_process_auxtrace_info() sets synth_opts.callchain for
> use_browser != -1, which is not accurate after we set use_browser to 0 in
> cmd_script(). As a result, the following commands sees a lot more errors
> like:
>
> perf record -e intel_pt//u -C 10 -- sleep 3
> perf script
>
> ...
> instruction trace error type 1 time ...
> ...
>
> This patch fixes this by checking use_browser > 0 instead.
>
> Fixes: c1c9b9695cc8 ("perf script: Allow extended console debug output")
> Reported-by: David Carrillo Cisneros <davidca@fb.com>
> Cc: Milian Wolff <milian.wolff@kdab.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Signed-off-by: Song Liu <songliubraving@fb.com>
> ---
> tools/perf/util/intel-pt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
> index 6d288237887b..15692c104ca8 100644
> --- a/tools/perf/util/intel-pt.c
> +++ b/tools/perf/util/intel-pt.c
> @@ -2588,7 +2588,7 @@ 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 (use_browser > 0) {
That code has changed recently. Refer:
https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=perf/core&id=26f19c2eb7e54
> pt->synth_opts.branches = false;
> pt->synth_opts.callchain = true;
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf script/intel-pt: set synth_opts.callchain for use_browser > 0
2019-06-11 6:45 ` Adrian Hunter
@ 2019-06-11 7:18 ` Song Liu
2019-06-11 15:47 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 4+ messages in thread
From: Song Liu @ 2019-06-11 7:18 UTC (permalink / raw)
To: Adrian Hunter
Cc: linux-kernel@vger.kernel.org, Kernel Team,
David Carrillo Cisneros, Milian Wolff, Jiri Olsa,
Arnaldo Carvalho de Melo
> On Jun 10, 2019, at 11:45 PM, Adrian Hunter <adrian.hunter@intel.com> wrote:
>
> On 11/06/19 2:42 AM, Song Liu wrote:
>> Currently, intel_pt_process_auxtrace_info() sets synth_opts.callchain for
>> use_browser != -1, which is not accurate after we set use_browser to 0 in
>> cmd_script(). As a result, the following commands sees a lot more errors
>> like:
>>
>> perf record -e intel_pt//u -C 10 -- sleep 3
>> perf script
>>
>> ...
>> instruction trace error type 1 time ...
>> ...
>>
>> This patch fixes this by checking use_browser > 0 instead.
>>
>> Fixes: c1c9b9695cc8 ("perf script: Allow extended console debug output")
>> Reported-by: David Carrillo Cisneros <davidca@fb.com>
>> Cc: Milian Wolff <milian.wolff@kdab.com>
>> Cc: Jiri Olsa <jolsa@kernel.org>
>> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
>> Cc: Adrian Hunter <adrian.hunter@intel.com>
>> Signed-off-by: Song Liu <songliubraving@fb.com>
>> ---
>> tools/perf/util/intel-pt.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
>> index 6d288237887b..15692c104ca8 100644
>> --- a/tools/perf/util/intel-pt.c
>> +++ b/tools/perf/util/intel-pt.c
>> @@ -2588,7 +2588,7 @@ 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 (use_browser > 0) {
>
> That code has changed recently. Refer:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=perf/core&id=26f19c2eb7e54
Thanks for a better fix! I was using Arnaldo's perf/urgent branch, and missed
this one.
Song
>
>
>> pt->synth_opts.branches = false;
>> pt->synth_opts.callchain = true;
>> }
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf script/intel-pt: set synth_opts.callchain for use_browser > 0
2019-06-11 7:18 ` Song Liu
@ 2019-06-11 15:47 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2019-06-11 15:47 UTC (permalink / raw)
To: Song Liu
Cc: Adrian Hunter, linux-kernel@vger.kernel.org, Kernel Team,
David Carrillo Cisneros, Milian Wolff, Jiri Olsa
Em Tue, Jun 11, 2019 at 07:18:09AM +0000, Song Liu escreveu:
>
>
> > On Jun 10, 2019, at 11:45 PM, Adrian Hunter <adrian.hunter@intel.com> wrote:
> > On 11/06/19 2:42 AM, Song Liu wrote:
> >> +++ b/tools/perf/util/intel-pt.c
> >> @@ -2588,7 +2588,7 @@ 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 (use_browser > 0) {
> > That code has changed recently. Refer:
> > https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=perf/core&id=26f19c2eb7e54
> Thanks for a better fix! I was using Arnaldo's perf/urgent branch, and missed
> this one.
Your report shows this one should move to perf/urgent, will try to do
that after processing a large perf/core batch...
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-11 15:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-10 23:42 [PATCH] perf script/intel-pt: set synth_opts.callchain for use_browser > 0 Song Liu
2019-06-11 6:45 ` Adrian Hunter
2019-06-11 7:18 ` Song Liu
2019-06-11 15:47 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox