Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp838940pxb; Thu, 17 Feb 2022 16:14:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyydDVLbj8+XIRufpvIQxtj3zBykfvp+PHdaW2uRR5olyVviH/4j1dN50kM/kSLWp7Jej5b X-Received: by 2002:a05:6a00:a0f:b0:4e1:309:83c0 with SMTP id p15-20020a056a000a0f00b004e1030983c0mr5441130pfh.68.1645143299151; Thu, 17 Feb 2022 16:14:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645143299; cv=none; d=google.com; s=arc-20160816; b=gSL0uUBaMMmcFZ68YgWWWr4ypHkugoU+bG36KQ96n4Mjr6Bf9FfvEC0pYiOhdiYhu2 n/ey+mBK1sjL7qHGI3qjgQ2u/sfFA1sm0lCqRYPquBOk9J9qZtgHHO1AfiqXLvasmwWP 6Ps+vlwQd+uGmK49fJIN3bYae8ne+IEc32KQwJKzPHVyVUUWuk+K6vmmOca6r2HsZaKm 9Flr9u+Hxo6Ny6sG+MSsXpYGRDpKPgcq1axNAf2mQb4OFyNBLHGzO5AplS1rVnpZn+Yz koMHywJd8pRMGztP7mS+69MnQINDTHuIo4E5XTkEinCsbbm10sNjtuICnMf1Fey9hiua oeFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qeS3AFvIrt9b23TIv9eo9p1Mm6RgFJWIc0yqUUQ3jyo=; b=vBF5xAAj4X9iwozOrsS819rypL2dqFGDJv73U//e5ZUBfhFyhhVPfqDpNGT+InHA4R Sp+DmTCYj/yAfFkstGoIGAE+6SRCBe0VWHhF4rr0ArHH5yOyQflrpBh8F7T3fYypVVDI 5P//+XzpPAlf0jOLOwEclECHNZVg8K+JjdNAAXq5sZXS9OoCVvXo7DUhaJ2nsqTz7XZP plC8ocRpK+o3bmTS5Z77OSAqBvGN41ZeSvS1Q+HI1Sbk8Wqgqhbe+LHq2zcP8DgATKcM VQwRuPxIRUT6Cr54xXM5JiS0whxrGe/AO61qWXCLWIpUkfhaOTT5oXMLRjmPYF3FRzPk zBGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WHelvKVD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m5si6112101plt.242.2022.02.17.16.14.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 16:14:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WHelvKVD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E1EAD2E96A2; Thu, 17 Feb 2022 15:39:56 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240834AbiBQNTh (ORCPT + 99 others); Thu, 17 Feb 2022 08:19:37 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:41758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233011AbiBQNTg (ORCPT ); Thu, 17 Feb 2022 08:19:36 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DE912AE714; Thu, 17 Feb 2022 05:19:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5F27B61BC4; Thu, 17 Feb 2022 13:19:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 237E3C340E9; Thu, 17 Feb 2022 13:19:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645103960; bh=4EyEkWFqrHHaf+rJiEPSN1RBWYPrrcSmy23C9np2YRk=; h=From:To:Cc:Subject:Date:From; b=WHelvKVDfsFke/qLmJjKQGeO8J1BcsSAKCuZxV0PTASlG9ZPvNcNPNOXjkVnBCaDI HJOO/HpMbDQK0/hYuhTnR8ZR+xtJWLQo3ckgjpWVivqMuW0j2U+7ALXRBYx3eX/Hoq PicImU5n68NVmWZ/GTb6ueBRq+h/VS6sGM6gKr85nuD7ASr8Yh+Abmfo6VoUVK40/8 5P+fKQ7W0ndWpVAhe4+ajU5gEjkhg8CcjKGLiYI9Tha5e2+TbQ+ag5/kxvtvQPxyNc kPns+u0TTRpyjfQ8/bdTZJJEQFO2F1b//Nj0v+bz1JsS/lwbROfvyeYqGog0r5+Ep9 Rb74O5dcuCiKg== From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , Peter Zijlstra , Ingo Molnar , Mark Rutland , Namhyung Kim , Alexander Shishkin , Ian Rogers , linux-perf-users@vger.kernel.org, bpf@vger.kernel.org, Andrii Nakryiko Subject: [PATCHv2 0/3] perf/bpf: Replace deprecated code Date: Thu, 17 Feb 2022 14:19:13 +0100 Message-Id: <20220217131916.50615-1-jolsa@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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 tools/perf/util/bpf-loader.c | 267 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 230 insertions(+), 37 deletions(-)