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

bpf: Show target_{obj,btf}_id for tracing link #5078

Closed

Conversation

kernel-patches-daemon-bpf[bot]
Copy link

Pull request for series with
subject: bpf: Show target_{obj,btf}_id for tracing link
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=747977

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 108598c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=747977
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 108598c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=747977
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 108598c
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=747977
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 3879122
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=747977
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: de58ef4
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=747977
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 0697e43
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=747977
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: cff3639
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=747977
version: 1

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: cff3639
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=748370
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 2a36c26
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=748370
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: 8819495
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=748370
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: effcf62
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=748370
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: effcf62
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=748370
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: effcf62
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=748370
version: 2

@kernel-patches-daemon-bpf
Copy link
Author

Upstream branch: effcf62
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=748370
version: 2

laoar added 2 commits May 17, 2023 17:17
The target_btf_id can help us understand which kernel function is
linked by a tracing prog. The target_btf_id and target_obj_id have
already been exposed to userspace, so we just need to show them.

The result as follows,

$ cat /proc/10673/fdinfo/10
pos:    0
flags:  02000000
mnt_id: 15
ino:    2094
link_type:      tracing
link_id:        2
prog_tag:       a04f5eef06a7f555
prog_id:        13
attach_type:    24
target_obj_id:  1
target_btf_id:  13964

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Acked-by: Song Liu <song@kernel.org>
The target_btf_id can help us understand which kernel function is
linked by a tracing prog. The target_btf_id and target_obj_id have
already been exposed to userspace, so we just need to show them.

The result as follows,

$ tools/bpf/bpftool/bpftool link show
2: tracing  prog 13
        prog_type tracing  attach_type trace_fentry
        target_obj_id 1  target_btf_id 13964
        pids trace(10673)

$ tools/bpf/bpftool/bpftool link show -j
[{"id":2,"type":"tracing","prog_id":13,"prog_type":"tracing","attach_type":"trace_fentry","target_obj_id":1,"target_btf_id":13964,"pids":[{"pid":10673,"comm":"trace"}]}]

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Acked-by: Song Liu <song@kernel.org>
@kernel-patches-daemon-bpf
Copy link
Author

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

@kernel-patches-daemon-bpf kernel-patches-daemon-bpf bot deleted the series/747977=>bpf-next branch May 19, 2023 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant