From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH bpf-next v2 1/7] perf/core: add perf_get_event() to return perf_event given a struct file Date: Fri, 18 May 2018 09:18:22 +0200 Message-ID: <20180518071822.GC12217@hirez.programming.kicks-ass.net> References: <20180518053253.2908444-1-yhs@fb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: ast@fb.com, daniel@iogearbox.net, netdev@vger.kernel.org, kernel-team@fb.com To: Yonghong Song Return-path: Received: from merlin.infradead.org ([205.233.59.134]:50462 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751984AbeERHSa (ORCPT ); Fri, 18 May 2018 03:18:30 -0400 Content-Disposition: inline In-Reply-To: <20180518053253.2908444-1-yhs@fb.com> Sender: netdev-owner@vger.kernel.org List-ID: 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.