Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp118613imu; Tue, 8 Jan 2019 15:54:36 -0800 (PST) X-Google-Smtp-Source: ALg8bN7X0MNEyLF/u/WMJoSX9weOxvzA/5omJ2sKeUFYzpnQ/0MDdJFnLc997EALSL4vJZ3tI5SZ X-Received: by 2002:a63:b30f:: with SMTP id i15mr3383853pgf.240.1546991675996; Tue, 08 Jan 2019 15:54:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546991675; cv=none; d=google.com; s=arc-20160816; b=b6VmUwRi2sUuEAe+Lc8UVzHq+d2VOx/oNUX+1+Ikxr9FI8UQW/Vnjegt45n0sJj/VA ZX1jkHPFXL11Vz3+reIfC1y8G5NWUsboDMg14th0j/e2JbYcZ+l3Nx3KD75MfJRlkWh6 WJ1r3MaWM4ioDoKnjem/85F/kaTeJx43jwl0BZ2kmy4SmWuuPQmt7JyhyuGPt6lnPNfz xyKLJoL3rctFrHYOVcp/tyG2mT31MpZ313g4YWWixGve9OB3lZev8x9LRahcMGra2n9g NvNTK7YHZd+Njq7xCrDv4odl1RMfQ/bbOL0b+T8Bg+dFkV+h6NzZxpIeL7WLLuTK+CEL 0xIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=9j248iKVW68MgXqyHBMfVGKuzEdWnpCfGNszahvR+Cc=; b=dhtXkk3zMMqnwAMxImZnnwDGwwf+QLX3bg2CxUeqn4oFHpi2GKXUtpbvmmP58wQ9c/ nTJYfFuC+tD89ONd7d41W7n/aRFFqZCRdEQ9UAa2E534DPX7WilMdT3xiet82xdcY2oE 6fBPl8Ani5J0MHqsxD8jKT98trhJ6KHgo8t/IlAQf8slwQtcWBQFTKBqVfjVtuXHADvG qZ38EStnmsLtFJb0pfcSgX4mNv4TS0NPKe9U+tYPsCHMpfBYstknVNB1e8tErSYNx0Jq T0UtMl8zJJ1PW60cHRwXhMIeheVmIJeBWbbxiArU4L30sVqYVE5CzG1shUzrV6PdOf4V A4EQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=aMqWDRYe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c6si65261661plr.414.2019.01.08.15.54.18; Tue, 08 Jan 2019 15:54:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=aMqWDRYe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732822AbfAHT7a (ORCPT + 99 others); Tue, 8 Jan 2019 14:59:30 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:52086 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732990AbfAHT72 (ORCPT ); Tue, 8 Jan 2019 14:59:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9j248iKVW68MgXqyHBMfVGKuzEdWnpCfGNszahvR+Cc=; b=aMqWDRYeSKVt1aq2RDm8HZElr aiowTqa3OwYQjZhe6N1Gf7C2/jtq21ieB1DpSGaF0MBfeEJ40MY3KhdMmMU9lfJd3AH5FhtzrKOlF OGgBsFwToUMizgiPrJKpYzWL+u+yCVAGdXwoWjKIgS4q8gnSQIuAIscDf8JIkoIysIkxaBDVR1uqU 5Mi529FmTJDVRY6tyrRvgP6C3U60IVDnmAvgupf374A7Stqe1fQa9Aj7FIsOZD0NhV29BQfGABp6Z DE/Dw5iwPLjKzv3/ZjN00lAj4kU0ShGRIM4y35LAaK8umYxY1Gefi2AzEDLpTBMuxg6eV++6QNW79 WOh/7LrMQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggxX3-0004PZ-6t; Tue, 08 Jan 2019 19:59:25 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id B49BF2028019A; Tue, 8 Jan 2019 20:59:23 +0100 (CET) Date: Tue, 8 Jan 2019 20:59:23 +0100 From: Peter Zijlstra To: Song Liu Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, acme@kernel.org, ast@kernel.org, daniel@iogearbox.net, kernel-team@fb.com Subject: Re: [PATCH v5 perf, bpf-next 3/7] perf, bpf: introduce PERF_RECORD_BPF_EVENT Message-ID: <20190108195923.GD30894@hirez.programming.kicks-ass.net> References: <20181220182904.4193196-1-songliubraving@fb.com> <20181220182904.4193196-4-songliubraving@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181220182904.4193196-4-songliubraving@fb.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 20, 2018 at 10:29:00AM -0800, Song Liu wrote: > +static void perf_event_bpf_emit_ksymbols(struct bpf_prog *prog, > + enum perf_bpf_event_type type) > +{ > + bool unregister = type == PERF_BPF_EVENT_PROG_UNLOAD; > + int i; > + > + if (prog->aux->func_cnt == 0) { > + perf_event_ksymbol(PERF_RECORD_MISC_KSYMBOL_TYPE_BPF, > + (u64)(unsigned long)prog->bpf_func, > + prog->jited_len, unregister, > + perf_event_bpf_get_name, prog); > + } else { > + for (i = 0; i < prog->aux->func_cnt; i++) { > + struct bpf_prog *subprog = prog->aux->func[i]; > + > + perf_event_ksymbol( > + PERF_RECORD_MISC_KSYMBOL_TYPE_BPF, > + (u64)(unsigned long)subprog->bpf_func, > + subprog->jited_len, unregister, > + perf_event_bpf_get_name, subprog); > + } > + } > +} That's a bit unexpected, but yes sure, that works for now. I was expecting it to be hooked up in your kallsym rbtree thing, but whatever, we can fix that when needed.