Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp300719rwr; Thu, 4 May 2023 19:36:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6fLTHdGss6xtp7E1bjuivQwRZ/0usmutER+G1oNqpUx7QrV/G0xnyr1euRApzqddE2MiAT X-Received: by 2002:a17:902:e808:b0:1ab:275:5abf with SMTP id u8-20020a170902e80800b001ab02755abfmr6593789plg.55.1683254165550; Thu, 04 May 2023 19:36:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683254165; cv=none; d=google.com; s=arc-20160816; b=Rqi/zKZ/FCDKdYpV/DtvW/6Y5utxMeqtt65B4/nCXZj+u4eYE9P72F4DdThN8HjiDJ sGAaS0EyJ1m5gAh1fe7yfgxiVhwXwnDSs0pfG3mQsgqcMA6ZyA//ghz261R0y5OICj1Y onI8jM0hlCfBK6y1UraysoJfI2en7uofsfy5ktxc6fquABfobRYX4jbHeQrYVfb+ndmp qAscADO6XPcTI2QJQRbjmN/8WkSRXm56B/SfTv0gLjeG4MjQu9+WRtAbHj/OvqUHaH32 lHD9/0oHdLNdtZNCg607ir1MgtnLahIl4A/VFccKzT3Me7RHge2/b7ZbG3q9D4fyy/Ax cXVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=gQ9dngxBPXkOo0MKzffBpb33IWXsDgv3I+3QI+7ndVs=; b=EuxBrVGVnA7/SVuiU6LPm7bccvCLWl108Xx0/J1v//EHcu9m37QkfZvD39+tYC64TP g2yhd3RLbPDAUKl4tCljUUFgl7YBIDZuwfS+F1unwJx5EhqKdZ8XdbAthBSZEjrrIWQT 7T/oArh2HhTNh0/gVtONXwRVgASv+BkjvG1o0lWhAgS4u02iM0NZIze0WgGmw43FYnYg 1FV+h9NJEIC97KaQQktT5edvHC3SWNY7tkfiYUgTj/NYAvwMrz88uucY/1gbRc0uEC8d H+xRDEeZMcTkEJG/J5+XoRAtG24syMXeGNc7ENUMImbvTia/j84HkUDBAPpS0JdRrGP1 6a1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ffkyqnOK; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s10-20020a170902b18a00b001a804319df8si535329plr.391.2023.05.04.19.35.50; Thu, 04 May 2023 19:36:05 -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=@kernel.org header.s=k20201202 header.b=ffkyqnOK; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229939AbjEECBW (ORCPT + 99 others); Thu, 4 May 2023 22:01:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjEECBU (ORCPT ); Thu, 4 May 2023 22:01:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3825C120A9; Thu, 4 May 2023 19:01:19 -0700 (PDT) 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 C05D263ABB; Fri, 5 May 2023 02:01:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A344C433D2; Fri, 5 May 2023 02:01:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683252078; bh=ZS3YDRfyUL+4s0HOmEwczt4nBL9aZThHgS9wOj3+vr4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ffkyqnOKrju+rUXMKoV75RJb5s5sv55V0F42e5sa607EgsmfWuHCz0kl+oAIWye5L vhEgikIJO5LtPoitHQqyZ7wloDkpxS+pmfv3w+p86MiiwqLp1Ix4E4oxsf9rINM9YO ftqafPuSpWHWf2+efacxolKYFbzJbhlpR+RNQBf3tQO+EQmy+tKq9Q8ro8sdnAei6W dnf7FECjGRdGjyfQwRMkIqigAiDbuRJzAEoYEwepH24hAV7KDMOF+InF83NSxdUkKu w7GIng5kd+GtCAe2g/2zM9VJAkI/EFLSb9zNHJzJZnVsc1KuBMk1pqsTrikGHBaUZz 5nvGQOIzpikOQ== Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-4eff055d4d3so1353192e87.3; Thu, 04 May 2023 19:01:17 -0700 (PDT) X-Gm-Message-State: AC+VfDxXYFdxK39wkv6m71xQuxaE/KyUCvf66Wr2s9gQIlFtOTgBUrXo 7qO+yTWEyPWZnzyFxy2gCyGFwblyOBshtNt7R8A= X-Received: by 2002:ac2:5963:0:b0:4ea:e799:59f9 with SMTP id h3-20020ac25963000000b004eae79959f9mr50823lfp.66.1683252076056; Thu, 04 May 2023 19:01:16 -0700 (PDT) MIME-Version: 1.0 References: <20230412182316.11628-1-9erthalion6@gmail.com> <20230421205610.xawzzfy36iskcoyx@erthalion.local> In-Reply-To: From: Song Liu Date: Thu, 4 May 2023 19:01:04 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH] perf stat: Separate bperf from bpf_profiler To: Arnaldo Carvalho de Melo Cc: Namhyung Kim , Song Liu , Dmitry Dolgov <9erthalion6@gmail.com>, linux-perf-users@vger.kernel.org, Linux Kernel Mailing List , mingo@redhat.com, jolsa@kernel.org, irogers@google.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 Fri, Apr 28, 2023 at 6:44=E2=80=AFPM Arnaldo Carvalho de Melo wrote: > > Em Fri, Apr 21, 2023 at 10:56:10PM +0200, Dmitry Dolgov escreveu: > > > On Wed, Apr 12, 2023 at 08:23:16PM +0200, Dmitrii Dolgov wrote: > > > It seems that perf stat -b doesn't produce any results: > > > > > > $ perf stat -e cycles -b 4 -I 10000 -vvv > > > Control descriptor is not initialized > > > cycles: 0 0 0 > > > time counts unit events > > > 10.007641640 cycles > > > > > > Looks like this happens because fentry/fexit progs are getting loaded= , but the > > > corresponding perf event is not enabled and not added into the events= bpf map. > > > I think there is some mixing up between two type of bpf support, one = for bperf > > > and one for bpf_profiler. Both are identified via evsel__is_bpf, base= d on which > > > perf events are enabled, but for the latter (bpf_profiler) a perf eve= nt is > > > required. Using evsel__is_bperf to check only bperf produces expected= results: > > > > Any thoughts on this? I would appreciate clarifications if I'm missing > > something. > > Namhyung, Song, can you please take a look at this? Sorry for the late response. The fix looks good to me and worked well in my test. Reviewed-and-tested-by: Song Liu I guess we also need: Fixes: 112cb56164bc2 ("perf stat: Introduce config stat.bpf-counter-events"= ) Thanks for the fix! Song