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

Commit 636fa4a7 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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

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

 into perf/urgent

Pull perf/urgent fixes from Arnaldo Carvalho de Melo:

- Fallback to usermode-only counters when perf_event_paranoid > 1, which
  is the case now (Arnaldo Carvalho de Melo)

- Do not reassign parg after collapse_tree() in libtraceevent, which
  may cause tool crashes (Steven Rostedt)

- Fix the build on Fedora Rawhide, where readdir_r() is deprecated and
  also wrt -Werror=unused-const-variable= + x86_32_regoffset_table on
  !x86_64 (Arnaldo Carvalho de Melo)

- Fix the build on Ubuntu 12.04.5, where dwarf_getlocations() isn't
  available, i.e. libdw-dev < 0.157 (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 9f448cd3 42ef8a78
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ endef
FEATURE_TESTS_BASIC :=			\
	backtrace			\
	dwarf				\
	dwarf_getlocations		\
	fortify-source			\
	sync-compare-and-swap		\
	glibc				\
@@ -78,6 +79,7 @@ endif

FEATURE_DISPLAY ?=			\
	dwarf				\
	dwarf_getlocations		\
	glibc				\
	gtk2				\
	libaudit			\
+4 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ FILES= \
	test-backtrace.bin		\
	test-bionic.bin			\
	test-dwarf.bin			\
	test-dwarf_getlocations.bin	\
	test-fortify-source.bin		\
	test-sync-compare-and-swap.bin	\
	test-glibc.bin			\
@@ -82,6 +83,9 @@ endif
$(OUTPUT)test-dwarf.bin:
	$(BUILD) $(DWARFLIBS)

$(OUTPUT)test-dwarf_getlocations.bin:
	$(BUILD) $(DWARFLIBS)

$(OUTPUT)test-libelf-mmap.bin:
	$(BUILD) -lelf

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

#define main main_test_dwarf_getlocations
# include "test-dwarf_getlocations.c"
#undef main

#define main main_test_libelf_getphdrnum
# include "test-libelf-getphdrnum.c"
#undef main
@@ -143,6 +147,7 @@ int main(int argc, char *argv[])
	main_test_libelf_mmap();
	main_test_glibc();
	main_test_dwarf();
	main_test_dwarf_getlocations();
	main_test_libelf_getphdrnum();
	main_test_libunwind();
	main_test_libaudit();
+12 −0
Original line number Diff line number Diff line
#include <stdlib.h>
#include <elfutils/libdw.h>

int main(void)
{
	Dwarf_Addr base, start, end;
	Dwarf_Attribute attr;
	Dwarf_Op *op;
        size_t nops;
	ptrdiff_t offset = 0;
        return (int)dwarf_getlocations(&attr, offset, &base, &start, &end, &op, &nops);
}
+2 −2
Original line number Diff line number Diff line
@@ -1164,11 +1164,11 @@ process_filter(struct event_format *event, struct filter_arg **parg,
		current_op = current_exp;

	ret = collapse_tree(current_op, parg, error_str);
	/* collapse_tree() may free current_op, and updates parg accordingly */
	current_op = NULL;
	if (ret < 0)
		goto fail;

	*parg = current_op;

	free(token);
	return 0;

Loading