Re: WARNING with LBR + precise_ip=2 + bpf_get_stackid()

From: Song Liu
Date: Thu Jun 18 2020 - 16:18:26 EST




> On Jun 18, 2020, at 11:33 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Thu, Jun 18, 2020 at 05:25:24PM +0000, Song Liu wrote:
>

[...]

>> 0xfffffe00004d1380 __start_orc_unwind
>> 0xfffffe00004d1388 unwind_next_frame.cold.7
>> 0xfffffe00004d13c8 perf_callchain_kernel
>> 0xfffffe00004d1418 entry_SYSCALL_64
>> 0xfffffe00004d1450 get_perf_callchain
>> 0xfffffe00004d14b0 bpf_get_stack
>
> This, this is where it gets buggerd. This is a BPF problem, not a perf
> problem.
>
> You'll note that if you ask perf for a PERF_SAMPLE_CALLCHAIN we'll do
> that early in setup_pebs_fixed_sample_data().

We did notice perf works fine in similar scenario. I guess need similar
logic in BPF.

Thanks,
Song