lkml.org 
[lkml]   [2013]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ARM: perf: Implement perf_arch_fetch_caller_regs
On Sat, Jul 20, 2013 at 04:43:21AM +0100, Jed Davis wrote:
> On Mon, Jul 15, 2013 at 02:53:42PM +0100, Will Deacon wrote:
> > > + "mov %[_pc], r15\n\t" \
> > > + "mrs %[_cpsr], cpsr\n\t" \
> > > + : [_cpsr] "=r" (_cpsr), \
> > > + [_pc] "=r" (_pc) \
> > > + : [_regs] "r" (&(regs)->uregs) \
> >
> > It would be cleaner to pass a separate argument for each register, using the
> > ARM_rN macros rather than calculating the offset by hand.
>
> I'll do that. If there were more arguments there might be a problem
> at -O0, because the naive translation can run out of registers in
> some cases, but that shouldn't be a problem here. (Nor if someone
> later extends this to all the core registers, because {r0-r13} can and
> presumably should use a store-multiple.)

We already rely on compiler optimisation for things like tlbflush.h, so we
don't need to worry about building with -O0.

Please send a v2 when you get a chance!

Will


\
 
 \ /
  Last update: 2013-07-22 00:01    [W:0.132 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site