Re: [PATCH bpf-next] libbpf: add API to consume the perf ring buffer content

2020-05-26 Thread Andrii Nakryiko
On Tue, May 26, 2020 at 1:07 AM Eelco Chaudron wrote: > > > > On 26 May 2020, at 7:29, Andrii Nakryiko wrote: > > > On Mon, May 25, 2020 at 2:01 PM Eelco Chaudron > > wrote: > >> > >> This new API, perf_buffer__consume, can be used as follows: > > > > I wonder, was it inspired by yet-to-be commit

Re: [PATCH bpf-next] libbpf: add API to consume the perf ring buffer content

2020-05-26 Thread Eelco Chaudron
On 26 May 2020, at 7:29, Andrii Nakryiko wrote: On Mon, May 25, 2020 at 2:01 PM Eelco Chaudron wrote: This new API, perf_buffer__consume, can be used as follows: I wonder, was it inspired by yet-to-be committed ring_buffer__consume() or it's just a coincidence? Just coincidence, I was

Re: [PATCH bpf-next] libbpf: add API to consume the perf ring buffer content

2020-05-25 Thread Andrii Nakryiko
On Mon, May 25, 2020 at 2:01 PM Eelco Chaudron wrote: > > This new API, perf_buffer__consume, can be used as follows: I wonder, was it inspired by yet-to-be committed ring_buffer__consume() or it's just a coincidence? > - When you have a perf ring where wakeup_events is higher than 1, > and yo

[PATCH bpf-next] libbpf: add API to consume the perf ring buffer content

2020-05-25 Thread Eelco Chaudron
This new API, perf_buffer__consume, can be used as follows: - When you have a perf ring where wakeup_events is higher than 1, and you have remaining data in the rings you would like to pull out on exit (or maybe based on a timeout). - For low latency cases where you burn a CPU that constantly p