Re: [RFC] bpf: lbr: enable reading LBR from tracing bpf programs

From: Song Liu
Date: Thu Aug 19 2021 - 14:45:29 EST


Hi Peter,

> On Aug 19, 2021, at 11:27 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Thu, Aug 19, 2021 at 06:22:07PM +0000, Song Liu wrote:
>
>>> And if we're going to be adding new pmu::methods then I figure one that
>>> does the whole sample state might be more useful.
>>
>> What do you mean by "whole sample state"? To integrate with exiting
>> perf_sample_data, like perf_output_sample()?
>
> Yeah, the PMI can/does set more than data->br_stack, but I'm now
> thinking that without an actual PMI, much of that will not be possible.
> br_stack is special here.
>
> Oh well, carry on I suppose.

Thanks again for these information and suggestions. I will try to put them
together in the code and send the patches.

Song