diff options
author | Yonghong Song <[email protected]> | 2020-05-09 10:59:04 -0700 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2020-05-09 17:05:26 -0700 |
commit | fd4f12bc38c3ad9107169e7c9e6e7f81d93dda97 (patch) | |
tree | b56407cffddf4ca487a888d9f2cb75b45e53a9e8 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | |
parent | 2057c92bc927f09b22f5609425eb37d7e782f484 (diff) |
bpf: Implement bpf_seq_read() for bpf iterator
bpf iterator uses seq_file to provide a lossless
way to transfer data to user space. But we want to call
bpf program after all objects have been traversed, and
bpf program may write additional data to the
seq_file buffer. The current seq_read() does not work
for this use case.
Besides allowing stop() function to write to the buffer,
the bpf_seq_read() also fixed the buffer size to one page.
If any single call of show() or stop() will emit data
more than one page to cause overflow, -E2BIG error code
will be returned to user space.
Signed-off-by: Yonghong Song <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions