Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp606871rdg; Thu, 10 Aug 2023 13:11:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGLGahfIblvYKmSbKvndie7aQcwBlib3KJIbWADRb5JkCdeggE1QtxFSW7I1pY6Y3DlWtIP X-Received: by 2002:a05:6a00:1a4e:b0:687:1780:aa02 with SMTP id h14-20020a056a001a4e00b006871780aa02mr3743150pfv.24.1691698293486; Thu, 10 Aug 2023 13:11:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691698293; cv=none; d=google.com; s=arc-20160816; b=SlQ/n7nZ2T2r4vEEe9xE/Wel/f/Wg3hRl2ARmVmCNMZ/RK7ABlkNSXgsvxjItaJ+tt WNODlB5vZZ+mAGCdpnNdMcPoVD8BFXa4/ow0fv60bg2Gv0GIupX2o96ADf0cdz6MByHa Cq0IgScvAzeu8yn0B96w0MyCkCs/JT4xa8x7LmREr/sX9C5dzxuUJkTG9a7kA4Lxvs0F vh81cuIEbSIIH8O2h7yvhQ14YRi9yHUay6ecHRD1ba1fj6pq+rIq6vjCzXZD0izquKCJ /Z9U1223EG7BX1gKNn0ZyXwpI0lMhsZFL2fgtexa6b/117J4z1Q2lsPyDIYFuwBEKx6L JPCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=2WWD5RZ7txT2y+bELeSkVRhqrv7guu+AZxZ+/B7ig64=; fh=l/mSnPpnsB+TfVY5GQlaOv2pwgOQNlGV+k1vdzu1o8k=; b=seyD/cIAad/aP7hRnA+C/R/zB4gTMitijDrWezJ3pjxNTyVZzehz8ZIHV9iVG8G/E0 ycjg3ccLsU5OkzAQSn+PBYH1iWAiqFJ8/HdW0mr6Szx7tqUKq/X4eCM0zCa2Vj/TWUDO tE0Q+A9bX3z3+4MQ8cpa3S26Rlk4MwYHO09w/YL8c/D4QFso30EoeMtmfCRonEblJMgi M+tCDl9Mt1+FsXQ05XTiBvB7NVi5VTP3N/clSQX6FwlvK1ZJQRJAfMNLlTMbR9uBoyW0 epIX8z9gqrAQJPV3o6rPoZHHB8ItQvJH8cg3TSQdfXyB9JkHPh+V3dioO3vtWw9sekj3 t4Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=o6wAtGQZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id eg11-20020a056a00800b00b0068717cf7f22si2011351pfb.31.2023.08.10.13.11.21; Thu, 10 Aug 2023 13:11:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=o6wAtGQZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235326AbjHJStF (ORCPT + 99 others); Thu, 10 Aug 2023 14:49:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236104AbjHJStE (ORCPT ); Thu, 10 Aug 2023 14:49:04 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3417C2706 for ; Thu, 10 Aug 2023 11:49:03 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5868992ddd4so16442387b3.0 for ; Thu, 10 Aug 2023 11:49:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1691693342; x=1692298142; h=cc:to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=2WWD5RZ7txT2y+bELeSkVRhqrv7guu+AZxZ+/B7ig64=; b=o6wAtGQZ+EMExEpuZahj/6wsFfkHVecrBuxbrUbdt4kWtVVWlsOch4CjsXbTwhXhxH zxl0RCAPlpLOCS/l8jd8aiJFY1P8RgMKDRhXUzHclXHUuM+GygFj1DEKAOeIRB29b1kv oSeQOZkYAoO6O808GInBOzO56yOKAMbzQf+rjffwfV5gfWwSX32XkyriMgY3psluxqNV X9novVdNaiywNUONa6PhYsD787KsL9D2WtcSr+O3ajPI/SXxFqoYCiE8Zd5o782PqCaL ALWFZ6CXNi2XIkKbUQHNSTnO6EGNfwEFqaEi04rZCxhtRHiWuOOQOkp/5m+co1mjQcXY ttqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691693342; x=1692298142; h=cc:to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=2WWD5RZ7txT2y+bELeSkVRhqrv7guu+AZxZ+/B7ig64=; b=HMeBd++UtsBAY9fIB/HNq2DYZ8gwh8Fr6uznb2kkWiG9+gV6VazVBGSYxTpqn/IYC1 HBzvDhCK+iypMeYfIEjaMiXuBpA2RSYRhH3KtsCjQQp/J40Ck/cLo8c+iIMbO+h2MUyB 2gtTQH6IgkU5l8sgo55Zz43axKV1x2fa/06B4Gf4NVbK/3OVlChvdvA839oPVegih+P4 nTz1ufbgQGzXnxVhq/CjHL09qNr0Yl5ZvgxXjpxYlvb7X1NWp5bV217oFqZ+lId0yeV+ q0j9jq3K9NGb419KKYRnxjjypt3lCjPYVRsoFjnCYGhPExQul4UC8uoyLxSf5w+iLFVd cyaw== X-Gm-Message-State: AOJu0Yxr4vX76c3GeFOhVodIGsXbB/V+WlY5xSiwmRp5Aq1gaRXJ61gz qVMzxaVVDdxGDMxwHlmVd14EkHv4AQXd X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:797f:302e:992f:97f2]) (user=irogers job=sendgmr) by 2002:a81:af06:0:b0:581:7b58:5e70 with SMTP id n6-20020a81af06000000b005817b585e70mr68906ywh.5.1691693342432; Thu, 10 Aug 2023 11:49:02 -0700 (PDT) Date: Thu, 10 Aug 2023 11:48:49 -0700 Message-Id: <20230810184853.2860737-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.41.0.640.ga95def55d0-goog Subject: [PATCH v1 0/4] Remove BPF event support From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Tom Rix , Fangrui Song , Anshuman Khandual , Andi Kleen , Leo Yan , Madhavan Srinivasan , Carsten Haitzler , Ravi Bangoria , "Naveen N. Rao" , Athira Rajeev , Kan Liang , Yang Jihong , James Clark , Tiezhu Yang , Eduard Zingerman , Andrii Nakryiko , Yonghong Song , Rob Herring , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, bpf@vger.kernel.org, llvm@lists.linux.dev, Wang Nan , Wang ShaoBo , YueHaibing , He Kuang , Brendan Gregg Cc: Ian Rogers Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch series removes BPF event support as past commits have shown the support has bit rotten: https://lore.kernel.org/lkml/20230728001212.457900-1-irogers@google.com/ Similar functionality is now available via the --filter option, that uses a BPF skeleton, and is therefore more compact and simpler to use. The simplicity coming from not having to build BPF object files. A different use case for the events was for syscall augmentation in perf trace. So that this isn't broken, and to make its use significantly simpler, the support is migrated to use a BPF skeleton. This means perf trace is much more likely to augment syscalls for users. Removal of BPF events was raised on LKML two weeks ago with the original authors cc-ed: https://lore.kernel.org/lkml/CAP-5=fXxGimJRXKf7bcaPqfjxxGcn1k3CspY_iSjQnpAKs3uFQ@mail.gmail.com/ BPF events are described publicly in very few places but one is: https://www.brendangregg.com/perf.html#eBPF "eBPF is currently a little restricted and difficult to use from perf. It's getting better all the time. A different and currently easier way to access eBPF is via the bcc Python interface, which is described on my eBPF Tools page. On this page, I'll discuss perf." I don't think the "getting better all the time" is any longer true as BPF features are being added to perf primarily by using BPF skeletons. The given example is a filter and would be better supported via "perf record --filter". Ian Rogers (4): perf parse-events: Remove BPF event support perf trace: Migrate BPF augmentation to use a skeleton perf bpf examples: With no BPF events remove examples perf trace: Tidy comments tools/perf/Documentation/perf-config.txt | 33 - tools/perf/Documentation/perf-record.txt | 22 - tools/perf/Makefile.config | 43 - tools/perf/Makefile.perf | 19 +- tools/perf/builtin-record.c | 45 - tools/perf/builtin-trace.c | 310 +-- tools/perf/examples/bpf/5sec.c | 53 - tools/perf/examples/bpf/empty.c | 12 - tools/perf/examples/bpf/hello.c | 27 - tools/perf/examples/bpf/sys_enter_openat.c | 33 - tools/perf/perf.c | 2 - tools/perf/tests/.gitignore | 5 - tools/perf/tests/Build | 31 - tools/perf/tests/bpf-script-example.c | 60 - tools/perf/tests/bpf-script-test-kbuild.c | 21 - tools/perf/tests/bpf-script-test-prologue.c | 49 - tools/perf/tests/bpf-script-test-relocation.c | 51 - tools/perf/tests/bpf.c | 390 ---- tools/perf/tests/builtin-test.c | 3 - tools/perf/tests/clang.c | 32 - tools/perf/tests/llvm.c | 219 -- tools/perf/tests/llvm.h | 31 - tools/perf/tests/make | 2 - tools/perf/tests/tests.h | 2 - tools/perf/trace/beauty/beauty.h | 15 +- tools/perf/util/Build | 8 +- tools/perf/util/bpf-loader.c | 2006 ----------------- tools/perf/util/bpf-loader.h | 216 -- .../bpf_skel/augmented_raw_syscalls.bpf.c} | 35 +- tools/perf/util/c++/Build | 5 - tools/perf/util/c++/clang-c.h | 43 - tools/perf/util/c++/clang-test.cpp | 67 - tools/perf/util/c++/clang.cpp | 225 -- tools/perf/util/c++/clang.h | 27 - tools/perf/util/config.c | 4 - tools/perf/util/llvm-utils.c | 612 ----- tools/perf/util/llvm-utils.h | 69 - tools/perf/util/parse-events.c | 268 --- tools/perf/util/parse-events.h | 15 - tools/perf/util/parse-events.l | 31 - tools/perf/util/parse-events.y | 44 +- 41 files changed, 133 insertions(+), 5052 deletions(-) delete mode 100644 tools/perf/examples/bpf/5sec.c delete mode 100644 tools/perf/examples/bpf/empty.c delete mode 100644 tools/perf/examples/bpf/hello.c delete mode 100644 tools/perf/examples/bpf/sys_enter_openat.c delete mode 100644 tools/perf/tests/.gitignore delete mode 100644 tools/perf/tests/bpf-script-example.c delete mode 100644 tools/perf/tests/bpf-script-test-kbuild.c delete mode 100644 tools/perf/tests/bpf-script-test-prologue.c delete mode 100644 tools/perf/tests/bpf-script-test-relocation.c delete mode 100644 tools/perf/tests/bpf.c delete mode 100644 tools/perf/tests/clang.c delete mode 100644 tools/perf/tests/llvm.c delete mode 100644 tools/perf/tests/llvm.h delete mode 100644 tools/perf/util/bpf-loader.c delete mode 100644 tools/perf/util/bpf-loader.h rename tools/perf/{examples/bpf/augmented_raw_syscalls.c => util/bpf_skel/augmented_raw_syscalls.bpf.c} (93%) delete mode 100644 tools/perf/util/c++/Build delete mode 100644 tools/perf/util/c++/clang-c.h delete mode 100644 tools/perf/util/c++/clang-test.cpp delete mode 100644 tools/perf/util/c++/clang.cpp delete mode 100644 tools/perf/util/c++/clang.h delete mode 100644 tools/perf/util/llvm-utils.c delete mode 100644 tools/perf/util/llvm-utils.h -- 2.41.0.640.ga95def55d0-goog