Peter Jung pushed to branch main at Arch Linux / Packaging / Packages / 
linux-tools


Commits:
070cb3e7 by Peter Jung at 2024-12-13T08:25:37+01:00
linux-tools: Add pfm support

pfm is a helper library used by application to program specific monitoring 
events.
This is commonly and often used in profiling processes and makes it easier to 
choose the correct event.

Example:
AutoFDO for the Kernel provides in their instructions following command:
perf record --pfm-events RETIRED_TAKEN_BRANCH_INSTRUCTIONS:k -a -N -b -c 500009 
-o kernel.data -- time makepkg -s

This results currently into following:
`Error: unknown option `pfm-events' `

Since this is commonly used in many instructions add support for it, so that 
its easier for users and developers to use these events.

Signed-off-by: Peter Jung <[email protected]>

- - - - -


1 changed file:

- PKGBUILD


Changes:

=====================================
PKGBUILD
=====================================
@@ -26,7 +26,7 @@ makedepends=('git')
 makedepends+=('asciidoc' 'xmlto')
 # perf deps
 makedepends+=('perl' 'python' 'python-setuptools' 'slang' 'elfutils' 
'libunwind'
-  'numactl' 'audit' 'zstd' 'libcap' 'libtraceevent' 'openssl' 'clang' 
'llvm-libs')
+  'numactl' 'audit' 'zstd' 'libcap' 'libtraceevent' 'openssl' 'clang' 
'llvm-libs' 'libpfm')
 # cpupower deps
 makedepends+=('pciutils')
 # usbip deps
@@ -96,6 +96,7 @@ build() {
     PYTHON=python \
     NO_LIBLLVM=1 \
     PYTHON_CONFIG=python-config \
+    LIBPFM4=1 \
     DESTDIR="$pkgdir"
   popd
 
@@ -177,7 +178,7 @@ package_perf() {
   pkgdesc='Linux kernel performance auditing tool'
   depends=('glibc' 'perl' 'python' 'slang' 'elfutils' 'libunwind' 'binutils'
            'numactl' 'audit' 'coreutils' 'glib2' 'xz' 'zlib' 'libelf' 'bash'
-           'zstd' 'libcap' 'libtraceevent' 'openssl' 'libsframe.so' 
'llvm-libs')
+           'zstd' 'libcap' 'libtraceevent' 'openssl' 'libsframe.so' 
'llvm-libs' 'libpfm')
 
   cd linux/tools/perf
   make -f Makefile.perf \
@@ -191,6 +192,7 @@ package_perf() {
     NO_LIBLLVM=1 \
     PYTHON_CONFIG=python-config \
     DESTDIR="$pkgdir" \
+    LIBPFM4=1 \
     install install-python_ext
   cd "$pkgdir"
   # add linker search path



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/linux-tools/-/commit/070cb3e7961210adc6890827a75dbc358dfc9809

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/linux-tools/-/commit/070cb3e7961210adc6890827a75dbc358dfc9809
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to