Commit 2cb26c15 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'perf-tools-fixes-for-v5.13-2021-06-04' of...

Merge tag 'perf-tools-fixes-for-v5.13-2021-06-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fix NULL pointer dereference in 'perf probe' when handling
   DW_AT_const_value when looking for a variable, which is valid.

 - Fix for capability querying of perf_event_attr.cgroup support in
   older kernels.

 - Add missing cloning of evsel->use_config_name.

 - Honor event config name on --no-merge in 'perf stat'.

 - Fix some memory leaks found using ASAN.

 - Fix the perf entry for perf_event_attr setup with make LIBPFM4=1 on
   s390 z/VM.

 - Update MIPS UAPI perf_regs.h file.

 - Fix 'perf stat' BPF counter load return check.

* tag 'perf-tools-fixes-for-v5.13-2021-06-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
  perf env: Fix memory leak of bpf_prog_info_linear member
  perf symbol-elf: Fix memory leak by freeing sdt_note.args
  perf stat: Honor event config name on --no-merge
  perf evsel: Add missing cloning of evsel->use_config_name
  perf test: Test 17 fails with make LIBPFM4=1 on s390 z/VM
  perf stat: Fix error return code in bperf__load()
  perf record: Move probing cgroup sampling support
  perf probe: Fix NULL pointer dereference in convert_variable_location()
  perf tools: Copy uapi/asm/perf_regs.h from the kernel for MIPS
parents ff609107 67069a1f
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _ASM_MIPS_PERF_REGS_H
#define _ASM_MIPS_PERF_REGS_H

enum perf_event_mips_regs {
	PERF_REG_MIPS_PC,
	PERF_REG_MIPS_R1,
	PERF_REG_MIPS_R2,
	PERF_REG_MIPS_R3,
	PERF_REG_MIPS_R4,
	PERF_REG_MIPS_R5,
	PERF_REG_MIPS_R6,
	PERF_REG_MIPS_R7,
	PERF_REG_MIPS_R8,
	PERF_REG_MIPS_R9,
	PERF_REG_MIPS_R10,
	PERF_REG_MIPS_R11,
	PERF_REG_MIPS_R12,
	PERF_REG_MIPS_R13,
	PERF_REG_MIPS_R14,
	PERF_REG_MIPS_R15,
	PERF_REG_MIPS_R16,
	PERF_REG_MIPS_R17,
	PERF_REG_MIPS_R18,
	PERF_REG_MIPS_R19,
	PERF_REG_MIPS_R20,
	PERF_REG_MIPS_R21,
	PERF_REG_MIPS_R22,
	PERF_REG_MIPS_R23,
	PERF_REG_MIPS_R24,
	PERF_REG_MIPS_R25,
	PERF_REG_MIPS_R26,
	PERF_REG_MIPS_R27,
	PERF_REG_MIPS_R28,
	PERF_REG_MIPS_R29,
	PERF_REG_MIPS_R30,
	PERF_REG_MIPS_R31,
	PERF_REG_MIPS_MAX = PERF_REG_MIPS_R31 + 1,
};
#endif /* _ASM_MIPS_PERF_REGS_H */
+0 −1
Original line number Diff line number Diff line
@@ -90,7 +90,6 @@ endif
ifeq ($(ARCH),mips)
  NO_PERF_REGS := 0
  CFLAGS += -I$(OUTPUT)arch/mips/include/generated
  CFLAGS += -I../../arch/mips/include/uapi -I../../arch/mips/include/generated/uapi
  LIBUNWIND_LIBS = -lunwind -lunwind-mips
endif

+6 −0
Original line number Diff line number Diff line
@@ -2714,6 +2714,12 @@ int cmd_record(int argc, const char **argv)
		rec->no_buildid = true;
	}

	if (rec->opts.record_cgroup && !perf_can_record_cgroup()) {
		pr_err("Kernel has no cgroup sampling support.\n");
		err = -EINVAL;
		goto out_opts;
	}

	if (rec->opts.kcore)
		rec->data.is_dir = true;

+1 −0
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ arch/x86/lib/x86-opcode-map.txt
arch/x86/tools/gen-insn-attr-x86.awk
arch/arm/include/uapi/asm/perf_regs.h
arch/arm64/include/uapi/asm/perf_regs.h
arch/mips/include/uapi/asm/perf_regs.h
arch/powerpc/include/uapi/asm/perf_regs.h
arch/s390/include/uapi/asm/perf_regs.h
arch/x86/include/uapi/asm/perf_regs.h
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@ pinned=0
exclusive=0
exclude_user=0
exclude_kernel=0|1
exclude_hv=0
exclude_hv=0|1
exclude_idle=0
mmap=1
comm=1
Loading