Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2874646imu; Wed, 7 Nov 2018 00:41:39 -0800 (PST) X-Google-Smtp-Source: AJdET5cS+yvjZgd2rfu2DUAhWv8wF0CAnc418shFnYcxfI6BDhF+6dhGWgu7Sg0IEqKJVjRwxCt8 X-Received: by 2002:a63:6205:: with SMTP id w5mr832468pgb.53.1541580099881; Wed, 07 Nov 2018 00:41:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541580099; cv=none; d=google.com; s=arc-20160816; b=t87jczRkn+t/3TjdBnCGiMHvTkzSG49Iacx9mqS5vPBJya2xUVB2XOjoyEx2D8EH3Y bGsQNUFiYE/NuNJsOrV2VhbjKVqvcDWPEa6ev9PiAiexljq8U1b39k4sEyLvXYKfKRfZ OZ9i5uj/GRR73QM8XPDBSEQLYkVE4ieIJvZYgldCShSQ0vb+JbzorXWwL5V6NRWpOIQc VeSpmVdr28srZY5+HVJheJk8ejnTV+ynK2zw8fCOMsXk+6S5RaWCaG92SV5FOiRyiYXP /X1kvgpbx+Q16fZBODf2MmndrvjC8zxY9WgpIBYa9OMMTjQZWC2aG5PjlU+AdoOTM4h7 1fXA== 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=K9/KClUuX3eCznPYQdg2PQEdTsgVCy0aiW7Z/qIwSzc=; b=KgIijuxFeFYOoYTqwdpjQqMkPA9n0li8lPebU74uMnp2di9OxB/yDG0nEo7I6RxaxQ WvBCQaDLnT6RnywtrqePagkwiARcJbeECgkUdfflHjruo7amhZ1ERKQsneTy8oklfFlI aqwlZejhRIvXOAicPeLBOYydl+xraAqbVIPMN8g81i+YjrrPw9EGgcS7UziBpITGYm2y Zzytqt2861B25WNdr3O3mCwvNrgWu4tW1H6RRXKlneblmLy6uPzj9sQlnOM+6amS2HlZ NTayYIA4z6PM5hdPh8QDCjqPJgAy9aLGHX/Xs87yD81i94cIXmWDSwEMcddOLCVWgamZ 6Q0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=gTCDgFBF; 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 s38-v6si47625142pga.473.2018.11.07.00.41.24; Wed, 07 Nov 2018 00:41:39 -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=gTCDgFBF; 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 S1729641AbeKGSKX (ORCPT + 99 others); Wed, 7 Nov 2018 13:10:23 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:35106 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726171AbeKGSKX (ORCPT ); Wed, 7 Nov 2018 13:10:23 -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=K9/KClUuX3eCznPYQdg2PQEdTsgVCy0aiW7Z/qIwSzc=; b=gTCDgFBF3duIYB/1FthKUoVdu IHAcyswF74scm45gGICbzzQ6Q/+c1WeFNnEMj983KHjElgbu3oHTWyvswSg7A2Nm5XH9EHsJwktHH JBDXev+F4uU3XevPQ9XCZwESPPBBAyVeQmT6gko3kjRcp6emaNytemJz9vdju2UFdvlRshVvcWBjZ ZR7Y/Qh02kunF0ISZ/lOlB/87L7+iUIsL1mV/SmEuZynCXE9mLRqsX7q7dYV3K4oR8z6Ix8nGnWra Ar3o6rVrQgEBfYRGFVmrlLYAzMGr2LTBkN4NI0pHvN2ZWvyOuX38ipxrU+oWGdFitEN4cPvZ+XGVq 9jZxPSsyA==; 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 1gKJOV-0001vh-Hg; Wed, 07 Nov 2018 08:40:59 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C203E2029F883; Wed, 7 Nov 2018 09:40:57 +0100 (CET) Date: Wed, 7 Nov 2018 09:40:57 +0100 From: Peter Zijlstra To: Song Liu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, ast@kernel.org, daniel@iogearbox.net, acme@kernel.org Subject: Re: [RFC perf,bpf 1/5] perf, bpf: Introduce PERF_RECORD_BPF_EVENT Message-ID: <20181107084057.GG9781@hirez.programming.kicks-ass.net> References: <20181106205246.567448-1-songliubraving@fb.com> <20181106205246.567448-2-songliubraving@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181106205246.567448-2-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 Tue, Nov 06, 2018 at 12:52:42PM -0800, Song Liu wrote: > For better performance analysis of BPF programs, this patch introduces > PERF_RECORD_BPF_EVENT, a new perf_event_type that exposes BPF program > load/unload information to user space. > > /* > * Record different types of bpf events: > * enum perf_bpf_event_type { > * PERF_BPF_EVENT_UNKNOWN = 0, > * PERF_BPF_EVENT_PROG_LOAD = 1, > * PERF_BPF_EVENT_PROG_UNLOAD = 2, > * }; > * > * struct { > * struct perf_event_header header; > * u16 type; > * u16 flags; > * u32 id; // prog_id or map_id > * }; > */ > PERF_RECORD_BPF_EVENT = 17, > > PERF_RECORD_BPF_EVENT contains minimal information about the BPF program. > Perf utility (or other user space tools) should listen to this event and > fetch more details about the event via BPF syscalls > (BPF_PROG_GET_FD_BY_ID, BPF_OBJ_GET_INFO_BY_FD, etc.). Why !? You're failing to explain why it cannot provide the full information there.