On Fri, Sep 08, 2023 at 09:49:17AM -0700, Song Liu wrote: SNIP > > the bpf link has access to its attach layer, like perf event for kprobe > > in perf_link or fprobe for kprobe_multi link... so it's convenient to > > reach out from link for these stats and make them available through > > bpf_link_info > > > > also there's no other way to get these data for some links > > > > like we could perhaps add some perf event specific interface to retrieve > > these stats for kprobes, because we have access to the perf event in user > > space, but that's not the case for kprobe_multi link, because there's no > > other way to reach the fprobe object > > Fair enough. I guess this is a good stat to have for the bpf link. > > More question about kprobe_multi: Shall we (or can we) collect "missed" for each > individual function we attach to? I think it's possible, but we'd need to keep/lookup stats for each function/addr same way we do for cookies ... so it'd mean bsearch on each missed path.. which might be not that bad, considering it's error path instead of executing bpf program.. also it can be optional jirka