public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf: unwind: use the dwarf info only if loaded
@ 2013-12-16 16:43 Jean Pihet
  2013-12-18 14:44 ` Jiri Olsa
  2014-01-14 16:41 ` [tip:perf/core] perf tools: Use the DWARF unwind " tip-bot for Jean Pihet
  0 siblings, 2 replies; 3+ messages in thread
From: Jean Pihet @ 2013-12-16 16:43 UTC (permalink / raw)
  To: linux-kernel, linaro-kernel, Jiri Olsa, Ingo Molnar, Arnaldo
  Cc: patches, Will Deacon, Jean Pihet

Use the info only if it has been found in the .debug_frame
section of the ELF binary.

Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
---
 tools/perf/util/unwind.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/unwind.c b/tools/perf/util/unwind.c
index 0efd539..416f22b 100644
--- a/tools/perf/util/unwind.c
+++ b/tools/perf/util/unwind.c
@@ -340,10 +340,10 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
 	/* Check the .debug_frame section for unwinding info */
 	if (!read_unwind_spec_debug_frame(map->dso, ui->machine, &segbase)) {
 		memset(&di, 0, sizeof(di));
-		dwarf_find_debug_frame(0, &di, ip, 0, map->dso->name,
-				       map->start, map->end);
-		return dwarf_search_unwind_table(as, ip, &di, pi,
-						 need_unwind_info, arg);
+		if (dwarf_find_debug_frame(0, &di, ip, 0, map->dso->name,
+					   map->start, map->end))
+			return dwarf_search_unwind_table(as, ip, &di, pi,
+							 need_unwind_info, arg);
 	}
 #endif
 
-- 
1.7.11.7


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

* Re: [PATCH] perf: unwind: use the dwarf info only if loaded
  2013-12-16 16:43 [PATCH] perf: unwind: use the dwarf info only if loaded Jean Pihet
@ 2013-12-18 14:44 ` Jiri Olsa
  2014-01-14 16:41 ` [tip:perf/core] perf tools: Use the DWARF unwind " tip-bot for Jean Pihet
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2013-12-18 14:44 UTC (permalink / raw)
  To: Jean Pihet
  Cc: linux-kernel, linaro-kernel, Ingo Molnar, Arnaldo, patches,
	Will Deacon

On Mon, Dec 16, 2013 at 05:43:14PM +0100, Jean Pihet wrote:
> Use the info only if it has been found in the .debug_frame
> section of the ELF binary.
> 
> Signed-off-by: Jean Pihet <jean.pihet@linaro.org>

I couldn't test, but it looks ok

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka

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

* [tip:perf/core] perf tools: Use the DWARF unwind info only if loaded
  2013-12-16 16:43 [PATCH] perf: unwind: use the dwarf info only if loaded Jean Pihet
  2013-12-18 14:44 ` Jiri Olsa
@ 2014-01-14 16:41 ` tip-bot for Jean Pihet
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Jean Pihet @ 2014-01-14 16:41 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, hpa, mingo, will.deacon, jean.pihet, jolsa,
	tglx

Commit-ID:  d11416e76b3e2f60ed6cfa7c532d3b6777f66527
Gitweb:     http://git.kernel.org/tip/d11416e76b3e2f60ed6cfa7c532d3b6777f66527
Author:     Jean Pihet <jean.pihet@linaro.org>
AuthorDate: Mon, 16 Dec 2013 17:43:14 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 13 Jan 2014 10:06:26 -0300

perf tools: Use the DWARF unwind info only if loaded

Use the info only if it has been found in the .debug_frame section of
the ELF binary.

Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: linaro-kernel@lists.linaro.org
Cc: patches@linaro.org
Link: http://lkml.kernel.org/r/1387212194-8028-1-git-send-email-jean.pihet@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/unwind.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/perf/util/unwind.c b/tools/perf/util/unwind.c
index 0efd539..416f22b 100644
--- a/tools/perf/util/unwind.c
+++ b/tools/perf/util/unwind.c
@@ -340,10 +340,10 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
 	/* Check the .debug_frame section for unwinding info */
 	if (!read_unwind_spec_debug_frame(map->dso, ui->machine, &segbase)) {
 		memset(&di, 0, sizeof(di));
-		dwarf_find_debug_frame(0, &di, ip, 0, map->dso->name,
-				       map->start, map->end);
-		return dwarf_search_unwind_table(as, ip, &di, pi,
-						 need_unwind_info, arg);
+		if (dwarf_find_debug_frame(0, &di, ip, 0, map->dso->name,
+					   map->start, map->end))
+			return dwarf_search_unwind_table(as, ip, &di, pi,
+							 need_unwind_info, arg);
 	}
 #endif
 

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

end of thread, other threads:[~2014-01-14 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-16 16:43 [PATCH] perf: unwind: use the dwarf info only if loaded Jean Pihet
2013-12-18 14:44 ` Jiri Olsa
2014-01-14 16:41 ` [tip:perf/core] perf tools: Use the DWARF unwind " tip-bot for Jean Pihet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox