Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3933842imu; Sat, 24 Nov 2018 14:19:22 -0800 (PST) X-Google-Smtp-Source: AFSGD/WYPwR69CzVhn89IKHl2qNZpOtb++RFs0E283KHgmszKjrlDtFsIBofoHKg4/fOT1Lt2DUY X-Received: by 2002:a63:4f5e:: with SMTP id p30mr19187206pgl.71.1543097962607; Sat, 24 Nov 2018 14:19:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543097962; cv=none; d=google.com; s=arc-20160816; b=TK56CQNXlAUQIy4X3WjdqzVDPifOTw9dDIJoAJItkaef7ks8pLHhB6pYet2a1yHMO/ STry8lvIGbtVAylENaGFD9fH73a2Hj8rM0uxBygofIeMmRlo6JNXyWkvoLGgOjyj0S9A Iz2eA6a9QjELKy6y7vpihIA1/1vACDOBnDzNoFWmicpu5qn/Bonx0RKGQozWI44t9NY2 V9nGKmBEitj8yz7RA8LPLNeobD4Y0OJir7jOhdLKA+kYx/NZVXt+yfc3AEkenUdfhqDA sDh/5e8rusVFUZmXJZt6WmHGATrG53NfUwTzuTkMC8zRPmtJnVswWGnBCF/hjIKmeDvO nLnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=LikcDVwBhbS84Pit9yzkGJO9tMkkIp9vsHKDYOmclHo=; b=rOzuTxSCd/zvBNUGH33wKYtJa/vkiq7EcOxtpW2aNg8t3fX/3olmJs1I+ni7UYqUwS Ar7rcRtOupe0pWAuLbcp07F9nVmd11do6tv4PcY/Oh+6XfHCuiTcMeJL3PQz0Ayb5wZg EWuzIkbU4izle84xAhluXEqVV56QU/yzzxzYy8lHwJLE0lafPbsI6aZK3jQox0LPCeAe DAovSWsT1BdptayM6nbwII+q5Ir2rdWXwIYIcjcLFnkAuN3ImzO0QaQE72kEejujOWFb gYA1nSQRDjZUOMRc5JiCSRhOCzp54PFwcgGeHPgx2ZGp9+rsgZSLfrWf+XzPQRjTLCHD HoYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fJpUZCE+; 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 w2si55464045pgs.264.2018.11.24.14.19.07; Sat, 24 Nov 2018 14:19:22 -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=fJpUZCE+; 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 S1726639AbeKYJGm (ORCPT + 99 others); Sun, 25 Nov 2018 04:06:42 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36391 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726557AbeKYJGm (ORCPT ); Sun, 25 Nov 2018 04:06:42 -0500 Received: by mail-pg1-f193.google.com with SMTP id n2so4448959pgm.3; Sat, 24 Nov 2018 14:17:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=LikcDVwBhbS84Pit9yzkGJO9tMkkIp9vsHKDYOmclHo=; b=fJpUZCE+PBVqgv1KN9yNoWy4DThwrHWeOOpqbzNTbpXvPnxcwEXwA5f0ouurwZA3Ym PGahvuBNqdS4x+04oZ8QzDyTt3QxFzUWOa8ZUWE00Fc5INlUskK60lOWdt/xIDhjmCHZ f+kcrKCRg22CFTOSE1eJTd1mtstdhC23hmpc3OPRrNgqH0nlBYEeOfYS/p0UNfSj781q aJsL9rI8P4Ogxi6aesuWhMzR/PvY/gmmetZFmGg+61eLQ9uRMJc5ScDcn0sPUj/sfOEi 2OCXAXI/WtgOh12CbZMATZKVUwVxTsd4ePwcbDCFgRhvoQidT44rf0SfpSQ1XT+lL/YZ bWAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LikcDVwBhbS84Pit9yzkGJO9tMkkIp9vsHKDYOmclHo=; b=RgbS3vTaa0JNHpDM48xOJU/upihTS8DBTTRfJ1rE92gSeIUZh7QNgOAvJCpe3Cqsf5 jlkcRiYqTW7Skfb5Z1TehiXbjUN6MhOL2Z9YHyR5o96b8STe6bqC4oigy30uGlNkgAoh i2XKMnJDsrJRCxfE3kvo5Ue3Ylm9KVgcYHXs/Ef0eiJUIkcnfrurejzc2rIx8uDL19+P TpNjxbCkCqEARiMUIQGhXtYulrfFhXOIMMc+mtBt6SNI7gV6w/aRYMPIcnV1tvkTw9il BbL7f7t5zBXCKUs4k4FycGkkXKg5R67iqRZ4VlZZ2rtdfgSu+VOr9lvl1xLZLQwAc5Zv 6rBQ== X-Gm-Message-State: AA+aEWYYyNq/PaNFc9TLTSm5Q4W7mXFloOtQGFBjXou5bnNBzepjJHm2 rEiUa8KC4GGQgHGkYvotrow= X-Received: by 2002:a63:6645:: with SMTP id a66mr18838125pgc.390.1543097835114; Sat, 24 Nov 2018 14:17:15 -0800 (PST) Received: from ?IPv6:2601:282:800:fd80:f47b:a5b6:f52:61bc? ([2601:282:800:fd80:f47b:a5b6:f52:61bc]) by smtp.googlemail.com with ESMTPSA id e9sm46211812pff.5.2018.11.24.14.17.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Nov 2018 14:17:13 -0800 (PST) Subject: Re: [PATCH perf,bpf 5/5] perf util: generate bpf_prog_info_event for short living bpf programs To: Alexei Starovoitov , 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 References: <20181121195502.3259930-1-songliubraving@fb.com> <20181121195502.3259930-6-songliubraving@fb.com> <20181121221145.2cxph7zv27x7lbg6@ast-mbp> From: David Ahern Message-ID: <1fb2247a-debe-cdc4-2fec-76526dd07dab@gmail.com> Date: Sat, 24 Nov 2018 15:17:12 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181121221145.2cxph7zv27x7lbg6@ast-mbp> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/21/18 3:11 PM, Alexei Starovoitov wrote: > 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. > It should default off for those, but as I have said before users should be able to add bpf load and unload events to the mix of tracepoints, probes, etc they are monitoring.