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

Commit a6f83f00 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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

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

 into perf/urgent

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

User visible changes:

  - When handling perf_event_open() returning EBUSY and not being able to opendir
    the procfs mount point we would tell the user that the oprofile daemon was
    found by returning -1 on as the return for a bool function, oops, fix it,
    found with Coccinelle. (Peter Senna Tschudin).

  - Fix per-pkg event reporting bug in 'perf stat'. (Stephane Eranian)

Developer visible changes:

  - Fix missing prototype for function provided when it isn't present in the
    libelf present, fixing the build on RHEL/CentOS 5.1 systems, for instance.
    (Arnaldo Carvalho de Melo)

  - Detect if the gcc and libnuma have the features needed to avoid requiring
    the use of NO_LIBNUMA and/or NO_AUXTRACE to build on older systems.
    (Arnaldo Carvalho de Melo)

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents a7d5c189 bf644563
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -41,6 +41,7 @@ FEATURE_TESTS ?= \
	libelf-getphdrnum		\
	libelf-getphdrnum		\
	libelf-mmap			\
	libelf-mmap			\
	libnuma				\
	libnuma				\
	numa_num_possible_cpus		\
	libperl				\
	libperl				\
	libpython			\
	libpython			\
	libpython-version		\
	libpython-version		\
@@ -51,7 +52,8 @@ FEATURE_TESTS ?= \
	timerfd				\
	timerfd				\
	libdw-dwarf-unwind		\
	libdw-dwarf-unwind		\
	zlib				\
	zlib				\
	lzma
	lzma				\
	get_cpuid


FEATURE_DISPLAY ?=			\
FEATURE_DISPLAY ?=			\
	dwarf				\
	dwarf				\
@@ -61,13 +63,15 @@ FEATURE_DISPLAY ?= \
	libbfd				\
	libbfd				\
	libelf				\
	libelf				\
	libnuma				\
	libnuma				\
	numa_num_possible_cpus		\
	libperl				\
	libperl				\
	libpython			\
	libpython			\
	libslang			\
	libslang			\
	libunwind			\
	libunwind			\
	libdw-dwarf-unwind		\
	libdw-dwarf-unwind		\
	zlib				\
	zlib				\
	lzma
	lzma				\
	get_cpuid


# Set FEATURE_CHECK_(C|LD)FLAGS-all for all FEATURE_TESTS features.
# Set FEATURE_CHECK_(C|LD)FLAGS-all for all FEATURE_TESTS features.
# If in the future we need per-feature checks/flags for features not
# If in the future we need per-feature checks/flags for features not
+9 −1
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@ FILES= \
	test-libelf-getphdrnum.bin	\
	test-libelf-getphdrnum.bin	\
	test-libelf-mmap.bin		\
	test-libelf-mmap.bin		\
	test-libnuma.bin		\
	test-libnuma.bin		\
	test-numa_num_possible_cpus.bin	\
	test-libperl.bin		\
	test-libperl.bin		\
	test-libpython.bin		\
	test-libpython.bin		\
	test-libpython-version.bin	\
	test-libpython-version.bin	\
@@ -34,7 +35,8 @@ FILES= \
	test-compile-x32.bin		\
	test-compile-x32.bin		\
	test-zlib.bin			\
	test-zlib.bin			\
	test-lzma.bin			\
	test-lzma.bin			\
	test-bpf.bin
	test-bpf.bin			\
	test-get_cpuid.bin


CC := $(CROSS_COMPILE)gcc -MD
CC := $(CROSS_COMPILE)gcc -MD
PKG_CONFIG := $(CROSS_COMPILE)pkg-config
PKG_CONFIG := $(CROSS_COMPILE)pkg-config
@@ -87,6 +89,9 @@ test-libelf-getphdrnum.bin:
test-libnuma.bin:
test-libnuma.bin:
	$(BUILD) -lnuma
	$(BUILD) -lnuma


test-numa_num_possible_cpus.bin:
	$(BUILD) -lnuma

test-libunwind.bin:
test-libunwind.bin:
	$(BUILD) -lelf
	$(BUILD) -lelf


@@ -162,6 +167,9 @@ test-zlib.bin:
test-lzma.bin:
test-lzma.bin:
	$(BUILD) -llzma
	$(BUILD) -llzma


test-get_cpuid.bin:
	$(BUILD)

test-bpf.bin:
test-bpf.bin:
	$(BUILD)
	$(BUILD)


+10 −0
Original line number Original line Diff line number Diff line
@@ -77,6 +77,10 @@
# include "test-libnuma.c"
# include "test-libnuma.c"
#undef main
#undef main


#define main main_test_numa_num_possible_cpus
# include "test-numa_num_possible_cpus.c"
#undef main

#define main main_test_timerfd
#define main main_test_timerfd
# include "test-timerfd.c"
# include "test-timerfd.c"
#undef main
#undef main
@@ -117,6 +121,10 @@
# include "test-lzma.c"
# include "test-lzma.c"
#undef main
#undef main


#define main main_test_get_cpuid
# include "test-get_cpuid.c"
#undef main

int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
{
	main_test_libpython();
	main_test_libpython();
@@ -136,6 +144,7 @@ int main(int argc, char *argv[])
	main_test_libbfd();
	main_test_libbfd();
	main_test_backtrace();
	main_test_backtrace();
	main_test_libnuma();
	main_test_libnuma();
	main_test_numa_num_possible_cpus();
	main_test_timerfd();
	main_test_timerfd();
	main_test_stackprotector_all();
	main_test_stackprotector_all();
	main_test_libdw_dwarf_unwind();
	main_test_libdw_dwarf_unwind();
@@ -143,6 +152,7 @@ int main(int argc, char *argv[])
	main_test_zlib();
	main_test_zlib();
	main_test_pthread_attr_setaffinity_np();
	main_test_pthread_attr_setaffinity_np();
	main_test_lzma();
	main_test_lzma();
	main_test_get_cpuid();


	return 0;
	return 0;
}
}
+7 −0
Original line number Original line Diff line number Diff line
#include <cpuid.h>

int main(void)
{
	unsigned int eax = 0, ebx = 0, ecx = 0, edx = 0;
	return __get_cpuid(0x15, &eax, &ebx, &ecx, &edx);
}
+6 −0
Original line number Original line Diff line number Diff line
#include <numa.h>

int main(void)
{
	return numa_num_possible_cpus();
}
Loading