Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-12 Thread Jiri Olsa
On Mon, Sep 09, 2013 at 12:00:15PM +0200, Jean Pihet wrote: > On ARM the debug info is not present in the .eh_frame sections but > in .debug_frame instead, in the dwarf format. > Use libunwind to load and parse the debug info. > > Dependencies: > . if present, libunwind >= 1.1 is needed to

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-12 Thread Jiri Olsa
On Mon, Sep 09, 2013 at 12:00:15PM +0200, Jean Pihet wrote: On ARM the debug info is not present in the .eh_frame sections but in .debug_frame instead, in the dwarf format. Use libunwind to load and parse the debug info. Dependencies: . if present, libunwind = 1.1 is needed to prevent a

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-10 Thread Jean Pihet
On 10 September 2013 21:14, David Ahern wrote: > On 9/9/13 3:00 AM, Jean Pihet wrote: >> >> diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile >> index 7014373..54532b8 100644 >> --- a/tools/perf/config/Makefile >> +++ b/tools/perf/config/Makefile >> @@ -222,7 +222,7 @@ endif >>

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-10 Thread David Ahern
On 9/9/13 3:00 AM, Jean Pihet wrote: diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 7014373..54532b8 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -222,7 +222,7 @@ endif FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(CFLAGS) $(LIBUNWIND_LDFLAGS)

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-10 Thread David Ahern
On 9/9/13 3:00 AM, Jean Pihet wrote: diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 7014373..54532b8 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -222,7 +222,7 @@ endif FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(CFLAGS) $(LIBUNWIND_LDFLAGS)

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-10 Thread Jean Pihet
On 10 September 2013 21:14, David Ahern dsah...@gmail.com wrote: On 9/9/13 3:00 AM, Jean Pihet wrote: diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 7014373..54532b8 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -222,7 +222,7 @@

[PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-09 Thread Jean Pihet
On ARM the debug info is not present in the .eh_frame sections but in .debug_frame instead, in the dwarf format. Use libunwind to load and parse the debug info. Dependencies: . if present, libunwind >= 1.1 is needed to prevent a segfault when parsing the dwarf info, . libunwind needs to be

[PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-09 Thread Jean Pihet
On ARM the debug info is not present in the .eh_frame sections but in .debug_frame instead, in the dwarf format. Use libunwind to load and parse the debug info. Dependencies: . if present, libunwind = 1.1 is needed to prevent a segfault when parsing the dwarf info, . libunwind needs to be

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-06 Thread Jean Pihet
On 6 September 2013 12:17, Jiri Olsa wrote: > On Fri, Sep 06, 2013 at 11:31:17AM +0200, Jean Pihet wrote: >> Hi Jiri, >> >> On 5 September 2013 18:30, Jiri Olsa wrote: >> > On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: >> >> On ARM the debug info is not present in the .eh_frame

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-06 Thread Jiri Olsa
On Fri, Sep 06, 2013 at 11:31:17AM +0200, Jean Pihet wrote: > Hi Jiri, > > On 5 September 2013 18:30, Jiri Olsa wrote: > > On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: > >> On ARM the debug info is not present in the .eh_frame sections but > >> instead in .debug_frame. > >> Use

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-06 Thread Jiri Olsa
On Thu, Sep 05, 2013 at 06:49:13PM +0200, Jean Pihet wrote: > Hi Jiri, > > On 5 September 2013 18:30, Jiri Olsa wrote: > > On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: > >> On ARM the debug info is not present in the .eh_frame sections but > >> instead in .debug_frame. > >> Use

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-06 Thread Jean Pihet
Hi Jiri, On 5 September 2013 18:30, Jiri Olsa wrote: > On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: >> On ARM the debug info is not present in the .eh_frame sections but >> instead in .debug_frame. >> Use libunwind to load and parse the debug info. > > hum, cannot make final link:

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-06 Thread Jean Pihet
Hi Jiri, On 5 September 2013 18:30, Jiri Olsa jo...@redhat.com wrote: On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: On ARM the debug info is not present in the .eh_frame sections but instead in .debug_frame. Use libunwind to load and parse the debug info. hum, cannot make

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-06 Thread Jiri Olsa
On Thu, Sep 05, 2013 at 06:49:13PM +0200, Jean Pihet wrote: Hi Jiri, On 5 September 2013 18:30, Jiri Olsa jo...@redhat.com wrote: On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: On ARM the debug info is not present in the .eh_frame sections but instead in .debug_frame. Use

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-06 Thread Jiri Olsa
On Fri, Sep 06, 2013 at 11:31:17AM +0200, Jean Pihet wrote: Hi Jiri, On 5 September 2013 18:30, Jiri Olsa jo...@redhat.com wrote: On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: On ARM the debug info is not present in the .eh_frame sections but instead in .debug_frame. Use

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-06 Thread Jean Pihet
On 6 September 2013 12:17, Jiri Olsa jo...@redhat.com wrote: On Fri, Sep 06, 2013 at 11:31:17AM +0200, Jean Pihet wrote: Hi Jiri, On 5 September 2013 18:30, Jiri Olsa jo...@redhat.com wrote: On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: On ARM the debug info is not present in

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Jean Pihet
Hi Jiri, On 5 September 2013 18:30, Jiri Olsa wrote: > On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: >> On ARM the debug info is not present in the .eh_frame sections but >> instead in .debug_frame. >> Use libunwind to load and parse the debug info. > > hum, cannot make final link:

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Jiri Olsa
On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: > On ARM the debug info is not present in the .eh_frame sections but > instead in .debug_frame. > Use libunwind to load and parse the debug info. hum, cannot make final link: $ make LIBUNWIND_DIR=/opt/libunwind/ CHK

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Ard Biesheuvel
On 5 September 2013 17:29, Jean Pihet wrote: [...] > The segfault is caused by libunwind. With the latest version [1], > dwarf unwinding works fine. > Investigation on-going, more to come! > > [1] git://git.sv.gnu.org/libunwind.git > I managed to get it to work by upgrading to Ubuntu Saucy's

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Jean Pihet
Hi, On 5 September 2013 15:33, Jean Pihet wrote: > On 5 September 2013 15:19, Will Deacon wrote: >> On Thu, Sep 05, 2013 at 02:17:30PM +0100, Ard Biesheuvel wrote: >>> On 5 September 2013 15:05, Jean Pihet wrote: >>> [..] >>> > Here are the commands I have been using: >>> > perf record -g

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Jean Pihet
On 5 September 2013 15:19, Will Deacon wrote: > On Thu, Sep 05, 2013 at 02:17:30PM +0100, Ard Biesheuvel wrote: >> On 5 September 2013 15:05, Jean Pihet wrote: >> [..] >> > Here are the commands I have been using: >> > perf record -g dwarf -- >> > perf report --sort symbol --call-graph

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Will Deacon
On Thu, Sep 05, 2013 at 02:17:30PM +0100, Ard Biesheuvel wrote: > On 5 September 2013 15:05, Jean Pihet wrote: > [..] > > Here are the commands I have been using: > > perf record -g dwarf -- > > perf report --sort symbol --call-graph --stdio > > > > Ah, I failed to add the 'dwarf' after -g,

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Ard Biesheuvel
On 5 September 2013 15:05, Jean Pihet wrote: [..] > Here are the commands I have been using: > perf record -g dwarf -- > perf report --sort symbol --call-graph --stdio > Ah, I failed to add the 'dwarf' after -g, however, in that case, my perf report segfaults: #0 locate_debug_info

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Ard Biesheuvel
On 5 September 2013 14:45, Will Deacon wrote: > Hi Jean, > > [adding Michael, since I know he was interested in this] > > On Wed, Sep 04, 2013 at 07:04:14PM +0100, Jean Pihet wrote: >> On ARM the debug info is not present in the .eh_frame sections but >> instead in .debug_frame. >> Use libunwind

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Jean Pihet
Hi Will, On Thu, Sep 5, 2013 at 2:45 PM, Will Deacon wrote: > Hi Jean, > > [adding Michael, since I know he was interested in this] > > On Wed, Sep 04, 2013 at 07:04:14PM +0100, Jean Pihet wrote: >> On ARM the debug info is not present in the .eh_frame sections but >> instead in .debug_frame.

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Will Deacon
Hi Jean, [adding Michael, since I know he was interested in this] On Wed, Sep 04, 2013 at 07:04:14PM +0100, Jean Pihet wrote: > On ARM the debug info is not present in the .eh_frame sections but > instead in .debug_frame. > Use libunwind to load and parse the debug info. How have you tested

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Will Deacon
Hi Jean, [adding Michael, since I know he was interested in this] On Wed, Sep 04, 2013 at 07:04:14PM +0100, Jean Pihet wrote: On ARM the debug info is not present in the .eh_frame sections but instead in .debug_frame. Use libunwind to load and parse the debug info. How have you tested this?

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Jean Pihet
Hi Will, On Thu, Sep 5, 2013 at 2:45 PM, Will Deacon will.dea...@arm.com wrote: Hi Jean, [adding Michael, since I know he was interested in this] On Wed, Sep 04, 2013 at 07:04:14PM +0100, Jean Pihet wrote: On ARM the debug info is not present in the .eh_frame sections but instead in

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Ard Biesheuvel
On 5 September 2013 14:45, Will Deacon will.dea...@arm.com wrote: Hi Jean, [adding Michael, since I know he was interested in this] On Wed, Sep 04, 2013 at 07:04:14PM +0100, Jean Pihet wrote: On ARM the debug info is not present in the .eh_frame sections but instead in .debug_frame. Use

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Ard Biesheuvel
On 5 September 2013 15:05, Jean Pihet jean.pi...@newoldbits.com wrote: [..] Here are the commands I have been using: perf record -g dwarf -- binary to profile perf report --sort symbol --call-graph --stdio Ah, I failed to add the 'dwarf' after -g, however, in that case, my perf report

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Will Deacon
On Thu, Sep 05, 2013 at 02:17:30PM +0100, Ard Biesheuvel wrote: On 5 September 2013 15:05, Jean Pihet jean.pi...@newoldbits.com wrote: [..] Here are the commands I have been using: perf record -g dwarf -- binary to profile perf report --sort symbol --call-graph --stdio Ah, I failed

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Jean Pihet
On 5 September 2013 15:19, Will Deacon will.dea...@arm.com wrote: On Thu, Sep 05, 2013 at 02:17:30PM +0100, Ard Biesheuvel wrote: On 5 September 2013 15:05, Jean Pihet jean.pi...@newoldbits.com wrote: [..] Here are the commands I have been using: perf record -g dwarf -- binary to profile

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Jean Pihet
Hi, On 5 September 2013 15:33, Jean Pihet jean.pi...@linaro.org wrote: On 5 September 2013 15:19, Will Deacon will.dea...@arm.com wrote: On Thu, Sep 05, 2013 at 02:17:30PM +0100, Ard Biesheuvel wrote: On 5 September 2013 15:05, Jean Pihet jean.pi...@newoldbits.com wrote: [..] Here are the

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Ard Biesheuvel
On 5 September 2013 17:29, Jean Pihet jean.pi...@linaro.org wrote: [...] The segfault is caused by libunwind. With the latest version [1], dwarf unwinding works fine. Investigation on-going, more to come! [1] git://git.sv.gnu.org/libunwind.git I managed to get it to work by upgrading to

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Jiri Olsa
On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: On ARM the debug info is not present in the .eh_frame sections but instead in .debug_frame. Use libunwind to load and parse the debug info. hum, cannot make final link: $ make LIBUNWIND_DIR=/opt/libunwind/ CHK

Re: [PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-05 Thread Jean Pihet
Hi Jiri, On 5 September 2013 18:30, Jiri Olsa jo...@redhat.com wrote: On Wed, Sep 04, 2013 at 08:04:14PM +0200, Jean Pihet wrote: On ARM the debug info is not present in the .eh_frame sections but instead in .debug_frame. Use libunwind to load and parse the debug info. hum, cannot make

[PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-04 Thread Jean Pihet
On ARM the debug info is not present in the .eh_frame sections but instead in .debug_frame. Use libunwind to load and parse the debug info. Signed-off-by: Jean Pihet --- tools/perf/util/unwind.c | 70 +--- 1 file changed, 54 insertions(+), 16

[PATCH 3/3] perf: parse the .debug_frame section in case .eh_frame is not present

2013-09-04 Thread Jean Pihet
On ARM the debug info is not present in the .eh_frame sections but instead in .debug_frame. Use libunwind to load and parse the debug info. Signed-off-by: Jean Pihet jean.pi...@linaro.org --- tools/perf/util/unwind.c | 70 +--- 1 file changed, 54