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

Merge tag 'perf-tools-fixes-for-v6.0-2022-09-29' of...

Merge tag 'perf-tools-fixes-for-v6.0-2022-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fail the 'perf test record' entry on error, fixing a regression where
   just setup stuff like allocating memory and not the actual things
   being tested failed.

 - Fixup disabling of -Wdeprecated-declarations for the python scripting
   engine, the previous attempt had a brown paper bag thinko.

 - Fix branch stack sampling test to include sanity check for branch
   filter on PowerPC.

 - Update is_ignored_symbol function to match the kernel ignored list,
   fixing running the 'perf test' entry that compares resolving symbols
   from kallsyms to resolving from vmlinux.

 - Augment the data source type with ARM's neoverse_spe list, the
   previous code was limited in its search resolving the data source.

 - Fix some clang 5 variable set but unused cases.

 - Get a perf cgroup more portably in BPF as the
   __builtin_preserve_enum_value builtin is not available in older
   versions of clang. In those cases we can forgo BPF's CO-RE (Compile
   Once, Run Everywhere).

 - More Fixes for Intel's hybrid CPU model.

* tag 'perf-tools-fixes-for-v6.0-2022-09-29' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
  perf build: Fixup disabling of -Wdeprecated-declarations for the python scripting engine
  perf tests mmap-basic: Remove unused variable to address clang 15 warning
  perf parse-events: Ignore clang 15 warning about variable set but unused in bison produced code
  perf tests record: Fail the test if the 'errs' counter is not zero
  perf test: Fix test case 87 ("perf record tests") for hybrid systems
  perf arm-spe: augment the data source type with neoverse_spe list
  perf tests vmlinux-kallsyms: Update is_ignored_symbol function to match the kernel ignored list
  perf tests powerpc: Fix branch stack sampling test to include sanity check for branch filter
  perf parse-events: Remove "not supported" hybrid cache events
  perf print-events: Fix "perf list" can not display the PMU prefix for some hybrid cache events
  perf tools: Get a perf cgroup more portably in BPF
parents 920541bb 8e8bf60a
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -114,8 +114,7 @@ static int test__basic_mmap(struct test_suite *test __maybe_unused, int subtest

	for (i = 0; i < nsyscalls; ++i)
		for (j = 0; j < expected_nr_events[i]; ++j) {
			int foo = syscalls[i]();
			++foo;
			syscalls[i]();
		}

	md = &evlist->mmap[0];
+1 −1
Original line number Diff line number Diff line
@@ -332,7 +332,7 @@ static int test__PERF_RECORD(struct test_suite *test __maybe_unused, int subtest
out:
	if (err == -EACCES)
		return TEST_SKIP;
	if (err < 0)
	if (err < 0 || errs != 0)
		return TEST_FAIL;
	return TEST_OK;
}
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ test_register_capture() {
    echo "Register capture test [Skipped missing registers]"
    return
  fi
  if ! perf record -o - --intr-regs=di,r8,dx,cx -e cpu/br_inst_retired.near_call/p \
  if ! perf record -o - --intr-regs=di,r8,dx,cx -e br_inst_retired.near_call:p \
    -c 1000 --per-thread true 2> /dev/null \
    | perf script -F ip,sym,iregs -i - 2> /dev/null \
    | egrep -q "DI:"
+2 −1
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@ if ! [ -x "$(command -v cc)" ]; then
fi

# skip the test if the hardware doesn't support branch stack sampling
perf record -b -o- -B true > /dev/null 2>&1 || exit 2
# and if the architecture doesn't support filter types: any,save_type,u
perf record -b -o- -B --branch-filter any,save_type,u true > /dev/null 2>&1 || exit 2

TMPDIR=$(mktemp -d /tmp/__perf_test.program.XXXXX)

+3 −2
Original line number Diff line number Diff line
@@ -43,10 +43,11 @@ static bool is_ignored_symbol(const char *name, char type)
	/* Symbol names that begin with the following are ignored.*/
	static const char * const ignored_prefixes[] = {
		"$",			/* local symbols for ARM, MIPS, etc. */
		".LASANPC",		/* s390 kasan local symbols */
		".L",			/* local labels, .LBB,.Ltmpxxx,.L__unnamed_xx,.LASANPC, etc. */
		"__crc_",		/* modversions */
		"__efistub_",		/* arm64 EFI stub namespace */
		"__kvm_nvhe_",		/* arm64 non-VHE KVM namespace */
		"__kvm_nvhe_$",		/* arm64 local symbols in non-VHE KVM namespace */
		"__kvm_nvhe_.L",	/* arm64 local symbols in non-VHE KVM namespace */
		"__AArch64ADRPThunk_",	/* arm64 lld */
		"__ARMV5PILongThunk_",	/* arm lld */
		"__ARMV7PILongThunk_",
Loading