[lkml]   [2019]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH v2] perf/x86: make perf callchain work without CONFIG_FRAME_POINTER
On Tue, Apr 16, 2019 at 03:15:59PM -0500, Josh Poimboeuf wrote:
> If you do the regs->eflags thing to mark the regs as fake in
> (perf_arch_fetch_caller_regs()), then I don't think skip_sp would be
> needed, because regs->sp could probably mark the skip point.
> Instead I was actually hoping we could get rid of fake regs and
> perf_arch_fetch_caller_regs() altogether, because it's a nasty hack.
> But I don't know what else those fake regs are used for.

This is the generic perf generate a sample path. It doesn't know the
context. Normally it is an interrupt or exception of sorts and we simply
pass the pt_regs from that down the chain and all is good.

It is just for a few software events, such as SW_CONTEXT_SWITCH,
SW_MIGRATIONS and all the TP muck that we do not have regs to pass down.

These regs are used by:

- SAMPLE_CALLCHAIN (this here issue),
- a few misc bits

There's actually comment on top of perf_fetch_caller_regs() that tries
to explain what is needed -- although I suppose that could do with an

 \ /
  Last update: 2019-04-17 09:07    [W:0.071 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site