Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-21 Thread Will Deacon
On Mon, Jan 20, 2014 at 05:05:14PM +, Jean Pihet wrote: > Hi Will, > > Here is an updated version of the change, which uses compat_sp at only > one place. > The drawback is that compat_user_mode is checked when calling > compat_user_stack_pointer, which seems unnecessary. Unfortunately the >

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-21 Thread Will Deacon
On Mon, Jan 20, 2014 at 05:05:14PM +, Jean Pihet wrote: Hi Will, Here is an updated version of the change, which uses compat_sp at only one place. The drawback is that compat_user_mode is checked when calling compat_user_stack_pointer, which seems unnecessary. Unfortunately the check

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-20 Thread Jean Pihet
Hi Will, Here is an updated version of the change, which uses compat_sp at only one place. The drawback is that compat_user_mode is checked when calling compat_user_stack_pointer, which seems unnecessary. Unfortunately the check is not optimized out by the complier as I could check with objdump

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-20 Thread Jean Pihet
Hi Will, Here is an updated version of the change, which uses compat_sp at only one place. The drawback is that compat_user_mode is checked when calling compat_user_stack_pointer, which seems unnecessary. Unfortunately the check is not optimized out by the complier as I could check with objdump

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-17 Thread Will Deacon
On Fri, Jan 17, 2014 at 09:00:09AM +, Jean Pihet wrote: > On 16 January 2014 14:47, Jean Pihet wrote: > >> So the simplest thing would be to make compat_user_stack_pointer expand to > >> user_stack_pointer(current_pt_regs()) on arm64 and merge that in with your > >> original patch fixing

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-17 Thread Jean Pihet
Hi Will, Some more thoughts below On 16 January 2014 14:47, Jean Pihet wrote: > Will, > > On 16 January 2014 13:57, Will Deacon wrote: >> On Thu, Jan 16, 2014 at 12:26:53PM +, Jean Pihet wrote: >>> On 16 January 2014 12:56, Will Deacon wrote: >>> > In your previous series, compat

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-17 Thread Jean Pihet
Hi Will, Some more thoughts below On 16 January 2014 14:47, Jean Pihet jean.pi...@linaro.org wrote: Will, On 16 January 2014 13:57, Will Deacon will.dea...@arm.com wrote: On Thu, Jan 16, 2014 at 12:26:53PM +, Jean Pihet wrote: On 16 January 2014 12:56, Will Deacon will.dea...@arm.com

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-17 Thread Will Deacon
On Fri, Jan 17, 2014 at 09:00:09AM +, Jean Pihet wrote: On 16 January 2014 14:47, Jean Pihet jean.pi...@linaro.org wrote: So the simplest thing would be to make compat_user_stack_pointer expand to user_stack_pointer(current_pt_regs()) on arm64 and merge that in with your original patch

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-16 Thread Jean Pihet
Will, On 16 January 2014 13:57, Will Deacon wrote: > On Thu, Jan 16, 2014 at 12:26:53PM +, Jean Pihet wrote: >> On 16 January 2014 12:56, Will Deacon wrote: >> > In your previous series, compat backtracing is actually split out into a >> > separate function (compat_user_backtrace), so it

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-16 Thread Will Deacon
On Thu, Jan 16, 2014 at 12:26:53PM +, Jean Pihet wrote: > On 16 January 2014 12:56, Will Deacon wrote: > > In your previous series, compat backtracing is actually split out into a > > separate function (compat_user_backtrace), so it would be more consistent to > > have a

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-16 Thread Jean Pihet
On 16 January 2014 12:56, Will Deacon wrote: > Hi Jean, > > On Thu, Jan 16, 2014 at 10:45:23AM +, Jean Pihet wrote: >> Add support for unwinding using the dwarf information in compat >> mode. Using the correct user stack pointer allows perf to record >> the frames correctly in the native and

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-16 Thread Will Deacon
Hi Jean, On Thu, Jan 16, 2014 at 10:45:23AM +, Jean Pihet wrote: > Add support for unwinding using the dwarf information in compat > mode. Using the correct user stack pointer allows perf to record > the frames correctly in the native and compat modes. > > Note that although the dwarf frame

[PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-16 Thread Jean Pihet
Add support for unwinding using the dwarf information in compat mode. Using the correct user stack pointer allows perf to record the frames correctly in the native and compat modes. Note that although the dwarf frame unwinding works ok using libunwind in native mode (on ARMv7 & ARMv8), some

[PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-16 Thread Jean Pihet
Add support for unwinding using the dwarf information in compat mode. Using the correct user stack pointer allows perf to record the frames correctly in the native and compat modes. Note that although the dwarf frame unwinding works ok using libunwind in native mode (on ARMv7 ARMv8), some

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-16 Thread Will Deacon
Hi Jean, On Thu, Jan 16, 2014 at 10:45:23AM +, Jean Pihet wrote: Add support for unwinding using the dwarf information in compat mode. Using the correct user stack pointer allows perf to record the frames correctly in the native and compat modes. Note that although the dwarf frame

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-16 Thread Jean Pihet
On 16 January 2014 12:56, Will Deacon will.dea...@arm.com wrote: Hi Jean, On Thu, Jan 16, 2014 at 10:45:23AM +, Jean Pihet wrote: Add support for unwinding using the dwarf information in compat mode. Using the correct user stack pointer allows perf to record the frames correctly in the

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-16 Thread Will Deacon
On Thu, Jan 16, 2014 at 12:26:53PM +, Jean Pihet wrote: On 16 January 2014 12:56, Will Deacon will.dea...@arm.com wrote: In your previous series, compat backtracing is actually split out into a separate function (compat_user_backtrace), so it would be more consistent to have a

Re: [PATCH] ARM64: perf: support dwarf unwinding in compat mode

2014-01-16 Thread Jean Pihet
Will, On 16 January 2014 13:57, Will Deacon will.dea...@arm.com wrote: On Thu, Jan 16, 2014 at 12:26:53PM +, Jean Pihet wrote: On 16 January 2014 12:56, Will Deacon will.dea...@arm.com wrote: In your previous series, compat backtracing is actually split out into a separate function