Commit 56f81458 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'perf-tools-fixes-for-v6.2-1-2023-01-06' of...

Merge tag 'perf-tools-fixes-for-v6.2-1-2023-01-06' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fix segfault when trying to process tracepoints present in a
   perf.data file and not linked with libtraceevent.

 - Fix build on uClibc systems by adding missing sys/types.h include,
   that was being obtained indirectly which stopped being the case when
   tools/lib/traceevent was removed.

 - Don't show commands in 'perf help' that depend on linking with
   libtraceevent when not building with that library, which is now a
   possibility since we no longer ship a copy in tools/lib/traceevent.

 - Fix failure in 'perf test' entry testing the combination of 'perf
   probe' user space function + 'perf record' + 'perf script' where it
   expects a backtrace leading to glibc's inet_pton() from 'ping' that
   now happens more than once with glibc 2.35 for IPv6 addreses.

 - Fix for the inet_pton perf test on s/390 where
   'text_to_binary_address' now appears on the backtrace.

 - Fix build error on riscv due to missing header for 'struct
   perf_sample'.

 - Fix 'make -C tools perf_install' install variant by not propagating
   the 'subdir' to submakes for the 'install_headers' targets.

 - Fix handling of unsupported cgroup events when using BPF counters in
   'perf stat'.

 - Count all cgroups, not just the last one when using 'perf stat' and
   combining --for-each-cgroup with --bpf-counters.

   This makes the output using BPF counters match the output without
   using it, which was the intention all along, the output should be the
   same using --bpf-counters or not.

 - Fix 'perf lock contention' core dump related to not finding the
   "__sched_text_end" symbol on s/390.

 - Fix build failure when HEAD is signed: exclude the signature from the
   version string.

 - Add missing closedir() calls to in perf_data__open_dir(), plugging a
   fd leak.

* tag 'perf-tools-fixes-for-v6.2-1-2023-01-06' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
  perf tools: Fix build on uClibc systems by adding missing sys/types.h include
  perf stat: Fix handling of --for-each-cgroup with --bpf-counters to match non BPF mode
  perf stat: Fix handling of unsupported cgroup events when using BPF counters
  perf test record_probe_libc_inet_pton: Fix test on s/390 where 'text_to_binary_address' now appears on the backtrace
  perf lock contention: Fix core dump related to not finding the "__sched_text_end" symbol on s/390
  perf build: Don't propagate subdir to submakes for install_headers
  perf test record_probe_libc_inet_pton: Fix failure due to extra inet_pton() backtrace in glibc >= 2.35
  perf tools: Fix segfault when trying to process tracepoints in perf.data and not linked with libtraceevent
  perf tools: Don't include signature in version strings
  perf help: Use HAVE_LIBTRACEEVENT to filter out unsupported commands
  perf tools riscv: Fix build error on riscv due to missing header for 'struct perf_sample'
  perf tools: Fix resources leak in perf_data__open_dir()
parents d7a0853d 481028db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -267,7 +267,7 @@ $(OUTPUT)%.xml : %.txt
	$(ASCIIDOC) -b docbook -d manpage \
		$(ASCIIDOC_EXTRA) -aperf_version=$(PERF_VERSION) \
		-aperf_date=$(shell git log -1 --pretty="format:%cd" \
				--date=short $<) \
				--date=short --no-show-signature $<) \
		-o $@+ $< && \
	mv $@+ $@

+5 −5
Original line number Diff line number Diff line
@@ -819,7 +819,7 @@ $(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h)

$(LIBAPI): FORCE | $(LIBAPI_OUTPUT)
	$(Q)$(MAKE) -C $(LIBAPI_DIR) O=$(LIBAPI_OUTPUT) \
		DESTDIR=$(LIBAPI_DESTDIR) prefix= \
		DESTDIR=$(LIBAPI_DESTDIR) prefix= subdir= \
		$@ install_headers

$(LIBAPI)-clean:
@@ -828,7 +828,7 @@ $(LIBAPI)-clean:

$(LIBBPF): FORCE | $(LIBBPF_OUTPUT)
	$(Q)$(MAKE) -C $(LIBBPF_DIR) FEATURES_DUMP=$(FEATURE_DUMP_EXPORT) \
		O= OUTPUT=$(LIBBPF_OUTPUT)/ DESTDIR=$(LIBBPF_DESTDIR) prefix= \
		O= OUTPUT=$(LIBBPF_OUTPUT)/ DESTDIR=$(LIBBPF_DESTDIR) prefix= subdir= \
		$@ install_headers

$(LIBBPF)-clean:
@@ -837,7 +837,7 @@ $(LIBBPF)-clean:

$(LIBPERF): FORCE | $(LIBPERF_OUTPUT)
	$(Q)$(MAKE) -C $(LIBPERF_DIR) O=$(LIBPERF_OUTPUT) \
		DESTDIR=$(LIBPERF_DESTDIR) prefix= \
		DESTDIR=$(LIBPERF_DESTDIR) prefix= subdir= \
		$@ install_headers

$(LIBPERF)-clean:
@@ -846,7 +846,7 @@ $(LIBPERF)-clean:

$(LIBSUBCMD): FORCE | $(LIBSUBCMD_OUTPUT)
	$(Q)$(MAKE) -C $(LIBSUBCMD_DIR) O=$(LIBSUBCMD_OUTPUT) \
		DESTDIR=$(LIBSUBCMD_DESTDIR) prefix= \
		DESTDIR=$(LIBSUBCMD_DESTDIR) prefix= subdir= \
		$@ install_headers

$(LIBSUBCMD)-clean:
@@ -855,7 +855,7 @@ $(LIBSUBCMD)-clean:

$(LIBSYMBOL): FORCE | $(LIBSYMBOL_OUTPUT)
	$(Q)$(MAKE) -C $(LIBSYMBOL_DIR) O=$(LIBSYMBOL_OUTPUT) \
		DESTDIR=$(LIBSYMBOL_DESTDIR) prefix= \
		DESTDIR=$(LIBSYMBOL_DESTDIR) prefix= subdir= \
		$@ install_headers

$(LIBSYMBOL)-clean:
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
#include <elfutils/libdwfl.h>
#include "../../util/unwind-libdw.h"
#include "../../util/perf_regs.h"
#include "../../util/event.h"
#include "../../util/sample.h"

bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
{
+2 −0
Original line number Diff line number Diff line
@@ -1670,6 +1670,7 @@ static int __cmd_report(bool display_info)

	/* for lock function check */
	symbol_conf.sort_by_name = true;
	symbol_conf.allow_aliases = true;
	symbol__init(&session->header.env);

	if (!data.is_pipe) {
@@ -1757,6 +1758,7 @@ static int __cmd_contention(int argc, const char **argv)

	/* for lock function check */
	symbol_conf.sort_by_name = true;
	symbol_conf.allow_aliases = true;
	symbol__init(&session->header.env);

	if (use_bpf) {
+5 −5
Original line number Diff line number Diff line
@@ -16,20 +16,20 @@ perf-ftrace mainporcelain common
perf-inject			mainporcelain common
perf-iostat			mainporcelain common
perf-kallsyms			mainporcelain common
perf-kmem			mainporcelain common
perf-kmem			mainporcelain traceevent
perf-kvm			mainporcelain common
perf-kwork			mainporcelain common
perf-kwork			mainporcelain traceevent
perf-list			mainporcelain common
perf-lock			mainporcelain common
perf-lock			mainporcelain traceevent
perf-mem			mainporcelain common
perf-probe			mainporcelain full
perf-record			mainporcelain common
perf-report			mainporcelain common
perf-sched			mainporcelain common
perf-sched			mainporcelain traceevent
perf-script			mainporcelain common
perf-stat			mainporcelain common
perf-test			mainporcelain common
perf-timechart			mainporcelain common
perf-timechart			mainporcelain traceevent
perf-top			mainporcelain common
perf-trace			mainporcelain audit
perf-version			mainporcelain common
Loading