All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/7] perf/urgent fixes
@ 2014-04-30 15:32 Jiri Olsa
  2014-04-30 15:32 ` [PATCH 1/7] perf tools: Use LDFLAGS instead of ALL_LDFLAGS Jiri Olsa
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Jiri Olsa @ 2014-04-30 15:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Jiri Olsa,
	Mathias Krause, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Richard Yao, Xia Kaixu

hi Ingo,
please consider pulling

thanks,
jirka


The following changes since commit 9f7ff8931e3c5ddc8535476971ec9501e9555c05:

  perf/x86: Fix RAPL rdmsrl_safe() usage (2014-04-24 08:12:41 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-urgent-for-mingo

for you to fetch changes up to 9a126728165eef9b1e9349fe57b9747ac6c6f7e3:

  perf tests x86: Fix stack map lookup in dwarf unwind test (2014-04-30 17:02:31 +0200)

----------------------------------------------------------------
perf/urgent fixes:

. Fix perf to use non-executable stack, again (Mathias Krause)

. Remove extra '/' character in events file path (Xia Kaixu)

. Search for modules in %s/lib/modules/%s (Richard Yao)

. Build related fixies plus static build test (Jiri Olsa)

. Fix stack map lookup in dwarf unwind test (Jiri Olsa)

Signed-off-by: Jiri Olsa <jolsa@kernel.org>

----------------------------------------------------------------
Jiri Olsa (4):
      perf tools: Use LDFLAGS instead of ALL_LDFLAGS
      perf tools: Fix bfd dependency libraries detection
      perf tests: Add static build make test
      perf tests x86: Fix stack map lookup in dwarf unwind test

Mathias Krause (1):
      perf x86: Fix perf to use non-executable stack, again

Richard Yao (1):
      perf machine: Search for modules in %s/lib/modules/%s

Xia Kaixu (1):
      perf tools: Remove extra '/' character in events file path

 tools/lib/api/fs/debugfs.c               |  4 ++--
 tools/perf/Makefile.perf                 |  2 +-
 tools/perf/arch/x86/tests/dwarf-unwind.c |  2 +-
 tools/perf/arch/x86/tests/regs_load.S    |  8 ++++++-
 tools/perf/config/Makefile               | 38 +++++++++++++++++++++++---------
 tools/perf/tests/make                    |  2 ++
 tools/perf/util/machine.c                | 16 ++++++++++----
 7 files changed, 52 insertions(+), 20 deletions(-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/7] perf tools: Use LDFLAGS instead of ALL_LDFLAGS
  2014-04-30 15:32 [GIT PULL 0/7] perf/urgent fixes Jiri Olsa
@ 2014-04-30 15:32 ` Jiri Olsa
  2014-04-30 15:32 ` [PATCH 2/7] perf tools: Fix bfd dependency libraries detection Jiri Olsa
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jiri Olsa @ 2014-04-30 15:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra

We no longer use ALL_LDFLAGS, Replacing with LDFLAGS.

Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1398675770-3109-1-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/Makefile.perf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index e969233..895edd3 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -589,7 +589,7 @@ $(GTK_OBJS): $(OUTPUT)%.o: %.c $(LIB_H)
 	$(QUIET_CC)$(CC) -o $@ -c -fPIC $(CFLAGS) $(GTK_CFLAGS) $<
 
 $(OUTPUT)libperf-gtk.so: $(GTK_OBJS) $(PERFLIBS)
-	$(QUIET_LINK)$(CC) -o $@ -shared $(ALL_LDFLAGS) $(filter %.o,$^) $(GTK_LIBS)
+	$(QUIET_LINK)$(CC) -o $@ -shared $(LDFLAGS) $(filter %.o,$^) $(GTK_LIBS)
 
 $(OUTPUT)builtin-help.o: builtin-help.c $(OUTPUT)common-cmds.h $(OUTPUT)PERF-CFLAGS
 	$(QUIET_CC)$(CC) -o $@ -c $(CFLAGS) \
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/7] perf tools: Fix bfd dependency libraries detection
  2014-04-30 15:32 [GIT PULL 0/7] perf/urgent fixes Jiri Olsa
  2014-04-30 15:32 ` [PATCH 1/7] perf tools: Use LDFLAGS instead of ALL_LDFLAGS Jiri Olsa
@ 2014-04-30 15:32 ` Jiri Olsa
  2014-04-30 15:32 ` [PATCH 3/7] perf tests: Add static build make test Jiri Olsa
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jiri Olsa @ 2014-04-30 15:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra

There's false assumption in the library detection code
assuming -liberty and -lz are always present once bfd
is detected. The fails on Ubuntu (14.04) as reported
by Ingo.

Forcing the bdf dependency libraries detection any
time bfd library is detected.

Reported-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Ingo Molnar <mingo@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1398676935-6615-1-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/config/Makefile | 34 +++++++++++++++++++++++-----------
 1 file changed, 23 insertions(+), 11 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index a71fb39..a57d59e 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -194,7 +194,10 @@ VF_FEATURE_TESTS =			\
 	stackprotector-all		\
 	timerfd				\
 	libunwind-debug-frame		\
-	bionic
+	bionic				\
+	liberty				\
+	liberty-z			\
+	cplus-demangle
 
 # Set FEATURE_CHECK_(C|LD)FLAGS-all for all CORE_FEATURE_TESTS features.
 # If in the future we need per-feature checks/flags for features not
@@ -512,7 +515,21 @@ else
 endif
 
 ifeq ($(feature-libbfd), 1)
-  EXTLIBS += -lbfd -lz -liberty
+  EXTLIBS += -lbfd
+
+  # call all detections now so we get correct
+  # status in VF output
+  $(call feature_check,liberty)
+  $(call feature_check,liberty-z)
+  $(call feature_check,cplus-demangle)
+
+  ifeq ($(feature-liberty), 1)
+    EXTLIBS += -liberty
+  else
+    ifeq ($(feature-liberty-z), 1)
+      EXTLIBS += -liberty -lz
+    endif
+  endif
 endif
 
 ifdef NO_DEMANGLE
@@ -523,15 +540,10 @@ else
     CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
   else
     ifneq ($(feature-libbfd), 1)
-      $(call feature_check,liberty)
-      ifeq ($(feature-liberty), 1)
-        EXTLIBS += -lbfd -liberty
-      else
-        $(call feature_check,liberty-z)
-        ifeq ($(feature-liberty-z), 1)
-          EXTLIBS += -lbfd -liberty -lz
-        else
-          $(call feature_check,cplus-demangle)
+      ifneq ($(feature-liberty), 1)
+        ifneq ($(feature-liberty-z), 1)
+          # we dont have neither HAVE_CPLUS_DEMANGLE_SUPPORT
+          # or any of 'bfd iberty z' trinity
           ifeq ($(feature-cplus-demangle), 1)
             EXTLIBS += -liberty
             CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/7] perf tests: Add static build make test
  2014-04-30 15:32 [GIT PULL 0/7] perf/urgent fixes Jiri Olsa
  2014-04-30 15:32 ` [PATCH 1/7] perf tools: Use LDFLAGS instead of ALL_LDFLAGS Jiri Olsa
  2014-04-30 15:32 ` [PATCH 2/7] perf tools: Fix bfd dependency libraries detection Jiri Olsa
@ 2014-04-30 15:32 ` Jiri Olsa
  2014-04-30 15:32 ` [PATCH 4/7] perf machine: Search for modules in %s/lib/modules/%s Jiri Olsa
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jiri Olsa @ 2014-04-30 15:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra

Adding test for building static perf build into the automated
suite. Also available via following commands:

  $ make -f tests/make make_static
  - make_static: cd . && make -f Makefile DESTDIR=/tmp/tmp.7u5MlB4njo LDFLAGS=-static
  $ make -f tests/make make_static_O
  - make_static_O: cd . && make -f Makefile O=/tmp/tmp.Ay6r3wEmtX DESTDIR=/tmp/tmp.vK0KQwO0Vi LDFLAGS=-static

Acked-by: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1398760413-7574-1-git-send-email-jolsa@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/tests/make | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/tests/make b/tools/perf/tests/make
index 5daeae1..2f92d6e 100644
--- a/tools/perf/tests/make
+++ b/tools/perf/tests/make
@@ -46,6 +46,7 @@ make_install_man    := install-man
 make_install_html   := install-html
 make_install_info   := install-info
 make_install_pdf    := install-pdf
+make_static         := LDFLAGS=-static
 
 # all the NO_* variable combined
 make_minimal        := NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1
@@ -87,6 +88,7 @@ run += make_install_bin
 # run += make_install_info
 # run += make_install_pdf
 run += make_minimal
+run += make_static
 
 ifneq ($(call has,ctags),)
 run += make_tags
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/7] perf machine: Search for modules in %s/lib/modules/%s
  2014-04-30 15:32 [GIT PULL 0/7] perf/urgent fixes Jiri Olsa
                   ` (2 preceding siblings ...)
  2014-04-30 15:32 ` [PATCH 3/7] perf tests: Add static build make test Jiri Olsa
@ 2014-04-30 15:32 ` Jiri Olsa
  2014-04-30 15:32 ` [PATCH 5/7] perf tools: Remove extra '/' character in events file path Jiri Olsa
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jiri Olsa @ 2014-04-30 15:32 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Richard Yao, Jiri Olsa

From: Richard Yao <ryao@gentoo.org>

Modules installed outside of the kernel's build system should go into
"%s/lib/modules/%s/extra", but at present, perf will only look at them
when they are in "%s/lib/modules/%s/kernel". Lets encourage good
citizenship by relaxing this requirement to "%s/lib/modules/%s". This
way open source modules that are out-of-tree have no incentive to start
populating a directory reserved for in-kernel modules and I can stop
hex-editing my system's perf binary when profiling OSS out-of-tree
modules.

Feedback from Namhyung Kim correctly revealed that the hex-edits that I
had been doing meant that perf was also traversing the build and source
symlinks in %s/lib/modules/%s. That is undesireable, so we explicitly
exclude them from traversal with a minor tweak to the traversal routine.

Signed-off-by: Richard Yao <ryao@gentoo.org>
Acked-by: Namhyung kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1398532675-13684-1-git-send-email-ryao@gentoo.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/util/machine.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index a53cd0b..27c2a5e 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -717,7 +717,7 @@ static char *get_kernel_version(const char *root_dir)
 }
 
 static int map_groups__set_modules_path_dir(struct map_groups *mg,
-				const char *dir_name)
+				const char *dir_name, int depth)
 {
 	struct dirent *dent;
 	DIR *dir = opendir(dir_name);
@@ -742,7 +742,15 @@ static int map_groups__set_modules_path_dir(struct map_groups *mg,
 			    !strcmp(dent->d_name, ".."))
 				continue;
 
-			ret = map_groups__set_modules_path_dir(mg, path);
+			/* Do not follow top-level source and build symlinks */
+			if (depth == 0) {
+				if (!strcmp(dent->d_name, "source") ||
+				    !strcmp(dent->d_name, "build"))
+					continue;
+			}
+
+			ret = map_groups__set_modules_path_dir(mg, path,
+							       depth + 1);
 			if (ret < 0)
 				goto out;
 		} else {
@@ -786,11 +794,11 @@ static int machine__set_modules_path(struct machine *machine)
 	if (!version)
 		return -1;
 
-	snprintf(modules_path, sizeof(modules_path), "%s/lib/modules/%s/kernel",
+	snprintf(modules_path, sizeof(modules_path), "%s/lib/modules/%s",
 		 machine->root_dir, version);
 	free(version);
 
-	return map_groups__set_modules_path_dir(&machine->kmaps, modules_path);
+	return map_groups__set_modules_path_dir(&machine->kmaps, modules_path, 0);
 }
 
 static int machine__create_module(void *arg, const char *name, u64 start)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/7] perf tools: Remove extra '/' character in events file path
  2014-04-30 15:32 [GIT PULL 0/7] perf/urgent fixes Jiri Olsa
                   ` (3 preceding siblings ...)
  2014-04-30 15:32 ` [PATCH 4/7] perf machine: Search for modules in %s/lib/modules/%s Jiri Olsa
@ 2014-04-30 15:32 ` Jiri Olsa
  2014-04-30 15:32 ` [PATCH 6/7] perf x86: Fix perf to use non-executable stack, again Jiri Olsa
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Jiri Olsa @ 2014-04-30 15:32 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Xia Kaixu, Jiri Olsa

From: Xia Kaixu <xiakaixu@huawei.com>

The array debugfs_known_mountpoints[] will cause extra '/'
character output.
Remove it.

pre:
$ perf probe -l
/sys/kernel/debug//tracing/uprobe_events file does not exist -
please rebuild kernel with CONFIG_UPROBE_EVENTS.

post:
$ perf probe -l
/sys/kernel/debug/tracing/uprobe_events file does not exist -
please rebuild kernel with CONFIG_UPROBE_EVENTS.

Signed-off-by: Xia Kaixu <xiakaixu@huawei.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/535B6660.2060001@huawei.com
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/lib/api/fs/debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/lib/api/fs/debugfs.c b/tools/lib/api/fs/debugfs.c
index 7c43479..a74fba6 100644
--- a/tools/lib/api/fs/debugfs.c
+++ b/tools/lib/api/fs/debugfs.c
@@ -12,8 +12,8 @@
 char debugfs_mountpoint[PATH_MAX + 1] = "/sys/kernel/debug";
 
 static const char * const debugfs_known_mountpoints[] = {
-	"/sys/kernel/debug/",
-	"/debug/",
+	"/sys/kernel/debug",
+	"/debug",
 	0,
 };
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/7] perf x86: Fix perf to use non-executable stack, again
  2014-04-30 15:32 [GIT PULL 0/7] perf/urgent fixes Jiri Olsa
                   ` (4 preceding siblings ...)
  2014-04-30 15:32 ` [PATCH 5/7] perf tools: Remove extra '/' character in events file path Jiri Olsa
@ 2014-04-30 15:32 ` Jiri Olsa
  2014-04-30 15:32 ` [PATCH 7/7] perf tests x86: Fix stack map lookup in dwarf unwind test Jiri Olsa
  2014-05-01  6:25 ` [GIT PULL 0/7] perf/urgent fixes Ingo Molnar
  7 siblings, 0 replies; 9+ messages in thread
From: Jiri Olsa @ 2014-04-30 15:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Mathias Krause, Arnaldo Carvalho de Melo,
	Paul Mackerras, Peter Zijlstra, Jiri Olsa

From: Mathias Krause <minipli@googlemail.com>

arch/x86/tests/regs_load.S is missing the linker note about the stack
requirements, therefore making the linker fall back to an executable
stack. As this object gets linked against the final perf binary, it'll
needlessly end up with an executable stack. Fix this by adding the
appropriate linker note.

Also add a global linker flag to prevent future regressions, as
suggested by Jiri. This way perf won't get an executable stack even if
we fail to add the .GNU-stack linker note to future assembler files.
Though, doing so might create regressions the other way around, when
(statically) linking against libraries needing an executable stack.
But, apparently, regressing in that direction is wanted as it is an
indicator of poor code quality -- or just missing linker notes.

Fixes: 3c8b06f981 ("perf tests x86: Introduce perf_regs_load function")

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1398617466-22749-1-git-send-email-minipli@googlemail.com
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/arch/x86/tests/regs_load.S | 8 +++++++-
 tools/perf/config/Makefile            | 4 ++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/tools/perf/arch/x86/tests/regs_load.S b/tools/perf/arch/x86/tests/regs_load.S
index 99167bf..60875d5 100644
--- a/tools/perf/arch/x86/tests/regs_load.S
+++ b/tools/perf/arch/x86/tests/regs_load.S
@@ -1,4 +1,3 @@
-
 #include <linux/linkage.h>
 
 #define AX	 0
@@ -90,3 +89,10 @@ ENTRY(perf_regs_load)
 	ret
 ENDPROC(perf_regs_load)
 #endif
+
+/*
+ * We need to provide note.GNU-stack section, saying that we want
+ * NOT executable stack. Otherwise the final linking will assume that
+ * the ELF stack should not be restricted at all and set it RWX.
+ */
+.section .note.GNU-stack,"",@progbits
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index a57d59e..802cf54 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -117,6 +117,10 @@ CFLAGS += -Wall
 CFLAGS += -Wextra
 CFLAGS += -std=gnu99
 
+# Enforce a non-executable stack, as we may regress (again) in the future by
+# adding assembler files missing the .GNU-stack linker note.
+LDFLAGS += -Wl,-z,noexecstack
+
 EXTLIBS = -lelf -lpthread -lrt -lm -ldl
 
 ifneq ($(OUTPUT),)
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 7/7] perf tests x86: Fix stack map lookup in dwarf unwind test
  2014-04-30 15:32 [GIT PULL 0/7] perf/urgent fixes Jiri Olsa
                   ` (5 preceding siblings ...)
  2014-04-30 15:32 ` [PATCH 6/7] perf x86: Fix perf to use non-executable stack, again Jiri Olsa
@ 2014-04-30 15:32 ` Jiri Olsa
  2014-05-01  6:25 ` [GIT PULL 0/7] perf/urgent fixes Ingo Molnar
  7 siblings, 0 replies; 9+ messages in thread
From: Jiri Olsa @ 2014-04-30 15:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Jiri Olsa, Corey Ashford, David Ahern,
	Frederic Weisbecker, Namhyung Kim, Paul Mackerras, Peter Zijlstra,
	Arnaldo Carvalho de Melo, Jean Pihet

Previous commit 'perf x86: Fix perf to use non-executable stack, again'
moved stack map into MAP__VARIABLE map type again. Fixing the dwarf
unwind test stack map lookup appropriately.

Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/n/tip-ttzyhbe4zls24z7ednkmhvxl@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/arch/x86/tests/dwarf-unwind.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/arch/x86/tests/dwarf-unwind.c b/tools/perf/arch/x86/tests/dwarf-unwind.c
index b8c0102..83bc238 100644
--- a/tools/perf/arch/x86/tests/dwarf-unwind.c
+++ b/tools/perf/arch/x86/tests/dwarf-unwind.c
@@ -23,7 +23,7 @@ static int sample_ustack(struct perf_sample *sample,
 
 	sp = (unsigned long) regs[PERF_REG_X86_SP];
 
-	map = map_groups__find(&thread->mg, MAP__FUNCTION, (u64) sp);
+	map = map_groups__find(&thread->mg, MAP__VARIABLE, (u64) sp);
 	if (!map) {
 		pr_debug("failed to get stack map\n");
 		free(buf);
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [GIT PULL 0/7] perf/urgent fixes
  2014-04-30 15:32 [GIT PULL 0/7] perf/urgent fixes Jiri Olsa
                   ` (6 preceding siblings ...)
  2014-04-30 15:32 ` [PATCH 7/7] perf tests x86: Fix stack map lookup in dwarf unwind test Jiri Olsa
@ 2014-05-01  6:25 ` Ingo Molnar
  7 siblings, 0 replies; 9+ messages in thread
From: Ingo Molnar @ 2014-05-01  6:25 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Jean Pihet, Mathias Krause,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Richard Yao,
	Xia Kaixu


* Jiri Olsa <jolsa@kernel.org> wrote:

> hi Ingo,
> please consider pulling
> 
> thanks,
> jirka
> 
> 
> The following changes since commit 9f7ff8931e3c5ddc8535476971ec9501e9555c05:
> 
>   perf/x86: Fix RAPL rdmsrl_safe() usage (2014-04-24 08:12:41 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to 9a126728165eef9b1e9349fe57b9747ac6c6f7e3:
> 
>   perf tests x86: Fix stack map lookup in dwarf unwind test (2014-04-30 17:02:31 +0200)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> . Fix perf to use non-executable stack, again (Mathias Krause)
> 
> . Remove extra '/' character in events file path (Xia Kaixu)
> 
> . Search for modules in %s/lib/modules/%s (Richard Yao)
> 
> . Build related fixies plus static build test (Jiri Olsa)
> 
> . Fix stack map lookup in dwarf unwind test (Jiri Olsa)
> 
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> 
> ----------------------------------------------------------------
> Jiri Olsa (4):
>       perf tools: Use LDFLAGS instead of ALL_LDFLAGS
>       perf tools: Fix bfd dependency libraries detection
>       perf tests: Add static build make test
>       perf tests x86: Fix stack map lookup in dwarf unwind test
> 
> Mathias Krause (1):
>       perf x86: Fix perf to use non-executable stack, again
> 
> Richard Yao (1):
>       perf machine: Search for modules in %s/lib/modules/%s
> 
> Xia Kaixu (1):
>       perf tools: Remove extra '/' character in events file path
> 
>  tools/lib/api/fs/debugfs.c               |  4 ++--
>  tools/perf/Makefile.perf                 |  2 +-
>  tools/perf/arch/x86/tests/dwarf-unwind.c |  2 +-
>  tools/perf/arch/x86/tests/regs_load.S    |  8 ++++++-
>  tools/perf/config/Makefile               | 38 +++++++++++++++++++++++---------
>  tools/perf/tests/make                    |  2 ++
>  tools/perf/util/machine.c                | 16 ++++++++++----
>  7 files changed, 52 insertions(+), 20 deletions(-)

Pulled, thanks a lot Jiri!

	Ingo

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-05-01  6:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30 15:32 [GIT PULL 0/7] perf/urgent fixes Jiri Olsa
2014-04-30 15:32 ` [PATCH 1/7] perf tools: Use LDFLAGS instead of ALL_LDFLAGS Jiri Olsa
2014-04-30 15:32 ` [PATCH 2/7] perf tools: Fix bfd dependency libraries detection Jiri Olsa
2014-04-30 15:32 ` [PATCH 3/7] perf tests: Add static build make test Jiri Olsa
2014-04-30 15:32 ` [PATCH 4/7] perf machine: Search for modules in %s/lib/modules/%s Jiri Olsa
2014-04-30 15:32 ` [PATCH 5/7] perf tools: Remove extra '/' character in events file path Jiri Olsa
2014-04-30 15:32 ` [PATCH 6/7] perf x86: Fix perf to use non-executable stack, again Jiri Olsa
2014-04-30 15:32 ` [PATCH 7/7] perf tests x86: Fix stack map lookup in dwarf unwind test Jiri Olsa
2014-05-01  6:25 ` [GIT PULL 0/7] perf/urgent fixes Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.