Received: by 2002:ac2:5a04:0:0:0:0:0 with SMTP id q4csp945528lfn; Fri, 18 Feb 2022 01:18:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxN1GHn6UQ0E7Q0GFOaV/ioReOXrKyW/RsvpXjVA1n04cDjpey4fe4KdkC3Vlhr3sZ8Irjy X-Received: by 2002:a17:906:ae56:b0:6ce:375a:4b93 with SMTP id lf22-20020a170906ae5600b006ce375a4b93mr5771935ejb.189.1645175889648; Fri, 18 Feb 2022 01:18:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645175889; cv=none; d=google.com; s=arc-20160816; b=k0yjWIDMc9VpUIq3XspsJF5lOUpgwKqF+zpOFY6LVTRtYqX5xFiKmCzFDJaRgm6P/V wubEEihHcHOQpHmlbTqw0tYsf0BDV2elPqOA/mHg0Gc0pjBSu+L5pnHB6Rgk+nRAhb/3 m67kvw5cGextE8agcGUaYDWtzrUCXSpkXI7W2V4UGqDF7N+LebED2Q1olm5WmB9Kj1xZ TGzPVNpBJ0bNlOTPNd0PqRiMFrb4UBBSm9upEZnQ8p3hvNclURdi3Ey40v5/lr73Crpe 4A6Jnl7rqXGAOCVFR/BumcZv67tem/ItliQKrtJ9ubmCocXF5NXQKA96uOnFCiJ2f+xg f7vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Zt/INQArzFP2YspYBVAWXDYYTQUHjLodpxi7D41llRw=; b=Pxnw10gq/o7j+svag+seOuXRKYaQEWAjn/EpxcvHW1ulL7nzMx8gPdDbUWHAjnLINy qvJNZqIZxgyDHYml7JwnkZ8fkqPTl84XxDkX5f1xYcAbop6uGTPueat2MFpJ499ItZxJ dSwJd/r74OPkynqXigCQrpPtTccprEY3oszyOjM5k63hpZ+ZWl8OxlFSxwCvn7yP7oIg NTpP/RdsUuV1DOfdJtdd8n/ppVyXYJWkrVjl25ouJ5P6XZDk/+21wshB2PooRVgV2L+/ HrAc+ZuE0/pDcMg0lTr9t9mOeYwrSwsY9TKzDAOKC8kHkZxtfxdUfIMpk7OhmI52N0fy M0GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="ksmSLR/l"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ej18si4490337edb.158.2022.02.18.01.17.46; Fri, 18 Feb 2022 01:18:09 -0800 (PST) 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=@gmail.com header.s=20210112 header.b="ksmSLR/l"; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233029AbiBRJCV (ORCPT + 99 others); Fri, 18 Feb 2022 04:02:21 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:56934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233040AbiBRJCS (ORCPT ); Fri, 18 Feb 2022 04:02:18 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF529546AE; Fri, 18 Feb 2022 01:02:01 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id v12so13393331wrv.2; Fri, 18 Feb 2022 01:02:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Zt/INQArzFP2YspYBVAWXDYYTQUHjLodpxi7D41llRw=; b=ksmSLR/lTnudWA58lc+ENSY99WBfEIJ9m4SWkf1/iGjZZY6xnpmH6KF71FJIZQ3tkA oP0gbzPmxBK7JTlyEJr33FYiAXANcxtJd10i9dL17Ze4uFSKLzWohJZlIu0yDbe/nZBU 3EC4u8JSjVSmxG7LftBTCBrvckukNdqzD5t13pVOV3J//eGRl0eBk+z5upYYmhIJjSwP iRVIaT0Bj5rVvP57puhsBgmdMUOMSDF1GB/y55HZhRyRGRLybeic3uuahp5X1dqMzPgj C5UO4hUBk1YoE1R1+BC0KRXqNp0Ae7/biaLUmOObX9szSauvKWcZ3Pi4xacae7dMHWKT RkLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Zt/INQArzFP2YspYBVAWXDYYTQUHjLodpxi7D41llRw=; b=CJKi6WpSZ8RK1EI0rvYs6NXJPreJr/rXaJtoykc2NV2eCiVNZEpcQ8kgMgGVFGhpuj uReGnc/ZegBfygIie8c4dDxaE8rvCA60oD5jAK2OOSxAvmwMD2C6svuTJrfMHtuGkQP0 bdzylm5eYBplgCwmQ3jjwAy3M+5uu9ZaW52TECYZHWhSeq5fBDlai9/IavVN2df9ZHIe GcGvIi4N++MR2OFcc7hE2S0RAs/JFnpHeM8FmIcudXeDhPJxGS6FptnrWDFIq9OLaJZt HsgbvfMcwGnPYXTWQBAKn5H/0vi0JB02HzvCn0beOuK4SGMLXWHLimHUsHcvb8g6OEBX is8w== X-Gm-Message-State: AOAM531NwEbL6filCA1BZjYUsnXpwDgcgzKs0ei8Nw/MBduPwchsK9bw jewt4EHZWVqJzWJwIBuh4z2xcWw89ySF1g== X-Received: by 2002:a5d:6c68:0:b0:1e8:9827:b978 with SMTP id r8-20020a5d6c68000000b001e89827b978mr4909654wrz.633.1645174920533; Fri, 18 Feb 2022 01:02:00 -0800 (PST) Received: from krava ([2a00:102a:5012:d617:c924:e6ed:1707:a063]) by smtp.gmail.com with ESMTPSA id s7sm11525680wro.104.2022.02.18.01.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 01:02:00 -0800 (PST) Date: Fri, 18 Feb 2022 10:01:56 +0100 From: Jiri Olsa To: Andrii Nakryiko Cc: Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Ian Rogers , "linux-perf-use." , bpf , Andrii Nakryiko Subject: Re: [PATCHv2 0/3] perf/bpf: Replace deprecated code Message-ID: References: <20220217131916.50615-1-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Thu, Feb 17, 2022 at 01:55:13PM -0800, Andrii Nakryiko wrote: > On Thu, Feb 17, 2022 at 5:19 AM Jiri Olsa wrote: > > > > hi, > > the original patchset [1] removed the whole perf functionality > > with the hope nobody's using that. But it turned out there's > > actually bpf script using prologue functionality, so there > > might be users of this. > > > > This patchset gets rid of and adds workaround (and keeps the > > current functionality) for following deprecated libbpf > > functions/struct: > > > > bpf_program__set_priv > > bpf_program__priv > > bpf_map__set_priv > > bpf_map__priv > > bpf_program__set_prep > > bpf_program__nth_fd > > struct bpf_prog_prep_result > > > > Basically it implements workarounds suggested by Andrii in [2]. > > > > I tested with script from examples/bpf that are working for me: > > > > examples/bpf/hello.c > > examples/bpf/5sec.c > > > > The rest seem to fail for various reasons even without this > > change.. they seem unmaintained for some time now, but I might > > have wrong setup. > > > > Also available in here: > > git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git > > perf/depre > > > > thanks, > > jirka > > > > > > [1] https://lore.kernel.org/linux-perf-users/YgoPxhE3OEEmZqla@krava/T/#t > > [2] https://lore.kernel.org/linux-perf-users/YgoPxhE3OEEmZqla@krava/T/#md3ccab9fe70a4583e94603b1a562e369bd67b17d > > --- > > Jiri Olsa (3): > > perf tools: Remove bpf_program__set_priv/bpf_program__priv usage > > perf tools: Remove bpf_map__set_priv/bpf_map__priv usage > > perf tools: Rework prologue generation code > > > > It's great that you are deprecating these, thanks a lot for that! I > suggest to also doing libbpf_set_strict_mode(LIBBPF_STRICT_ALL) to will check > check that libbpf 1.0 won't break anything. For example, you'll need > to use a custom SEC() handler to handle those quirky sections that > perf allows. This patch set has landed in bpf-next, so you should be > good to go. ah ok it already got merged.. I'll add it in new version thanks, jirka > > > > tools/perf/util/bpf-loader.c | 267 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------- > > 1 file changed, 230 insertions(+), 37 deletions(-)