[GIT PULL] perf tools fixes for v6.6: 2nd batch

From: Arnaldo Carvalho de Melo
Date: Fri Oct 20 2023 - 16:09:07 EST


Hi Linus,

Please consider pulling,

Best regards,

- Arnaldo

The following changes since commit e47749f1796d1df39a7eaae95f2784aaa43df57d:

perf jevent: fix core dump on software events on s390 (2023-09-17 15:51:57 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git tags/perf-tools-fixes-for-v6.6-2-2023-10-20

for you to fetch changes up to 4fa008a2db484024a5cb52676a1b1534dc82330c:

tools build: Fix llvm feature detection, still used by bpftool (2023-10-19 22:33:58 -0300)

----------------------------------------------------------------
perf tools fixes for v6.6: 2nd batch

- Fix regression in reading scale and unit files from sysfs for PMU
events, so that we can use that info to pretty print instead of
printing raw numbers:

# perf stat -e power/energy-ram/,power/energy-gpu/ sleep 2

Performance counter stats for 'system wide':

1.64 Joules power/energy-ram/
0.20 Joules power/energy-gpu/

2.001228914 seconds time elapsed
#
# grep -m1 "model name" /proc/cpuinfo
model name : Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
#

- The small llvm.cpp file used to check if the llvm devel files are present was
incorrectly deleted when removing the BPF event in 'perf trace', put it back
as it is also used by tools/bpf/bpftool, that uses llvm routines to do
disassembly of BPF object files.

- Fix use of addr_location__exit() in dlfilter__object_code(), making sure that
it is only used to pair a previous addr_location__init() call.

Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

----------------------------------------------------------------
Adrian Hunter (2):
perf dlfilter: Fix use of addr_location__exit() in dlfilter__object_code()
perf dlfilter: Add a test for object_code()

Arnaldo Carvalho de Melo (1):
tools build: Fix llvm feature detection, still used by bpftool

Wyes Karny (1):
perf pmu: Fix perf stat output with correct scale and unit

tools/build/feature/test-llvm.cpp | 14 +++++++++++++
tools/perf/dlfilters/dlfilter-test-api-v0.c | 12 ++++++++++-
tools/perf/dlfilters/dlfilter-test-api-v2.c | 12 ++++++++++-
tools/perf/util/dlfilter.c | 32 ++++++++++++++---------------
tools/perf/util/pmu.c | 8 ++++----
5 files changed, 55 insertions(+), 23 deletions(-)
create mode 100644 tools/build/feature/test-llvm.cpp