Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1399428rwr; Fri, 5 May 2023 13:33:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5S/8U7U/hrNRu4ZAl2+Ddbvr0nb8amA1+efL7u27fkMYMeSLDcsRGoqAgWYTxbIE/lW3DL X-Received: by 2002:a05:6a20:914d:b0:ef:e240:b559 with SMTP id x13-20020a056a20914d00b000efe240b559mr3726310pzc.46.1683318833621; Fri, 05 May 2023 13:33:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683318833; cv=none; d=google.com; s=arc-20160816; b=WiA027KAgBUwbX5FY5iVzQH676XyS9T0OZ6CrB7Qq24z3tqDfRF0TsHvx0l0iyUqeG ogY6+hfmbeBMGis61Yij1IZDHnvPdRYbYYvZKwqHhAXD5NMX8HPRMNTxU/nAEkFqr3Zz Hnuzsk7gQar3wej/jAzI9y7joWIpxzPBlQUG0E0BRgELYcMSa5ztXNGlJHzsMfjiTEz4 NGHhH9D8Jt7OO8A3Ohr0U+CY1wurgZ15Xr5QCVcdyLs6G7f0NHaS4kLKcdnVV3Vtq+PS tHnyLLTiIn3ZXddlxIaHMRsuzXm7mGEq/TGnu+qfu8Za1pLVMh++aEq95Z8W0aURuwiX O8vA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FD1ZEgJ+JcyJKVGM/LP2ItcBErT/QaoOg81t0+UqhF0=; b=xtPSXHtETEMYfo2ovnidkivR2KrNs5vRUslTiwloHC1BQzLz3WmbCNN6fVQhTEeRej NM3oCHGHlYPkKx6ZCyQQAHDc+pnwQblbkioQ5nCCWBGbxOK+nFYWqHLnigMZW/IF7En7 XcXAOhlc3yjYbVUXy5lg1EojTym9+mD/2JQ3IQeYCE+upopHilhAU0m85AbfqMAH5Ic9 1jjqhfoIxaLk6/UxnrzBiT7RQmL3dWkc3bfC06wu/Ex6RiDzIE572MeWX2n9TiauN17l iMCvw/1P6YTE0m2tnthqNFHmaDf2e7+mwyQvPypXnULO6xjSFy+YDirebsOlgGIv502K wk2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="E1tN/DMa"; 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 e123-20020a636981000000b00513579041bfsi2751902pgc.636.2023.05.05.13.33.41; Fri, 05 May 2023 13:33:53 -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="E1tN/DMa"; 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 S233204AbjEEUcV (ORCPT + 99 others); Fri, 5 May 2023 16:32:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233196AbjEEUcU (ORCPT ); Fri, 5 May 2023 16:32:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA5F740FB; Fri, 5 May 2023 13:32:18 -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 745C260FE1; Fri, 5 May 2023 20:32:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9131C433EF; Fri, 5 May 2023 20:32:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683318737; bh=fct4miS7THl0IRl6CPk0AuNGd4Gp/qV10BUwUPAtSqI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=E1tN/DMaahewTwKwF+Bm37W+jHD8igWbS0PpBeMj6sp85N0PQvRPoEStVb3fCjD7b 3W4y02HqmH2Nija1ImD/d6OoUvcB0Vc/rY6fx7CPPFmiLrscWkcclg3UYMXVE33iv2 SBMwyMww9XeCLrz/tlClAmoZbVA6pdD5CYJkTDSLc7sZ+4yZwG30Jp+ryRnd6QREyG D+klYt2bAMtpPozT5qsoqIyBfYpD//bR437/bp/Nc6QA47NWludkSJChQ0bS2qtkq2 uKVPNdyxN/4nvsGN1rpdLd+hbia8W15CIjmwcEuhOWe7MEnqTMewQRxnxxlfj/m317 ExEpwwIfHvkjg== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 88F79403B5; Fri, 5 May 2023 17:32:15 -0300 (-03) Date: Fri, 5 May 2023 17:32:15 -0300 From: Arnaldo Carvalho de Melo To: Dmitry Dolgov <9erthalion6@gmail.com>, Song Liu Cc: Namhyung Kim , Song Liu , linux-perf-users@vger.kernel.org, Linux Kernel Mailing List , mingo@redhat.com, jolsa@kernel.org, irogers@google.com Subject: Re: [RFC PATCH] perf stat: Separate bperf from bpf_profiler Message-ID: References: <20230412182316.11628-1-9erthalion6@gmail.com> <20230421205610.xawzzfy36iskcoyx@erthalion.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Em Thu, May 04, 2023 at 07:01:04PM -0700, Song Liu escreveu: > On Fri, Apr 28, 2023 at 6:44 PM 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, based on which > > > > perf events are enabled, but for the latter (bpf_profiler) a perf event 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 a lot, applied, and this is relevant in the current situation, where we're trying to have Linux v6.4 perf tools building BPF skels by default. - Arnaldo