lkml.org 
[lkml]   [2014]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf ftrace: Factor regs retrieval for function tracer
On Thu, Dec 18, 2014 at 03:28:27PM +0100, Jiri Olsa wrote:
> > Would not something like:
> >
> > struct pt_regs *regs;
> >
> > entry = perf_trace_buf_prepare(ENTRY_SIZE, TRACE_FN, &regs, &rctx);
> > if (!pt_regs) {
> > perf_fetch_caller_regs(regs);
> > pt_regs = regs;
> > }
> >
> > Be simpler?
>
> well, I wanted to omit touching the '__perf_regs' var
> in perf_trace_buf_prepare:
>
> if (regs)
> *regs = this_cpu_ptr(&__perf_regs[*rctxp]);

OK, fair enough I suppose. Thanks!


\
 
 \ /
  Last update: 2014-12-18 16:21    [W:0.045 / U:0.892 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site