Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0bd106d2 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge tag 'perf-core-for-mingo' of...

Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

 into perf/urgent

Pull perf tooling fixes from Arnaldo Carvalho de Melo:

" - Fix a few clean targets in tools/ (Jiri Olsa)

  - Add missing sources to perf's MANIFEST, fixing the out of tree build with
    'make perf-tar*-src-pkg' tarballs (Jiri Olsa)

  - Fix bpf related build problems in PowerPC (Naveen N. Rao, Wang Nan)

  - 'make -C tools/perf build-test' fixes (Wang Nan)

  - Fix 'perf test hist' entry (Wang Nan)

  - Add BPF feature check to test-all, as in an environment with all other
    features enabled, BPF would be considered enabled without doing real
    feature check.  (Wang Nan)"

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 5cb52b5e b0500c16
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -127,6 +127,12 @@ liblockdep_clean:
libapi_clean:
	$(call descend,lib/api,clean)

libbpf_clean:
	$(call descend,lib/bpf,clean)

libsubcmd_clean:
	$(call descend,lib/subcmd,clean)

perf_clean:
	$(call descend,$(@:_clean=),clean)

@@ -142,9 +148,12 @@ tmon_clean:
freefall_clean:
	$(call descend,laptop/freefall,clean)

build_clean:
	$(call descend,build,clean)

clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean lguest_clean \
		perf_clean selftests_clean turbostat_clean usb_clean virtio_clean \
		vm_clean net_clean iio_clean x86_energy_perf_policy_clean tmon_clean \
		freefall_clean
		freefall_clean build_clean libbpf_clean libsubcmd_clean liblockdep_clean

.PHONY: FORCE
+5 −0
Original line number Diff line number Diff line
@@ -125,6 +125,10 @@
# include "test-get_cpuid.c"
#undef main

#define main main_test_bpf
# include "test-bpf.c"
#undef main

int main(int argc, char *argv[])
{
	main_test_libpython();
@@ -153,6 +157,7 @@ int main(int argc, char *argv[])
	main_test_pthread_attr_setaffinity_np();
	main_test_lzma();
	main_test_get_cpuid();
	main_test_bpf();

	return 0;
}
+19 −1
Original line number Diff line number Diff line
#include <asm/unistd.h>
#include <linux/bpf.h>
#include <unistd.h>

#ifndef __NR_bpf
# if defined(__i386__)
#  define __NR_bpf 357
# elif defined(__x86_64__)
#  define __NR_bpf 321
# elif defined(__aarch64__)
#  define __NR_bpf 280
#  error __NR_bpf not defined. libbpf does not support your arch.
# endif
#endif

int main(void)
{
	union bpf_attr attr;

	/* Check fields in attr */
	attr.prog_type = BPF_PROG_TYPE_KPROBE;
	attr.insn_cnt = 0;
	attr.insns = 0;
@@ -14,5 +28,9 @@ int main(void)
	attr.kern_version = 0;

	attr = attr;
	return 0;
	/*
	 * Test existence of __NR_bpf and BPF_PROG_LOAD.
	 * This call should fail if we run the testcase.
	 */
	return syscall(__NR_bpf, BPF_PROG_LOAD, attr, sizeof(attr));
}
+9 −9
Original line number Diff line number Diff line
@@ -6,6 +6,12 @@ BPF_EXTRAVERSION = 1

MAKEFLAGS += --no-print-directory

ifeq ($(srctree),)
srctree := $(patsubst %/,%,$(dir $(shell pwd)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
#$(info Determined 'srctree' to be $(srctree))
endif

# Makefiles suck: This macro sets a default value of $(2) for the
# variable named by $(1), unless the variable has been set by
@@ -31,7 +37,8 @@ INSTALL = install
DESTDIR ?=
DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))'

LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
include $(srctree)/tools/scripts/Makefile.arch

ifeq ($(LP64), 1)
  libdir_relative = lib64
else
@@ -57,13 +64,6 @@ ifndef VERBOSE
  VERBOSE = 0
endif

ifeq ($(srctree),)
srctree := $(patsubst %/,%,$(dir $(shell pwd)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
srctree := $(patsubst %/,%,$(dir $(srctree)))
#$(info Determined 'srctree' to be $(srctree))
endif

FEATURE_USER = .libbpf
FEATURE_TESTS = libelf libelf-getphdrnum libelf-mmap bpf
FEATURE_DISPLAY = libelf bpf
@@ -192,7 +192,7 @@ config-clean:
	$(Q)$(MAKE) -C $(srctree)/tools/build/feature/ clean >/dev/null

clean:
	$(call QUIET_CLEAN, libbpf) $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d \
	$(call QUIET_CLEAN, libbpf) $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d .*.cmd \
		$(RM) LIBBPF-CFLAGS
	$(call QUIET_CLEAN, core-gen) $(RM) $(OUTPUT)FEATURE-DUMP.libbpf

+2 −2
Original line number Diff line number Diff line
@@ -14,8 +14,8 @@
#include "bpf.h"

/*
 * When building perf, unistd.h is override. Define __NR_bpf is
 * required to be defined.
 * When building perf, unistd.h is overrided. __NR_bpf is
 * required to be defined explicitly.
 */
#ifndef __NR_bpf
# if defined(__i386__)
Loading