I want to use perf in ubuntu2204, and I have tried most of method, how can I do to use perf the kernel I find in uname-a is 6.6.17-060617-generic
The part is other people meet like
WARNING: perf not found for kernel 6.6.17-060617
You may need to install the following packages for this specific kernel:
linux-tools-6.6.17-060617-generic
linux-cloud-tools-6.6.17-060617-generic
also I try to install it by apt install and I got
Couldn't find any package by glob 'linux-tools-6.6.17-060617-generic'
sudo apt-get install linux-tools-common linux-tools-generic linux-tools-`uname -r`
Couldn't find any package by glob 'linux-tools-6.6.17-060617-generic'
git clone https://github.com/torvalds/linux --depth=1
fatal: destination path 'linux' is already exist and not empty
cd
into perf dir and use make
instruction
BUILD: Doing 'make -j4' parallel build
Warning: Kernel ABI header differences:
diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h
diff -u tools/arch/arm64/include/asm/cputype.h arch/arm64/include/asm/cputype.h
Makefile.config:612: No sys/sdt.h found, no SDT events are defined, please install
systemtap-sdt-devel or systemtap-sdt-dev
Makefile.config:698: Warning: Disabled BPF skeletons as clang (clang) is missing
Makefile.config:857: Missing perl devel files. Disabling perl scripting support, please
install perl-ExtUtils-Embed/libperl-dev
Makefile.config:1010: No libzstd found, disables trace compression, please install libzstd-
dev[el] and/or set LIBZSTD_DIR
Makefile.config:1021: No libcap found, disables capability support, please install libcap-
devel/libcap-dev
Makefile.config:1034: No numa.h found, disables 'perf bench numa mem' benchmark, please
install numactl-devel/libnuma-devel/libnuma-dev
Makefile.config:1093: No libbabeltrace found, disables 'perf data' CTF format support, please
install libbabeltrace-dev[el]/libbabeltrace-ctf-dev
Makefile.config:1127: No alternatives command found, you need to set JDIR= to point to the
root of your Java directory
Makefile.config:1158: libpfm4 not found, disables libpfm4 support. Please install libpfm4-dev
Makefile.config:1176: *** ERROR: libtraceevent is missing. Please install libtraceevent-
dev/libtraceevent-devel or build with NO_LIBTRACEEVENT=1。
how can I do to slove it?