From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Weilin Wang <weilin.wang@intel.com>,
Perry Taylor <perry.taylor@intel.com>,
Caleb Biggers <caleb.biggers@intel.com>,
Leo Yan <leo.yan@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Sandipan Das <sandipan.das@amd.com>,
Kajol Jain <kjain@linux.ibm.com>,
Zhengjun Xing <zhengjun.xing@linux.intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
Ravi Bangoria <ravi.bangoria@amd.com>,
Xin Gao <gaoxin@cdjrlc.com>, Rob Herring <robh@kernel.org>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH v3 10/10] perf list: Add json output option
Date: Wed, 16 Nov 2022 08:23:07 -0300 [thread overview]
Message-ID: <Y3TIG7BIzltgvCPw@kernel.org> (raw)
In-Reply-To: <Y3OX1pcclKCgbpeT@kernel.org>
Em Tue, Nov 15, 2022 at 10:44:54AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Nov 14, 2022 at 01:07:23PM -0800, Ian Rogers escreveu:
> > Output events and metrics in a json format by overriding the print
> > callbacks. Currently other command line options aren't supported and
> > metrics are repeated once per metric group.
>
> Applied the patch with a few fixes and added this to the last cset:
There is a problem, detected using 'perf test', the last one:
[root@quaco ~]# perf test "trace + vfs_getname"
112: Check open filename arg using perf trace + vfs_getname : FAILED!
[root@quaco ~]# perf test -v "trace + vfs_getname"
112: Check open filename arg using perf trace + vfs_getname :
--- start ---
test child forked, pid 611667
test child finished with -1
---- end ----
Check open filename arg using perf trace + vfs_getname: FAILED!
[root@quaco ~]#
Verbose didn't help, so I looked at the shell script for that test and
the problem is here:
[root@quaco ~]# perf list syscalls:sys_enter_open*
Segmentation fault (core dumped)
^C
[root@quaco ~]#
[root@quaco ~]#
[root@quaco ~]# gdb perf
GNU gdb (GDB) Fedora 12.1-2.fc36
(gdb) run list syscalls:sys_enter_open*
Starting program: /root/bin/perf list syscalls:sys_enter_open*
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Detaching after fork from child process 611757]
Program received signal SIGSEGV, Segmentation fault.
0x00000000004e742b in __match_glob (str=0x0, pat=0xe44900 "syscalls", ignore_space=ignore_space@entry=false, case_ins=case_ins@entry=false) at util/string.c:113
113 while (*str && *pat && *pat != '*') {
Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.8-11.fc36.x86_64 cyrus-sasl-lib-2.1.27-18.fc36.x86_64 elfutils-debuginfod-client-0.187-4.fc36.x86_64 elfutils-libelf-0.187-4.fc36.x86_64 elfutils-libs-0.187-4.fc36.x86_64 glib2-2.72.3-1.fc36.x86_64 glibc-2.35-20.fc36.x86_64 keyutils-libs-1.6.1-4.fc36.x86_64 krb5-libs-1.19.2-11.fc36.x86_64 libbabeltrace-1.5.8-9.fc36.x86_64 libbrotli-1.0.9-7.fc36.x86_64 libcap-2.48-4.fc36.x86_64 libcom_err-1.46.5-2.fc36.x86_64 libcurl-7.82.0-8.fc36.x86_64 libevent-2.1.12-6.fc36.x86_64 libgcc-12.2.1-2.fc36.x86_64 libidn2-2.3.4-1.fc36.x86_64 libnghttp2-1.46.0-2.fc36.x86_64 libpsl-0.21.1-5.fc36.x86_64 libselinux-3.3-4.fc36.x86_64 libssh-0.9.6-4.fc36.x86_64 libunistring-1.0-1.fc36.x86_64 libunwind-1.6.2-2.fc36.x86_64 libuuid-2.38-1.fc36.x86_64 libxcrypt-4.4.28-1.fc36.x86_64 libzstd-1.5.2-2.fc36.x86_64 numactl-libs-2.0.14-5.fc36.x86_64 openldap-2.6.3-1.fc36.x86_64 openssl-libs-3.0.5-1.fc36.x86_64 pcre-8.45-1.fc36.1.x86_64 perl-libs-5.34.1-486.fc36.x86_64 popt-1.18-7.fc36.x86_64 python3-libs-3.10.7-1.fc36.x86_64 slang-2.3.2-11.fc36.x86_64 xz-libs-5.2.5-9.fc36.x86_64 zlib-1.2.11-33.fc36.x86_64
(gdb) bt
#0 0x00000000004e742b in __match_glob (str=0x0, pat=0xe44900 "syscalls", ignore_space=ignore_space@entry=false, case_ins=case_ins@entry=false) at util/string.c:113
#1 0x00000000004e7830 in strglobmatch (str=<optimized out>, pat=<optimized out>) at util/string.c:172
#2 0x00000000004241ea in default_print_event (ps=0x7fffffffd370, pmu_name=<optimized out>, topic=0x0, event_name=0x7fffffffc2d0 "alarmtimer:alarmtimer_cancel", event_alias=0x0, scale_unit=<optimized out>, deprecated=<optimized out>, event_type_desc=<optimized out>,
desc=<optimized out>, long_desc=<optimized out>, encoding_desc=<optimized out>, metric_name=<optimized out>, metric_expr=<optimized out>) at builtin-list.c:107
#3 0x00000000004e3224 in print_tracepoint_events (print_cb=print_cb@entry=0x7fffffffd350, print_state=0x7fffffffd370) at util/print-events.c:94
#4 0x0000000000425342 in cmd_list (argc=<optimized out>, argv=<optimized out>) at builtin-list.c:521
#5 0x00000000004b4579 in run_builtin (p=p@entry=0xdb0490 <commands+240>, argc=argc@entry=2, argv=argv@entry=0x7fffffffdbb0) at perf.c:322
#6 0x000000000040f506 in handle_internal_command (argv=<optimized out>, argc=<optimized out>) at perf.c:376
#7 run_argv (argv=<optimized out>, argcp=<optimized out>) at perf.c:420
#8 main (argc=2, argv=0x7fffffffdbb0) at perf.c:550
(gdb)
Trying to fix this now.
Please always run 'perf test' before and after your patches and before
sending it upstream.
- Arnaldo
next prev parent reply other threads:[~2022-11-16 11:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 21:07 [PATCH v3 00/10] Restructure perf list and add json output Ian Rogers
2022-11-14 21:07 ` [PATCH v3 01/10] perf pmu: Remove is_hybrid member Ian Rogers
2022-11-14 21:07 ` [PATCH v3 02/10] perf pmu: Add documentation Ian Rogers
2022-11-14 21:07 ` [PATCH v3 03/10] tools lib api fs tracing_path: Add scandir alphasort Ian Rogers
2022-11-14 21:07 ` [PATCH v3 04/10] perf tracepoint: Sort events in iterator Ian Rogers
2022-11-14 21:07 ` [PATCH v3 05/10] perf list: Generalize limiting to a PMU name Ian Rogers
2022-11-14 21:07 ` [PATCH v3 06/10] perf list: Simplify cache event printing Ian Rogers
2022-11-15 13:33 ` Arnaldo Carvalho de Melo
2022-11-14 21:07 ` [PATCH v3 07/10] perf list: Simplify symbol " Ian Rogers
2022-11-14 21:07 ` [PATCH v3 08/10] perf pmu: Restructure print_pmu_events Ian Rogers
2022-11-14 21:07 ` [PATCH v3 09/10] perf list: Reorganize to use callbacks Ian Rogers
2022-11-15 13:40 ` Arnaldo Carvalho de Melo
2022-11-15 16:53 ` Ian Rogers
2022-11-14 21:07 ` [PATCH v3 10/10] perf list: Add json output option Ian Rogers
2022-11-15 13:44 ` Arnaldo Carvalho de Melo
2022-11-16 11:23 ` Arnaldo Carvalho de Melo [this message]
2022-11-16 11:35 ` Arnaldo Carvalho de Melo
2022-11-16 11:51 ` Arnaldo Carvalho de Melo
2022-11-16 12:41 ` Arnaldo Carvalho de Melo
2022-11-16 13:10 ` Arnaldo Carvalho de Melo
2022-11-16 15:21 ` Arnaldo Carvalho de Melo
2022-11-16 19:52 ` Ian Rogers
2022-11-17 16:31 ` Arnaldo Carvalho de Melo
2022-11-17 16:47 ` Arnaldo Carvalho de Melo
2022-11-18 2:47 ` Ian Rogers
2022-11-16 23:04 ` Namhyung Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3TIG7BIzltgvCPw@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=caleb.biggers@intel.com \
--cc=eranian@google.com \
--cc=gaoxin@cdjrlc.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=kjain@linux.ibm.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=perry.taylor@intel.com \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
--cc=robh@kernel.org \
--cc=sandipan.das@amd.com \
--cc=weilin.wang@intel.com \
--cc=zhengjun.xing@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).