Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'perf/urgent' into perf/core, to resolve conflict

Conflicts:
tools/perf/arch/x86/tests/dwarf-unwind.c

Signed-off-by: Ingo Molnar <mingo@kernel.org>

+52 -20
+2 -2
tools/lib/api/fs/debugfs.c
··· 12 12 char debugfs_mountpoint[PATH_MAX + 1] = "/sys/kernel/debug"; 13 13 14 14 static const char * const debugfs_known_mountpoints[] = { 15 - "/sys/kernel/debug/", 16 - "/debug/", 15 + "/sys/kernel/debug", 16 + "/debug", 17 17 0, 18 18 }; 19 19
+1 -1
tools/perf/Makefile.perf
··· 593 593 $(QUIET_CC)$(CC) -o $@ -c -fPIC $(CFLAGS) $(GTK_CFLAGS) $< 594 594 595 595 $(OUTPUT)libperf-gtk.so: $(GTK_OBJS) $(PERFLIBS) 596 - $(QUIET_LINK)$(CC) -o $@ -shared $(ALL_LDFLAGS) $(filter %.o,$^) $(GTK_LIBS) 596 + $(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS) 597 597 598 598 $(OUTPUT)builtin-help.o: builtin-help.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS 599 599 $(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) \
+1 -1
tools/perf/arch/x86/tests/dwarf-unwind.c
··· 23 23 24 24 sp = (unsigned long) regs[PERF_REG_X86_SP]; 25 25 26 - map = map_groups__find(thread->mg, MAP__FUNCTION, (u64) sp); 26 + map = map_groups__find(thread->mg, MAP__VARIABLE, (u64) sp); 27 27 if (!map) { 28 28 pr_debug("failed to get stack map\n"); 29 29 free(buf);
+7 -1
tools/perf/arch/x86/tests/regs_load.S
··· 1 - 2 1 #include <linux/linkage.h> 3 2 4 3 #define AX 0 ··· 89 90 ret 90 91 ENDPROC(perf_regs_load) 91 92 #endif 93 + 94 + /* 95 + * We need to provide note.GNU-stack section, saying that we want 96 + * NOT executable stack. Otherwise the final linking will assume that 97 + * the ELF stack should not be restricted at all and set it RWX. 98 + */ 99 + .section .note.GNU-stack,"",@progbits
+27 -11
tools/perf/config/Makefile
··· 117 117 CFLAGS += -Wextra 118 118 CFLAGS += -std=gnu99 119 119 120 + # Enforce a non-executable stack, as we may regress (again) in the future by 121 + # adding assembler files missing the .GNU-stack linker note. 122 + LDFLAGS += -Wl,-z,noexecstack 123 + 120 124 EXTLIBS = -lelf -lpthread -lrt -lm -ldl 121 125 122 126 ifneq ($(OUTPUT),) ··· 198 194 stackprotector-all \ 199 195 timerfd \ 200 196 libunwind-debug-frame \ 201 - bionic 197 + bionic \ 198 + liberty \ 199 + liberty-z \ 200 + cplus-demangle 202 201 203 202 # Set FEATURE_CHECK_(C|LD)FLAGS-all for all CORE_FEATURE_TESTS features. 204 203 # If in the future we need per-feature checks/flags for features not ··· 519 512 endif 520 513 521 514 ifeq ($(feature-libbfd), 1) 522 - EXTLIBS += -lbfd -lz -liberty 515 + EXTLIBS += -lbfd 516 + 517 + # call all detections now so we get correct 518 + # status in VF output 519 + $(call feature_check,liberty) 520 + $(call feature_check,liberty-z) 521 + $(call feature_check,cplus-demangle) 522 + 523 + ifeq ($(feature-liberty), 1) 524 + EXTLIBS += -liberty 525 + else 526 + ifeq ($(feature-liberty-z), 1) 527 + EXTLIBS += -liberty -lz 528 + endif 529 + endif 523 530 endif 524 531 525 532 ifdef NO_DEMANGLE ··· 544 523 CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT 545 524 else 546 525 ifneq ($(feature-libbfd), 1) 547 - $(call feature_check,liberty) 548 - ifeq ($(feature-liberty), 1) 549 - EXTLIBS += -lbfd -liberty 550 - else 551 - $(call feature_check,liberty-z) 552 - ifeq ($(feature-liberty-z), 1) 553 - EXTLIBS += -lbfd -liberty -lz 554 - else 555 - $(call feature_check,cplus-demangle) 526 + ifneq ($(feature-liberty), 1) 527 + ifneq ($(feature-liberty-z), 1) 528 + # we dont have neither HAVE_CPLUS_DEMANGLE_SUPPORT 529 + # or any of 'bfd iberty z' trinity 556 530 ifeq ($(feature-cplus-demangle), 1) 557 531 EXTLIBS += -liberty 558 532 CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
+2
tools/perf/tests/make
··· 46 46 make_install_html := install-html 47 47 make_install_info := install-info 48 48 make_install_pdf := install-pdf 49 + make_static := LDFLAGS=-static 49 50 50 51 # all the NO_* variable combined 51 52 make_minimal := NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 ··· 88 87 # run += make_install_info 89 88 # run += make_install_pdf 90 89 run += make_minimal 90 + run += make_static 91 91 92 92 ifneq ($(call has,ctags),) 93 93 run += make_tags
+12 -4
tools/perf/util/machine.c
··· 728 728 } 729 729 730 730 static int map_groups__set_modules_path_dir(struct map_groups *mg, 731 - const char *dir_name) 731 + const char *dir_name, int depth) 732 732 { 733 733 struct dirent *dent; 734 734 DIR *dir = opendir(dir_name); ··· 753 753 !strcmp(dent->d_name, "..")) 754 754 continue; 755 755 756 - ret = map_groups__set_modules_path_dir(mg, path); 756 + /* Do not follow top-level source and build symlinks */ 757 + if (depth == 0) { 758 + if (!strcmp(dent->d_name, "source") || 759 + !strcmp(dent->d_name, "build")) 760 + continue; 761 + } 762 + 763 + ret = map_groups__set_modules_path_dir(mg, path, 764 + depth + 1); 757 765 if (ret < 0) 758 766 goto out; 759 767 } else { ··· 805 797 if (!version) 806 798 return -1; 807 799 808 - snprintf(modules_path, sizeof(modules_path), "%s/lib/modules/%s/kernel", 800 + snprintf(modules_path, sizeof(modules_path), "%s/lib/modules/%s", 809 801 machine->root_dir, version); 810 802 free(version); 811 803 812 - return map_groups__set_modules_path_dir(&machine->kmaps, modules_path); 804 + return map_groups__set_modules_path_dir(&machine->kmaps, modules_path, 0); 813 805 } 814 806 815 807 static int machine__create_module(void *arg, const char *name, u64 start)