Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp992474imu; Fri, 9 Nov 2018 09:11:56 -0800 (PST) X-Google-Smtp-Source: AJdET5foanoPCk9npLUPqMnM6gUBJKMibRsCsq2R/fJpc133MINdIXhc8ROVbhsKrCoh6TtdLsM5 X-Received: by 2002:a17:902:27a8:: with SMTP id d37-v6mr9852701plb.0.1541783516197; Fri, 09 Nov 2018 09:11:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541783516; cv=none; d=google.com; s=arc-20160816; b=g4IuD0VHcewaesK6BWByBLybBGNY060KDTQmSr1013+77evWp9hdO5kyPEYtmOMmWp UAA1Q6oyb0TR7syaYSx9P7SdLhWKq5FEksrfSCsUDBd2ZbYf1z9wjt+O5ySbRfTxNdW4 Gx4Q397qQ+qd0DrrtHuiAtrMc5kw/3t48RT+UlwzId+vhj4peoOHwEeje2rNxIY8eMCC k6ghHx5FAkTTfN225SVOOlq/1GDYc/5ynr2rcT15xsv2suOcZXGIS9DEzmF87LlOwSdH bwm2wH4a6QePxwETxcJ2FPt/ZZWCuosEWj7NMqdJTTH3ntL0DSIuPV5xTGV3bWr3RjMc COHQ== 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=LEok+XwZ4rVtYqKnYBBuAW3zq87JeoaRr10G6fg8Tvs=; b=R2mByW5ItZnQMhJcHyOM7p25MSJey0hJulyWTM4PqgF1Ntays4VFQtrAZ8ecedqBwm l6hZh2ZrA+ZUZi8B5uWx7RA8cfVuHoEJaSc++DICE/bpVj00ULg4HvH98vFdu0wHJkD5 j3+LV46FhxCXfiBSLPqJqEveZr+mckSAdulVEa0Xh7jh1te5kFUDoJiLJEuYIDAC7PKo or7Yy2i4wRNLNtf8QfREd2/rH4ca6/9earE/GhQTbtgDTkfL0Fy4H8CwnPowVVUbfbpZ 9bKqvLe5n/BiqpcsNn5vD5w5tP1w830h/W87B71U3I5Y+V7QLpJ9qRW32h3zT3GN5Nci O1Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RU17yqha; 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 s2si6865799pgj.60.2018.11.09.09.11.04; Fri, 09 Nov 2018 09:11:56 -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=RU17yqha; 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 S1728453AbeKJCth (ORCPT + 99 others); Fri, 9 Nov 2018 21:49:37 -0500 Received: from mail-pl1-f176.google.com ([209.85.214.176]:33875 "EHLO mail-pl1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727961AbeKJCtg (ORCPT ); Fri, 9 Nov 2018 21:49:36 -0500 Received: by mail-pl1-f176.google.com with SMTP id f12-v6so1220877plo.1; Fri, 09 Nov 2018 09:08:09 -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=LEok+XwZ4rVtYqKnYBBuAW3zq87JeoaRr10G6fg8Tvs=; b=RU17yqhanwT0vvD2QZJjy+6DD8MTEZpq2DDcOJ2JCj2SIwYNhftK/keIstmOc8esnl GEItK59hIMfN9vS3zTVi2fEDyyq/UyBvKoMlrbn/fsCSFzdxR2ryY1vAnkdC2vfP/GJu B5LF2F7nFFJcr/nxg4jE4qbE1S9TojEkh7qXKHCdA9ERH64l3U7cq76/ZgwCiaUd2IJ1 bFxBtA9woUwXSp22/SYMgxIS3dae0ParU0t70Zo1fnKigvZtt/0Md2FWgOMwxta1ZZ5L OaJAzjY7kksTyKmE/ZmJryArW+fQc+dwceYs7S2OCi1CqR8gIcYy9CEbnUAXRYIUDxX8 O6VQ== 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=LEok+XwZ4rVtYqKnYBBuAW3zq87JeoaRr10G6fg8Tvs=; b=n2RH0Y4LBx9AGdpqwcKiDtowkoXHCoKdlUJWgaBG5aZobJ+QniLxNshGn98KrAtXGn iZn03y7WyIzErGMtNDNGiUwDn6hp7t47W69iNdwXSXS4ETyCBq2MhLUu/le79C6qrShn yaMnYN9P7iQwK7gHFHFkPE8SZUNWFxzGxftGKdiWvSRrc7+00ZA++0to5abX7NtPBcWt YiUz9V6t98TMRmto0AlXcrutAbmhGomhdi/pFM+0ME94/7y19//POGPoo3cSuAScRVff rTeRPovqRGRV8lgBTU/RRM89wHsyuvTtGdlGnteG9Ki/ogkZ/VcpxE2u6SM+rGXYQ50l rY3A== X-Gm-Message-State: AGRZ1gIWyIDblbJV8w3lbaBBJePv8XSUY3HyPzaAYBeZiKfvsbv507cF 4Pr0UEdWBNXMiY80wnp4Bwo= X-Received: by 2002:a17:902:28e7:: with SMTP id f94-v6mr9747487plb.297.1541783289507; Fri, 09 Nov 2018 09:08:09 -0800 (PST) Received: from ?IPv6:2601:282:800:fd80:d22:ab19:3958:9c63? ([2601:282:800:fd80:d22:ab19:3958:9c63]) by smtp.googlemail.com with ESMTPSA id u76-v6sm9270689pfa.176.2018.11.09.09.08.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Nov 2018 09:08:08 -0800 (PST) Subject: Re: [RFC perf,bpf 1/5] perf, bpf: Introduce PERF_RECORD_BPF_EVENT To: Song Liu Cc: Peter Zijlstra , Netdev , lkml , Kernel Team , "ast@kernel.org" , "daniel@iogearbox.net" , "acme@kernel.org" References: <20181106205246.567448-1-songliubraving@fb.com> <20181106205246.567448-2-songliubraving@fb.com> <20181107084057.GG9781@hirez.programming.kicks-ass.net> <31067290-4B66-4AA1-8027-607397BC0264@fb.com> <20181108150028.GU9761@hirez.programming.kicks-ass.net> <050ABAC6-6C3B-4B6B-BB68-727127E00B51@fb.com> From: David Ahern Message-ID: <37d2c7a8-fe99-94bd-9b8f-24e9ca9fa39c@gmail.com> Date: Fri, 9 Nov 2018 10:08:07 -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: <050ABAC6-6C3B-4B6B-BB68-727127E00B51@fb.com> 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/8/18 11:49 AM, Song Liu wrote: > Could you please point me to more information about the use cases you worry > about? I am more than happy to optimize the logic for those use cases. bpf load and unload as just another tracepoint to throw into a set of events that are monitored. As mentioned before auditing the loads and unloads is one example. And that brings up another comment: Why are you adding a PERF_RECORD_* rather than a tracepoint? From what I can see the PERF_RECORD_BPF_EVENT definition does not include the who is loading / unloading a bpf program. That is important information as well.