From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF47CC7EE3A for ; Mon, 5 Jun 2023 07:10:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbjFEHKs (ORCPT ); Mon, 5 Jun 2023 03:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232101AbjFEHKk (ORCPT ); Mon, 5 Jun 2023 03:10:40 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 440A111A; Mon, 5 Jun 2023 00:10:23 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8936DD75; Mon, 5 Jun 2023 00:11:08 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.24.244]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1C0223F793; Mon, 5 Jun 2023 00:10:20 -0700 (PDT) Date: Mon, 5 Jun 2023 08:10:15 +0100 From: Mark Rutland To: Krzysztof Kozlowski , Ravi Bangoria , "Peter Zijlstra (Intel)" Cc: jolsa@kernel.org, irogers@google.com, bp@alien8.de, adrian.hunter@intel.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, "linux-samsung-soc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "regressions@lists.linux.dev" Subject: Re: [REGRESSION][BISECT] perf/core: Remove pmu linear searching code Message-ID: References: <3abd3693-ad87-9abf-a762-337076638fcc@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3abd3693-ad87-9abf-a762-337076638fcc@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On Sun, Jun 04, 2023 at 01:38:10PM +0200, Krzysztof Kozlowski wrote: > Hi, > > #regzbot introduced: 9551fbb64d09 > > Bisect pointed to commit 9551fbb64d09 ("perf/core: Remove pmu linear > searching code") as first one where all hardware events are gone from > perf for ARMv7 Exynos5422 board. I think that commit 9551fbb64d09 is just wrong. The commit message asserts: Searching for the right pmu by iterating over all pmus is no longer required since all pmus now *must* be present in the 'pmu_idr' list. So, remove linear searching code. ... and while each PMU has *some* entry in the pmu_idr list, for its dynamic type, that means that events with other types (e.g. PERF_TYPE_HARDWARE or PERF_TYPE_RAW) will fail to find a PMU in the IDR whereas they'd previously have been accepted by a PMU during the subsequent iteration over all PMUs. So that iteration is still required. How does this work on x86? Do you have pseudo-PMUs for PERF_TYPE_HARDWARE and PERF_TYPE_RAW ? Thanks, Mark. > Expected: > perf list | grep "Hardware event" > branch-instructions OR branches [Hardware event] > branch-misses [Hardware event] > bus-cycles [Hardware event] > cache-misses [Hardware event] > cache-references [Hardware event] > cpu-cycles OR cycles [Hardware event] > instructions [Hardware event] > > > Result: > empty, no hardware events > > 1. Arch ARM Linux > 2. exynos_defconfig > 3. Board: > - Odroid HC1 > ARMv7, octa-core (Cortex-A7+A15), Exynos5422 SoC > Systemd: v239 > > 4. perf version 6.1.0 > > > Best regards, > Krzysztof