Commit afead42f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'perf-tools-fixes-for-v6.4-2-2023-05-30' of...

Merge tag 'perf-tools-fixes-for-v6.4-2-2023-05-30' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fix BPF CO-RE naming convention for checking the availability of
   fields on 'union perf_mem_data_src' on the running kernel

 - Remove the use of llvm-strip on BPF skel object files, not needed,
   fixes a build breakage when the llvm package, that contains it in
   most distros, isn't installed

 - Fix tools that use both evsel->{bpf_counter_list,bpf_filters},
   removing them from a union

 - Remove extra "--" from the 'perf ftrace latency' --use-nsec option,
   previously it was working only when using the '-n' alternative

 - Don't stop building when both binutils-devel and a C++ compiler isn't
   available to compile the alternative C++ demangle support code,
   disable that feature instead

 - Sync the linux/in.h and coresight-pmu.h header copies with the kernel
   sources

 - Fix relative include path to cs-etm.h

* tag 'perf-tools-fixes-for-v6.4-2-2023-05-30' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
  perf evsel: Separate bpf_counter_list and bpf_filters, can be used at the same time
  tools headers UAPI: Sync the linux/in.h with the kernel sources
  perf cs-etm: Copy kernel coresight-pmu.h header
  perf bpf: Do not use llvm-strip on BPF binary
  perf build: Don't compile demangle-cxx.cpp if not necessary
  perf arm: Fix include path to cs-etm.h
  perf bpf filter: Fix a broken perf sample data naming for BPF CO-RE
  perf ftrace latency: Remove unnecessary "--" from --use-nsec option
parents 1683c329 c041d33b
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -21,19 +21,6 @@
 */
#define CORESIGHT_LEGACY_CPU_TRACE_ID(cpu)  (0x10 + (cpu * 2))

/* CoreSight trace ID is currently the bottom 7 bits of the value */
#define CORESIGHT_TRACE_ID_VAL_MASK	GENMASK(6, 0)

/*
 * perf record will set the legacy meta data values as unused initially.
 * This allows perf report to manage the decoders created when dynamic
 * allocation in operation.
 */
#define CORESIGHT_TRACE_ID_UNUSED_FLAG	BIT(31)

/* Value to set for unused trace ID values */
#define CORESIGHT_TRACE_ID_UNUSED_VAL	0x7F

/*
 * Below are the definition of bit offsets for perf option, and works as
 * arbitrary values for all ETM versions.
+1 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ struct in_addr {
#define IP_MULTICAST_ALL		49
#define IP_UNICAST_IF			50
#define IP_LOCAL_PORT_RANGE		51
#define IP_PROTOCOL			52

#define MCAST_EXCLUDE	0
#define MCAST_INCLUDE	1
+1 −0
Original line number Diff line number Diff line
@@ -927,6 +927,7 @@ ifndef NO_DEMANGLE
    EXTLIBS += -lstdc++
    CFLAGS += -DHAVE_CXA_DEMANGLE_SUPPORT
    CXXFLAGS += -DHAVE_CXA_DEMANGLE_SUPPORT
    $(call detected,CONFIG_CXX_DEMANGLE)
  endif
  ifdef BUILD_NONDISTRO
    ifeq ($(filter -liberty,$(EXTLIBS)),)
+1 −2
Original line number Diff line number Diff line
@@ -181,7 +181,6 @@ HOSTCC ?= gcc
HOSTLD  ?= ld
HOSTAR  ?= ar
CLANG   ?= clang
LLVM_STRIP ?= llvm-strip

PKG_CONFIG = $(CROSS_COMPILE)pkg-config

@@ -1083,7 +1082,7 @@ $(BPFTOOL): | $(SKEL_TMP_OUT)

$(SKEL_TMP_OUT)/%.bpf.o: util/bpf_skel/%.bpf.c $(LIBBPF) | $(SKEL_TMP_OUT)
	$(QUIET_CLANG)$(CLANG) -g -O2 -target bpf -Wall -Werror $(BPF_INCLUDE) $(TOOLS_UAPI_INCLUDE) \
	  -c $(filter util/bpf_skel/%.bpf.c,$^) -o $@ && $(LLVM_STRIP) -g $@
	  -c $(filter util/bpf_skel/%.bpf.c,$^) -o $@

$(SKEL_OUT)/%.skel.h: $(SKEL_TMP_OUT)/%.bpf.o | $(BPFTOOL)
	$(QUIET_GENSKEL)$(BPFTOOL) gen skeleton $< > $@
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
#include "arm-spe.h"
#include "hisi-ptt.h"
#include "../../../util/pmu.h"
#include "../cs-etm.h"
#include "../../../util/cs-etm.h"

struct perf_event_attr
*perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused)
Loading