Skip to content

Commit f915fcb

Browse files
olsajirianakryiko
authored andcommitted
bpf: Count stats for kprobe_multi programs
Adding support to gather missed stats for kprobe_multi programs due to bpf_prog_active protection. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Tested-by: Song Liu <song@kernel.org> Reviewed-by: Song Liu <song@kernel.org> Link: https://lore.kernel.org/bpf/20230920213145.1941596-2-jolsa@kernel.org
1 parent e0fa652 commit f915fcb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

kernel/trace/bpf_trace.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2710,6 +2710,7 @@ kprobe_multi_link_prog_run(struct bpf_kprobe_multi_link *link,
27102710
int err;
27112711

27122712
if (unlikely(__this_cpu_inc_return(bpf_prog_active) != 1)) {
2713+
bpf_prog_inc_misses_counter(link->link.prog);
27132714
err = 0;
27142715
goto out;
27152716
}

0 commit comments

Comments
 (0)