Skip to content

Commit

Permalink
perf: use generic bpf_program__set_type() to set BPF prog type
Browse files Browse the repository at this point in the history
bpf_program__set_<type>() APIs are deprecated, use generic
bpf_program__set_type() APIs instead.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20220124194254.2051434-8-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
  • Loading branch information
Andrii Nakryiko authored and Alexei Starovoitov committed Jan 26, 2022
1 parent 61afd3d commit 23fcfcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/perf/util/bpf-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,11 +656,11 @@ int bpf__probe(struct bpf_object *obj)
}

if (priv->is_tp) {
bpf_program__set_tracepoint(prog);
bpf_program__set_type(prog, BPF_PROG_TYPE_TRACEPOINT);
continue;
}

bpf_program__set_kprobe(prog);
bpf_program__set_type(prog, BPF_PROG_TYPE_KPROBE);
pev = &priv->pev;

err = convert_perf_probe_events(pev, 1);
Expand Down

0 comments on commit 23fcfcf

Please sign in to comment.