linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 0/2] perf/urgent fixes
@ 2014-01-23 19:38 Arnaldo Carvalho de Melo
  2014-01-23 19:38 ` [PATCH 1/2] perf tools: Fix traceevent plugin path definitions Arnaldo Carvalho de Melo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-01-23 19:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	David A. Long, Jiri Olsa, Josh Boyer, Masami Hiramatsu,
	Namhyung Kim, Oleg Nesterov, Srikar Dronamraju, Steven Rostedt,
	yrl.pp-manager.tt, Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>

Hi Ingo,

	Please consider pulling,

Regards,

- Arnaldo

The following changes since commit bb236de5d9509c1c6ea5ce0680f000002e731ee2:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2014-01-23 17:43:35 +0100)

are available in the git repository at:


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

for you to fetch changes up to 4afc81cd1caa93daa50c1c29a3ab747c978abc13:

  perf symbols: Load map before using map->map_ip() (2014-01-23 15:48:12 -0300)

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

. Fix traceevent plugin path definitions (Josh Boyer)

. Load map before using map->map_ip() (Masami Hiramatsu)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Josh Boyer (1):
      perf tools: Fix traceevent plugin path definitions

Masami Hiramatsu (1):
      perf symbols: Load map before using map->map_ip()

 tools/lib/traceevent/Makefile | 2 +-
 tools/perf/config/Makefile    | 2 +-
 tools/perf/util/map.c         | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

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

* [PATCH 1/2] perf tools: Fix traceevent plugin path definitions
  2014-01-23 19:38 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
@ 2014-01-23 19:38 ` Arnaldo Carvalho de Melo
  2014-01-23 19:38 ` [PATCH 2/2] perf symbols: Load map before using map->map_ip() Arnaldo Carvalho de Melo
  2014-01-25  7:23 ` [GIT PULL 0/2] perf/urgent fixes Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-01-23 19:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Josh Boyer, Ingo Molnar, Jiri Olsa, Steven Rostedt,
	Arnaldo Carvalho de Melo

From: Josh Boyer <jwboyer@fedoraproject.org>

The plugindir_SQ definition contains $(prefix) which is not needed as
the $(libdir) definition already contains prefix in it.  This leads to
the path including an extra prefix in it, e.g. /usr/usr/lib64.

The -DPLUGIN_DIR defintion includes DESTDIR.  This is incorrect, as it
sets the plugin search path to include the value of DESTDIR.  DESTDIR is
a mechanism to install in a non-standard location such as a chroot or an
RPM build root.  In the RPM case, this leads to the search path being
incorrect after the resulting RPM is installed (or in some cases an RPM
build failure).

Remove both of these unnecessary inclusions.

Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20140122150147.GK16455@hansolo.jdub.homelinux.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/Makefile | 2 +-
 tools/perf/config/Makefile    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile
index 56d52a33a3df..005c9cc06935 100644
--- a/tools/lib/traceevent/Makefile
+++ b/tools/lib/traceevent/Makefile
@@ -63,7 +63,7 @@ endif
 endif
 
 ifeq ($(set_plugin_dir),1)
-PLUGIN_DIR = -DPLUGIN_DIR="$(DESTDIR)/$(plugin_dir)"
+PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)"
 PLUGIN_DIR_SQ = '$(subst ','\'',$(PLUGIN_DIR))'
 endif
 
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index d604e50fc167..c48d44958172 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -600,5 +600,5 @@ perfexec_instdir_SQ = $(subst ','\'',$(perfexec_instdir))
 # Otherwise we install plugins into the global $(libdir).
 ifdef DESTDIR
 plugindir=$(libdir)/traceevent/plugins
-plugindir_SQ= $(subst ','\'',$(prefix)/$(plugindir))
+plugindir_SQ= $(subst ','\'',$(plugindir))
 endif
-- 
1.8.1.4


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

* [PATCH 2/2] perf symbols: Load map before using map->map_ip()
  2014-01-23 19:38 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
  2014-01-23 19:38 ` [PATCH 1/2] perf tools: Fix traceevent plugin path definitions Arnaldo Carvalho de Melo
@ 2014-01-23 19:38 ` Arnaldo Carvalho de Melo
  2014-01-25  7:23 ` [GIT PULL 0/2] perf/urgent fixes Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-01-23 19:38 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, David A. Long, David Ahern,
	Ingo Molnar, Namhyung Kim, Oleg Nesterov, Srikar Dronamraju,
	Steven Rostedt (Red Hat), yrl.pp-manager.tt,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

In map_groups__find_symbol() map->map_ip is used without ensuring the
map is loaded. Then the address passed to map->map_ip isn't mapped at
the first time.

E.g. below code always fails to get a symbol at the first call;

	addr = /* Somewhere in the kernel text */
	symbol_conf.try_vmlinux_path = true;
	symbol__init();
	host_machine = machine__new_host();
	sym = machine__find_kernel_function(host_machine,
					 addr, NULL, NULL);
	/* Note that machine__find_kernel_function calls
	   map_groups__find_symbol */

This ensures it by calling map__load before using it in
map_groups__find_symbol().

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: "David A. Long" <dave.long@linaro.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
Cc: yrl.pp-manager.tt@hitachi.com
Link: http://lkml.kernel.org/r/20140123022950.7206.17357.stgit@kbuild-fedora.yrl.intra.hitachi.co.jp
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/map.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index ee1dd687a262..3b97513f0e77 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -386,7 +386,8 @@ struct symbol *map_groups__find_symbol(struct map_groups *mg,
 {
 	struct map *map = map_groups__find(mg, type, addr);
 
-	if (map != NULL) {
+	/* Ensure map is loaded before using map->map_ip */
+	if (map != NULL && map__load(map, filter) >= 0) {
 		if (mapp != NULL)
 			*mapp = map;
 		return map__find_symbol(map, map->map_ip(map, addr), filter);
-- 
1.8.1.4


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

* Re: [GIT PULL 0/2] perf/urgent fixes
  2014-01-23 19:38 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
  2014-01-23 19:38 ` [PATCH 1/2] perf tools: Fix traceevent plugin path definitions Arnaldo Carvalho de Melo
  2014-01-23 19:38 ` [PATCH 2/2] perf symbols: Load map before using map->map_ip() Arnaldo Carvalho de Melo
@ 2014-01-25  7:23 ` Ingo Molnar
  2 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2014-01-25  7:23 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	David A. Long, Jiri Olsa, Josh Boyer, Masami Hiramatsu,
	Namhyung Kim, Oleg Nesterov, Srikar Dronamraju, Steven Rostedt,
	yrl.pp-manager.tt, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> 
> Hi Ingo,
> 
> 	Please consider pulling,
> 
> Regards,
> 
> - Arnaldo
> 
> The following changes since commit bb236de5d9509c1c6ea5ce0680f000002e731ee2:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent (2014-01-23 17:43:35 +0100)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-urgent-for-mingo
> 
> for you to fetch changes up to 4afc81cd1caa93daa50c1c29a3ab747c978abc13:
> 
>   perf symbols: Load map before using map->map_ip() (2014-01-23 15:48:12 -0300)
> 
> ----------------------------------------------------------------
> perf/urgent fixes:
> 
> . Fix traceevent plugin path definitions (Josh Boyer)
> 
> . Load map before using map->map_ip() (Masami Hiramatsu)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Josh Boyer (1):
>       perf tools: Fix traceevent plugin path definitions
> 
> Masami Hiramatsu (1):
>       perf symbols: Load map before using map->map_ip()
> 
>  tools/lib/traceevent/Makefile | 2 +-
>  tools/perf/config/Makefile    | 2 +-
>  tools/perf/util/map.c         | 3 ++-
>  3 files changed, 4 insertions(+), 3 deletions(-)

Pulled, thanks Arnaldo!

	Ingo

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-23 19:38 [GIT PULL 0/2] perf/urgent fixes Arnaldo Carvalho de Melo
2014-01-23 19:38 ` [PATCH 1/2] perf tools: Fix traceevent plugin path definitions Arnaldo Carvalho de Melo
2014-01-23 19:38 ` [PATCH 2/2] perf symbols: Load map before using map->map_ip() Arnaldo Carvalho de Melo
2014-01-25  7:23 ` [GIT PULL 0/2] perf/urgent fixes Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).