All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi()
@ 2014-04-07  7:05 Namhyung Kim
  2014-04-07 23:48 ` Masami Hiramatsu
  2014-04-14 14:53 ` [tip:perf/urgent] " tip-bot for Namhyung Kim
  0 siblings, 2 replies; 3+ messages in thread
From: Namhyung Kim @ 2014-04-07  7:05 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: Peter Zijlstra, Ingo Molnar, Paul Mackerras, Namhyung Kim,
	Namhyung Kim, LKML, Masami Hiramatsu

The dwarf_getcfi() only checks .debug_frame section for CFI, but as
most binaries only have .eh_frame it'd return NULL and it makes
some variables inaccessible.

Using dwarf_getcfi_elf (along with dwarf_getelf()) allows to show and
add probe to more variables.

Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/util/probe-finder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 3bf0c8cdccb7..d58da0672736 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -985,7 +985,7 @@ static int debuginfo__find_probes(struct debuginfo *dbg,
 
 #if _ELFUTILS_PREREQ(0, 142)
 	/* Get the call frame information from this dwarf */
-	pf->cfi = dwarf_getcfi(dbg->dbg);
+	pf->cfi = dwarf_getcfi_elf(dwarf_getelf(dbg->dbg));
 #endif
 
 	off = 0;
-- 
1.7.11.7


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

* Re: [PATCH] perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi()
  2014-04-07  7:05 [PATCH] perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi() Namhyung Kim
@ 2014-04-07 23:48 ` Masami Hiramatsu
  2014-04-14 14:53 ` [tip:perf/urgent] " tip-bot for Namhyung Kim
  1 sibling, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2014-04-07 23:48 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Arnaldo Carvalho de Melo, Jiri Olsa, Peter Zijlstra, Ingo Molnar,
	Paul Mackerras, Namhyung Kim, LKML

(2014/04/07 16:05), Namhyung Kim wrote:
> The dwarf_getcfi() only checks .debug_frame section for CFI, but as
> most binaries only have .eh_frame it'd return NULL and it makes
> some variables inaccessible.
> 
> Using dwarf_getcfi_elf (along with dwarf_getelf()) allows to show and
> add probe to more variables.
> 
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Thank you for fixing :)

Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

> ---
>  tools/perf/util/probe-finder.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
> index 3bf0c8cdccb7..d58da0672736 100644
> --- a/tools/perf/util/probe-finder.c
> +++ b/tools/perf/util/probe-finder.c
> @@ -985,7 +985,7 @@ static int debuginfo__find_probes(struct debuginfo *dbg,
>  
>  #if _ELFUTILS_PREREQ(0, 142)
>  	/* Get the call frame information from this dwarf */
> -	pf->cfi = dwarf_getcfi(dbg->dbg);
> +	pf->cfi = dwarf_getcfi_elf(dwarf_getelf(dbg->dbg));
>  #endif
>  
>  	off = 0;
> 


-- 
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



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

* [tip:perf/urgent] perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi()
  2014-04-07  7:05 [PATCH] perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi() Namhyung Kim
  2014-04-07 23:48 ` Masami Hiramatsu
@ 2014-04-14 14:53 ` tip-bot for Namhyung Kim
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Namhyung Kim @ 2014-04-14 14:53 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, masami.hiramatsu.pt, tglx, namhyung, jolsa

Commit-ID:  03d89412981a7681971bc77edba1669595763030
Gitweb:     http://git.kernel.org/tip/03d89412981a7681971bc77edba1669595763030
Author:     Namhyung Kim <namhyung@kernel.org>
AuthorDate: Mon, 7 Apr 2014 16:05:48 +0900
Committer:  Jiri Olsa <jolsa@redhat.com>
CommitDate: Mon, 14 Apr 2014 12:55:40 +0200

perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi()

The dwarf_getcfi() only checks .debug_frame section for CFI, but as
most binaries only have .eh_frame it'd return NULL and it makes
some variables inaccessible.

Using dwarf_getcfi_elf (along with dwarf_getelf()) allows to show and
add probe to more variables.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Link: http://lkml.kernel.org/r/1396854348-9296-1-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
 tools/perf/util/probe-finder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index fae274e..5627621 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -985,7 +985,7 @@ static int debuginfo__find_probes(struct debuginfo *dbg,
 
 #if _ELFUTILS_PREREQ(0, 142)
 	/* Get the call frame information from this dwarf */
-	pf->cfi = dwarf_getcfi(dbg->dbg);
+	pf->cfi = dwarf_getcfi_elf(dwarf_getelf(dbg->dbg));
 #endif
 
 	off = 0;

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

end of thread, other threads:[~2014-04-14 14:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-07  7:05 [PATCH] perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi() Namhyung Kim
2014-04-07 23:48 ` Masami Hiramatsu
2014-04-14 14:53 ` [tip:perf/urgent] " tip-bot for Namhyung Kim

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.