From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Aditya Gupta <adityag@linux.ibm.com>
Cc: jolsa@kernel.org, irogers@google.com, namhyung@kernel.org,
linux-perf-users@vger.kernel.org, maddy@linux.ibm.com,
atrajeev@linux.vnet.ibm.com, kjain@linux.ibm.com,
disgoel@linux.vnet.ibm.com
Subject: Re: [PATCH v6 1/4] perf check: introduce check subcommand
Date: Fri, 10 Nov 2023 11:27:42 -0300 [thread overview]
Message-ID: <ZU493oMRpGgNBrQV@kernel.org> (raw)
In-Reply-To: <20231021150526.2231803-2-adityag@linux.ibm.com>
Em Sat, Oct 21, 2023 at 08:35:23PM +0530, Aditya Gupta escreveu:
> Currently the presence of a feature is checked with a combination of
> perf version --build-options and greps, such as:
>
> perf version --build-options | grep " on .* HAVE_FEATURE"
>
> Instead of this, introduce a subcommand "perf check --feature", with which
> scripts can test for presence of a feature, such as:
>
> perf check --feature HAVE_FEATURE
>
> 'perf check --feature' command is expected to have exit status of 0 if
> feature is built-in, and 1 if it's not built-in or if feature is not known.
>
> An array 'supported_features' has also been introduced that can be used by
> other commands like 'perf version --build-options', so that new features
> can be added in one place, with the array
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Aditya Gupta <adityag@linux.ibm.com>
Right after applying this first patch:
[acme@quaco perf-tools-next]$ m
make: Entering directory '/home/acme/git/perf-tools-next/tools/perf'
BUILD: Doing 'make -j8' parallel build
Warning: Kernel ABI header differences:
diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h
diff -u tools/include/uapi/linux/mount.h include/uapi/linux/mount.h
diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h
diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h
diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
diff -u tools/arch/x86/include/uapi/asm/prctl.h arch/x86/include/uapi/asm/prctl.h
diff -u tools/arch/arm64/include/uapi/asm/perf_regs.h arch/arm64/include/uapi/asm/perf_regs.h
diff -u tools/arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h
Makefile.config:1145: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel
INSTALL libsubcmd_headers
INSTALL libperf_headers
INSTALL libsymbol_headers
INSTALL libapi_headers
INSTALL libbpf_headers
CC /tmp/build/perf-tools-next/builtin-check.o
CC /tmp/build/perf-tools-next/builtin-buildid-list.o
CC /tmp/build/perf-tools-next/builtin-buildid-cache.o
CC /tmp/build/perf-tools-next/builtin-kallsyms.o
CC /tmp/build/perf-tools-next/builtin-list.o
CC /tmp/build/perf-tools-next/builtin-record.o
CC /tmp/build/perf-tools-next/builtin-report.o
CC /tmp/build/perf-tools-next/builtin-stat.o
builtin-check.c:53:56: error: expected ‘}’ before ‘;’ token
53 | FEATURE_SUPPORT("bpf_skeletons", HAVE_BPF_SKEL);
| ^
builtin-check.c:29:47: note: to match this ‘{’
29 | struct feature_support supported_features[] = {
| ^
make[3]: *** [/home/acme/git/perf-tools-next/tools/build/Makefile.build:106: /tmp/build/perf-tools-next/builtin-check.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile.perf:669: /tmp/build/perf-tools-next/perf-in.o] Error 2
make[1]: *** [Makefile.perf:242: sub-make] Error 2
make: *** [Makefile:113: install-bin] Error 2
make: Leaving directory '/home/acme/git/perf-tools-next/tools/perf'
Performance counter stats for 'make -k EXTRA_CFLAGS=-fsanitize=address BUILD_BPF_SKEL=1 CORESIGHT=1 O=/tmp/build/perf-tools-next -C tools/perf install-bin':
26,249,850,723 cycles:u
34,380,184,715 instructions:u # 1.31 insn per cycle
4.021721145 seconds time elapsed
7.780017000 seconds user
1.793663000 seconds sys
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.002 MB perf.data (9 samples) ]
Performance counter stats for 'sleep 0.01':
0.012377637 seconds time elapsed
0.000000000 seconds user
0.002203000 seconds sys
[acme@quaco perf-tools-next]$
next prev parent reply other threads:[~2023-11-10 14:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-21 15:05 [PATCH v6 0/4] Introduce perf check subcommand Aditya Gupta
2023-10-21 15:05 ` [PATCH v6 1/4] perf check: introduce " Aditya Gupta
2023-11-10 14:27 ` Arnaldo Carvalho de Melo [this message]
2023-11-10 14:31 ` Arnaldo Carvalho de Melo
2023-11-10 14:38 ` Arnaldo Carvalho de Melo
2023-11-10 22:46 ` Namhyung Kim
2023-11-16 7:12 ` Aditya Gupta
2023-11-16 7:06 ` Aditya Gupta
2023-11-16 6:52 ` Aditya Gupta
2023-10-21 15:05 ` [PATCH v6 2/4] perf version: update --build-options to use 'supported_features' array Aditya Gupta
2023-10-21 15:05 ` [PATCH v6 3/4] perf tests task_analyzer: use perf check for libtraceevent support Aditya Gupta
2023-10-21 15:05 ` [PATCH v6 4/4] tools/perf/tests: Update probe_vfs_getname.sh script to use perf check --feature Aditya Gupta
2023-11-07 3:42 ` [PATCH v6 0/4] Introduce perf check subcommand Aditya Gupta
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=ZU493oMRpGgNBrQV@kernel.org \
--to=acme@kernel.org \
--cc=adityag@linux.ibm.com \
--cc=atrajeev@linux.vnet.ibm.com \
--cc=disgoel@linux.vnet.ibm.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kjain@linux.ibm.com \
--cc=linux-perf-users@vger.kernel.org \
--cc=maddy@linux.ibm.com \
--cc=namhyung@kernel.org \
/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).