Re: [PATCH v7 3/3] perf-stat: enable counting events for BPF programs

From: Arnaldo Carvalho de Melo
Date: Tue Jan 19 2021 - 17:44:21 EST


Em Tue, Jan 19, 2021 at 12:48:19AM +0000, Song Liu escreveu:
> > On Jan 18, 2021, at 11:38 AM, Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
> We are looking at two issues:
> 1. Cannot recursively attach;
> 2. prog FD 3 doesn't have valid btf.

> #1 was caused by the verifier disallowing attaching fentry/fexit program
> to program with type BPF_PROG_TYPE_TRACING (in bpf_check_attach_target).
> This constraint was added when we only had fentry/fexit in the TRACING
> type. We have extended the TRACING type to many other use cases, like
> "tp_btf/", "fmod_ret" and "iter/". Therefore, it is good time to revisit
> this constraint. I will work on this.

> For #2, we require the target program to have BTF. I guess we won't remove
> this requirement.

> While I work on improving #1, could you please test with some kprobe
> programs? For example, we can use fileslower.py from bcc.

Sure, and please consider improving the error messages to state what you
described above.

- Arnaldo