Re: [RFC PATCH v2] perf/x86: make perf callchain work without CONFIG_FRAME_POINTER

From: Peter Zijlstra
Date: Thu Apr 18 2019 - 03:54:23 EST


On Wed, Apr 17, 2019 at 10:44:33PM +0800, Kairui Song wrote:
> Despite it's hacky, it seems not necessary to dump every register. And
> is there a straight way to get caller's regs in the trace point? It
> seems more trouble some. Or if we just use the regs inside the
> tracepoint, but it would need even more workaround (eg. unwind one
> frame before do anything).

Sure, and the current code doesn't fill out every reg either, but given
SAMPLE_REGS_INTR I think we should at least clear the entire regs before
passing it on, or otherwise make sure SAMPLE_REGS_INTR isn't allowed on
these events.