Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp502996imu; Thu, 22 Nov 2018 00:40:52 -0800 (PST) X-Google-Smtp-Source: AJdET5ej9WluD9l4wro2aKItPuyvoqDVdjRqOcEU5gDjDhBdzkadkW3R3Bcq/IUNIeC1OjDDo6da X-Received: by 2002:a62:509b:: with SMTP id g27mr10623730pfj.48.1542876052063; Thu, 22 Nov 2018 00:40:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542876052; cv=none; d=google.com; s=arc-20160816; b=BMDVpfYMOxWop3vs8q8PxVcYWUx4AKWke9D/wlWaL7sSYb83XVcZECXgl5OCRM+Oi0 TE+Zw6EoWYvdUZ/rGOAN6MWhcZjq2vMbeQbqVCcLzxfQflva3cNkyf01vtTX1IiqDBMk ai4n64+qPaLja7CUQdXeUkEKXDGbMdgjiJnDAK6g6vOJUJCTK/Uy/lCWDrOECiPJsGUe ex2Ywk27IDSGRRoZJ/2ar/65fpO7NKwUZzeEru6B8MRkLWAgPtSex5fskrMqCw8069ei eSTiwwsoJpN9hIZdz98DHBIuPElRvY5j4F2Q4ugMgdQT6Zf2Vedsm3ZiJvOcat51oKtW 9MuA== 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=x8UGeUladCYKzq0FcT9XuJ5u5dRUG3xqSMTDU6lXiDQ=; b=0HbU+MHijB3CXNaV8CnM81bbJFbZkOmcL5GhYkI0eudRjSAFP3b5Vq99qWJdfRbM+1 SN0KHFIzAGyu/gVFI4YJ2hoD8h/4HyAUqT0uNpn1++n1Qxn8r7U8X4ceUcKZQW0+Uwyw ZLA4I/PzqXPaPgQziGtb3u051Rrhb2YOKIsAL8Ai8n+1Ejk0fwnCiN8yaTXWgmTswye4 ZF3mkmM+qGL+ykXH5IsdkhIo55YwusvtXhkPnG/40ySV7KRjKcbR9S98IDcmB6kkINqb Tc/SkV2Ds1Omqrfrzc8HJ5gtu1zTzpes1Czd7RQt1GxylLd0bbLf/sjhXCIPa6ur0gdE YEGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nQVT+vAm; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u11si5122137plr.392.2018.11.22.00.40.37; Thu, 22 Nov 2018 00:40:52 -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=pass header.i=@gmail.com header.s=20161025 header.b=nQVT+vAm; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389981AbeKVIsG (ORCPT + 99 others); Thu, 22 Nov 2018 03:48:06 -0500 Received: from mail-io1-f67.google.com ([209.85.166.67]:37657 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730412AbeKVIsF (ORCPT ); Thu, 22 Nov 2018 03:48:05 -0500 Received: by mail-io1-f67.google.com with SMTP id a3so5226915ioc.4; Wed, 21 Nov 2018 14:11:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=x8UGeUladCYKzq0FcT9XuJ5u5dRUG3xqSMTDU6lXiDQ=; b=nQVT+vAmQQlKhpQe9JreBSYMaN2mzmKsf2cjUcK7VgGqY7Q/RJfv54U0nTBV9QW4DK SWFD+G1PHS+AXoxe1A0e+ZlaVWMrWbCCezRXFAIxPSHgGJ8EBIVkhS4V8WA5ro8f0hM6 1PhMotFQ/ev1Tdes+mezjOG9Bvv9iDXGaWhJwG7e44h5Mh2iGFn0M3XR5iv5b+VEsRrQ 5w8nh4DWL+v7hLA2GNTgZNLcX8DPAICXlznqTZEvzKs2jWn5iSgVOtbBhtnXM/jpSbrL YO2BpQsBQE2bBjqaO+L7pX2c9QLqXJDH/PQcRWXJqpq4T1UAyCIKLokdMSpJfObVsr5T 1Uqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=x8UGeUladCYKzq0FcT9XuJ5u5dRUG3xqSMTDU6lXiDQ=; b=dtT27Ew3Dsi0cJiBRD7JBZg3F3IsKzGKWbYQS+o3KLwjKErNyN6kTttVhsVFkkcah2 m08307ITgqojR6MuTAxDMNrn5P8KS5K12i07JRApgU9M4PSUTiBPfIcx5NfZumzbVyuw 2IFcDq1lgtSJ1qnOz+39ul1ZfVRfPV5nEVvuRJpYIIQhR5r8laVg9Yy1MLvstFRhQlVz Grlv0HLVnz1qg4cs8Hb0ivkmonndtqrDf9ZupYPRCC1vqpuM6Huqu5S8VXh2iiljc5cc xK06+1h0uaPtKXTWCdgl3hVr9aNfIVN9L+G1P+qta6tqkx6Ox1Sa6mwMGCinHLR47vLh z0fw== X-Gm-Message-State: AA+aEWb7+hFFkorXRBZodDqSb894sLSivs1Vo9u2jHMN5wGsxc1iXW2d 2QXWb9MYncJtZdvj3aiXAm4= X-Received: by 2002:a6b:1846:: with SMTP id 67-v6mr5921452ioy.263.1542838311487; Wed, 21 Nov 2018 14:11:51 -0800 (PST) Received: from ast-mbp ([2620:10d:c090:180::1:6a9]) by smtp.gmail.com with ESMTPSA id h137-v6sm847841itb.39.2018.11.21.14.11.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Nov 2018 14:11:50 -0800 (PST) Date: Wed, 21 Nov 2018 14:11:47 -0800 From: Alexei Starovoitov To: Song Liu Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, acme@kernel.org, peterz@infradead.org, kernel-team@fb.com Subject: Re: [PATCH perf,bpf 5/5] perf util: generate bpf_prog_info_event for short living bpf programs Message-ID: <20181121221145.2cxph7zv27x7lbg6@ast-mbp> References: <20181121195502.3259930-1-songliubraving@fb.com> <20181121195502.3259930-6-songliubraving@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181121195502.3259930-6-songliubraving@fb.com> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 21, 2018 at 11:55:02AM -0800, Song Liu wrote: > This patch enables perf-record to listen to bpf_event and generate > bpf_prog_info_event for bpf programs loaded and unloaded during > perf-record run. > > To minimize latency between bpf_event and following bpf calls, separate > mmap with watermark of 1 is created to process these vip events. Then > a separate dummy event is attached to the special mmap. A separate thread > is used to only poll bpf events. > > By default, perf-record will listen to bpf_event. Option no-bpf-event is > added in case the user would opt out. I think only default perf-record for sampling should include it. perf record -e for tracepoints, kprobes and anything else should imply no-bpf-event.