lkml.org 
[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 bpf-next RESEND 1/2] bpf: Add bpf_read_branch_records() helper
On Tue Feb 11, 2020 at 11:23 AM, Andrii Nakryiko wrote:
> On Mon, Feb 10, 2020 at 12:09 PM Daniel Xu <dxu@dxuuu.xyz> wrote:
[...]
> > + * int bpf_read_branch_records(struct bpf_perf_event_data *ctx, void *buf, u32 size, u64 flags)
> > + * Description
> > + * For an eBPF program attached to a perf event, retrieve the
> > + * branch records (struct perf_branch_entry) associated to *ctx*
> > + * and store it in the buffer pointed by *buf* up to size
> > + * *buf_size* bytes.
> > + * Return
> > + * On success, number of bytes written to *buf*. On error, a
> > + * negative value.
> > + *
> > + * The *flags* can be set to **BPF_F_GET_BRANCH_RECORDS_SIZE** to
> > + * instead return the number of bytes required to store all the
> > + * branch entries. If this flag is set, *buf* may be NULL.
> > + *
> > + * **-EINVAL** if arguments invalid or **buf_size** not a multiple
>
>
> buf_size -> size

Whoops, thanks for catching.

[...]

\
 
 \ /
  Last update: 2020-02-14 07:35    [W:0.039 / U:3.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site