Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libbpf: deprecate bpf_program__get_prog_info_linear #1911

Closed
wants to merge 5 commits into from

Conversation

kernel-patches-bot
Copy link

Pull request for series with
subject: libbpf: deprecate bpf_program__get_prog_info_linear
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=560793

@kernel-patches-bot
Copy link
Author

Master branch: 5319255
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=560793
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 5319255
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=560891
version: 2

@kernel-patches-bot
Copy link
Author

Master branch: 431bfb9
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=560891
version: 2

@kernel-patches-bot
Copy link
Author

Master branch: 223f903
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=560891
version: 2

@kernel-patches-bot
Copy link
Author

Master branch: 32fa0ef
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=560891
version: 2

@kernel-patches-bot
Copy link
Author

Master branch: 588cd7e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=560891
version: 2

Nobody and others added 5 commits October 20, 2021 10:30
In preparation for bpf_program__get_prog_info_linear, move the single
use in libbpf to call bpf_obj_get_info_by_fd directly.

Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
To prepare for impending deprecation of libbpf's
bpf_program__get_prog_info_linear, migrate uses of this function to use
bpf_obj_get_info_by_fd.

Since the profile_target_name and dump_prog_id_as_func_ptr helpers were
only looking at the first func_info, avoid grabbing the rest to save a
malloc. For do_dump, add a more full-featured helper, but avoid
free/realloc of buffer when possible for multi-prog dumps.

Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
To prepare for impending deprecation of libbpf's
bpf_program__get_prog_info_linear, pull in the function and associated
helpers into the perf codebase and migrate existing uses to the perf
copy.

Since libbpf's deprecated definitions will still be visible to perf, it
is necessary to rename perf's definitions.

Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
As part of the road to libbpf 1.0, and discussed in libbpf issue tracker
[0], bpf_program__get_prog_info_linear and its associated structs and
helper functions should be deprecated. The functionality is too specific
to the needs of 'perf', and there's little/no out-of-tree usage to
preclude introduction of a more general helper in the future.

[0] Closes: libbpf/libbpf#313

Signed-off-by: Dave Marchevsky <davemarchevsky@fb.com>
@kernel-patches-bot
Copy link
Author

Master branch: 588cd7e
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=560891
version: 2

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=560891 irrelevant now. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants