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

Merge tag 'perf-tools-fixes-2021-01-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fix 'CPU too large' error in Intel PT

 - Correct event attribute sizes in 'perf inject'

 - Sync build_bug.h and kvm.h kernel copies

 - Fix bpf.h header include directive in 5sec.c 'perf trace' bpf example

 - libbpf tests fixes

 - Fix shadow stat 'perf test' for non-bash shells

 - Take cgroups into account for shadow stats in 'perf stat'

* tag 'perf-tools-fixes-2021-01-17' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
  perf inject: Correct event attribute sizes
  perf intel-pt: Fix 'CPU too large' error
  perf stat: Take cgroups into account for shadow stats
  perf stat: Introduce struct runtime_stat_data
  libperf tests: Fail when failing to get a tracepoint id
  libperf tests: If a test fails return non-zero
  libperf tests: Avoid uninitialized variable warning
  perf test: Fix shadow stat test for non-bash shells
  tools headers: Syncronize linux/build_bug.h with the kernel sources
  tools headers UAPI: Sync kvm.h headers with the kernel sources
  perf bpf examples: Fix bpf.h header include directive in 5sec.c example
parents a1339d63 648b054a
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -79,9 +79,4 @@
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
#endif // static_assert

#ifdef __GENKSYMS__
/* genksyms gets confused by _Static_assert */
#define _Static_assert(expr, ...)
#endif

#endif	/* _LINUX_BUILD_BUG_H */
+2 −0
Original line number Diff line number Diff line
@@ -251,6 +251,7 @@ struct kvm_hyperv_exit {
#define KVM_EXIT_X86_RDMSR        29
#define KVM_EXIT_X86_WRMSR        30
#define KVM_EXIT_DIRTY_RING_FULL  31
#define KVM_EXIT_AP_RESET_HOLD    32

/* For KVM_EXIT_INTERNAL_ERROR */
/* Emulate instruction failed. */
@@ -573,6 +574,7 @@ struct kvm_vapic_addr {
#define KVM_MP_STATE_CHECK_STOP        6
#define KVM_MP_STATE_OPERATING         7
#define KVM_MP_STATE_LOAD              8
#define KVM_MP_STATE_AP_RESET_HOLD     9

struct kvm_mp_state {
	__u32 mp_state;
+1 −1
Original line number Diff line number Diff line
@@ -27,5 +27,5 @@ int main(int argc, char **argv)
	perf_cpu_map__put(cpus);

	__T_END;
	return 0;
	return tests_failed == 0 ? 0 : -1;
}
+4 −3
Original line number Diff line number Diff line
@@ -208,13 +208,13 @@ static int test_mmap_thread(void)
	char path[PATH_MAX];
	int id, err, pid, go_pipe[2];
	union perf_event *event;
	char bf;
	int count = 0;

	snprintf(path, PATH_MAX, "%s/kernel/debug/tracing/events/syscalls/sys_enter_prctl/id",
		 sysfs__mountpoint());

	if (filename__read_int(path, &id)) {
		tests_failed++;
		fprintf(stderr, "error: failed to get tracepoint id: %s\n", path);
		return -1;
	}
@@ -229,6 +229,7 @@ static int test_mmap_thread(void)
	pid = fork();
	if (!pid) {
		int i;
		char bf;

		read(go_pipe[0], &bf, 1);

@@ -266,7 +267,7 @@ static int test_mmap_thread(void)
	perf_evlist__enable(evlist);

	/* kick the child and wait for it to finish */
	write(go_pipe[1], &bf, 1);
	write(go_pipe[1], "A", 1);
	waitpid(pid, NULL, 0);

	/*
@@ -409,5 +410,5 @@ int main(int argc, char **argv)
	test_mmap_cpus();

	__T_END;
	return 0;
	return tests_failed == 0 ? 0 : -1;
}
+1 −1
Original line number Diff line number Diff line
@@ -131,5 +131,5 @@ int main(int argc, char **argv)
	test_stat_thread_enable();

	__T_END;
	return 0;
	return tests_failed == 0 ? 0 : -1;
}
Loading