Re: [PATCH bpf-next v2 1/7] perf/core: add perf_get_event() to return perf_event given a struct file

Peter Zijlstra
2018-05-18T07:18:30Z

On Thu, May 17, 2018 at 10:32:53PM -0700, Yonghong Song wrote:
> A new extern function, perf_get_event(), is added to return a perf event
> given a struct file. This function will be used in later patches.

Can't you do a narrower interface? Like return the prog. I'm not too
keen on random !perf code frobbing around inside the event.