[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y3Tah5Ocvx6lQ4jP@kernel.org>
Date: Wed, 16 Nov 2022 09:41:43 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Weilin Wang <weilin.wang@...el.com>,
Perry Taylor <perry.taylor@...el.com>,
Caleb Biggers <caleb.biggers@...el.com>,
Leo Yan <leo.yan@...aro.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Sandipan Das <sandipan.das@....com>,
Kajol Jain <kjain@...ux.ibm.com>,
Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
Kan Liang <kan.liang@...ux.intel.com>,
Ravi Bangoria <ravi.bangoria@....com>,
Xin Gao <gaoxin@...rlc.com>, Rob Herring <robh@...nel.org>,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v3 10/10] perf list: Add json output option
Em Wed, Nov 16, 2022 at 08:51:29AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Wed, Nov 16, 2022 at 08:35:28AM -0300, Arnaldo Carvalho de Melo escreveu:
> > > Please always run 'perf test' before and after your patches and before
> > > sending it upstream.
>
> > Running as !root on a different machine I get some other interesting
> > info:
>
> > ⬢[acme@...lbox perf]$ perf list syscalls:sys_enter_open*
> > double free or corruption (fasttop)
> > Aborted (core dumped)
> > ⬢[acme@...lbox perf]$
> >
> > That is:
> >
> > free(ps.pmu_glob);
> >
> >
> > at the end of cmd_list().
>
> This plus the change to default_ps in the subsequent patch cures the
> double free, now working on the segfault.
The segfault is "cured" with:
diff --git a/tools/perf/builtin-list.c b/tools/perf/builtin-list.c
index 3183c0351cda6cee..5eb9ed4a5cd0ad71 100644
--- a/tools/perf/builtin-list.c
+++ b/tools/perf/builtin-list.c
@@ -104,7 +104,7 @@ static void default_print_event(void *ps, const char *pmu_name, const char *topi
if (deprecated && !print_state->deprecated)
return;
- if (print_state->pmu_glob && !strglobmatch(pmu_name, print_state->pmu_glob))
+ if (print_state->pmu_glob && pmu_name && !strglobmatch(pmu_name, print_state->pmu_glob))
return;
if (print_state->event_glob &&
----------------------------
But then:
[root@...e ~]# perf list syscalls:sys_enter_open* |& grep syscalls:
syscalls:sys_enter_open [Tracepoint event]
syscalls:sys_enter_open_by_handle_at [Tracepoint event]
syscalls:sys_enter_open_tree [Tracepoint event]
syscalls:sys_enter_openat [Tracepoint event]
syscalls:sys_enter_openat2 [Tracepoint event]
[root@...e ~]#
This stops working, looking into it.
- Arnaldo
Powered by blists - more mailing lists