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-tools: Use raw_tp rather than tp_btf for biolatency. #4271

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions libbpf-tools/biolatency.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct {
static __always_inline
int trace_rq_start(struct request *rq, int issue)
{
if (issue && targ_queued && BPF_CORE_READ(rq->q, elevator))
if (issue && targ_queued && BPF_CORE_READ(rq, q, elevator))
return 0;

u64 ts = bpf_ktime_get_ns();
Expand All @@ -64,7 +64,7 @@ int trace_rq_start(struct request *rq, int issue)
return 0;
}

SEC("tp_btf/block_rq_insert")
SEC("raw_tp/block_rq_insert")
int block_rq_insert(u64 *ctx)
{
if (filter_cg && !bpf_current_task_under_cgroup(&cgroup_map, 0))
Expand All @@ -81,7 +81,7 @@ int block_rq_insert(u64 *ctx)
return trace_rq_start((void *)ctx[0], false);
}

SEC("tp_btf/block_rq_issue")
SEC("raw_tp/block_rq_issue")
int block_rq_issue(u64 *ctx)
{
if (filter_cg && !bpf_current_task_under_cgroup(&cgroup_map, 0))
Expand All @@ -98,7 +98,7 @@ int block_rq_issue(u64 *ctx)
return trace_rq_start((void *)ctx[0], true);
}

SEC("tp_btf/block_rq_complete")
SEC("raw_tp/block_rq_complete")
int BPF_PROG(block_rq_complete, struct request *rq, int error,
unsigned int nr_bytes)
{
Expand All @@ -124,7 +124,7 @@ int BPF_PROG(block_rq_complete, struct request *rq, int error,
BPF_CORE_READ(disk, first_minor)) : 0;
}
if (targ_per_flag)
hkey.cmd_flags = rq->cmd_flags;
hkey.cmd_flags = BPF_CORE_READ(rq, cmd_flags);

histp = bpf_map_lookup_elem(&hists, &hkey);
if (!histp) {
Expand Down