Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1255492lqb; Thu, 30 May 2024 05:22:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVUU93Y05kXkeBMdKiLpKVjI5x9emqd8uMVVgjWT28wkSTJJD5n9j1ggsSXFKG6Qf6BjBobw510xIbYiKCPL1VYxicf7V0JvtRqgFsMpg== X-Google-Smtp-Source: AGHT+IFAEThtdLa4PJL2g9KDGKN/tJjKnMHbpeajEPvsVLyXn6DxqqV4Am0jgi2Bs275N56kMHTH X-Received: by 2002:a05:6214:3201:b0:6ab:8f81:e964 with SMTP id 6a1803df08f44-6ae0cb5570cmr23368636d6.33.1717071754211; Thu, 30 May 2024 05:22:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717071754; cv=pass; d=google.com; s=arc-20160816; b=sTwYjdylG5A3fUK1BU/9Uv4xJi4sOWks5Bwt1crTfbKxcJh6b+e065yTHyzL9rYh8J K+aX+D16MwIS8lSnc3dKPrqIs2KTBwHaf6HnNBmyP5s+K2HYqUcOpchJmvZp0owai2B9 W7HVmCX4DRHrvP1NzopIs7VFXuDtGPv7anost7nqFI193tn3DpveKvGwgOP3+ZQSe28u 0GfhWRwbmgsk4SD0O944+WAhbofIjriKDHbTNhYo3J7dH9HiRLptQUTc+wKH2zU3vVqs SFOY/gD0bWJVOPlHNsGuVVMvElG0ZEDmCo9fNCujul9+QdiVNdIwXdQDA1bA4klyezKT yUSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=VEs6tcotfpAe3wnQotst5fK6PpsvLEVhUhM9G8zad6Q=; fh=PrWUuj51Kc8mS6YPcPqaavczcHy8uTLsmmcHwNVACs0=; b=Ja+Ky+F9UYZRWaNRMOAsk9WTIDJGoOAR42TDdSGWBzjLEVEEOd5FQFacWc03G5zThI UHhwYfadBPRKWg+6gipgDFNPxeLU1GCWMiZMbohZE9YzyTpLpXnLWvlXXdJwl2AbtCZS 26cM3OL5+iqGlJHNeyYLTqFRQbq1nwSLRBwTfceqiux7bNNcOEJAXYshX5azpAfzjvlW dna+pctlJqeXik1GuflGGcIH8CYHFnGrCOtObB/f/Qs+4luMqlstQ/tvXPIwmcwHm2fe CVorMO26URWq4hdMzXoIfswQ5PzP8wj3QF6ZLfDx2lzQLQEx0vE5q7YWLeNHjxZFDFD5 djaA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-195354-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195354-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac1395adbdsi12867596d6.344.2024.05.30.05.22.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 05:22:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195354-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-195354-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195354-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 581AC1C22396 for ; Thu, 30 May 2024 12:22:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F30C11C9ED7; Thu, 30 May 2024 12:22:29 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B5981C2318; Thu, 30 May 2024 12:22:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717071749; cv=none; b=FRlSai43bhcfaHoWfipWlZw66p5Y84unEJNlUGnBnY6e+loZKgQ05oP+4ErvcWA8EoOBHManfK+f5d/YoIkRmiVV1cHl0J6UjW7kZQSsY8gepPRaA8A7mtZiFjG1gXsjAhU234l0tXRBRezKe63ITDe8a6JmPy7i1N66UmiuTyM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717071749; c=relaxed/simple; bh=oMFibsBAcun+NdzeWhLVwKtyoTpI/pYPk8pxR1SiKFM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=rf/FCIe8MULVifL766+4J0ykVUuyaWsZ7oGsBk3znhq2JKOmoj/12K/c8VU7lgqFnWyGJ7gTckMwH560ek3qrLfFYfzCykjokATo9Dnxf1bQonVbTEJKF4vyIDf0sPjex6UJQuCr5YGK9zFNPia8XT0TjdeHwfAbq+gzg2aJoog= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 80BA9339; Thu, 30 May 2024 05:22:50 -0700 (PDT) Received: from [192.168.1.100] (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DFD273F792; Thu, 30 May 2024 05:22:23 -0700 (PDT) Message-ID: <053b7aad-5c30-48d3-894e-d4db98440191@arm.com> Date: Thu, 30 May 2024 13:22:25 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/5] perf stat: Remove evlist__add_default_attrs use strings To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , Kan Liang , Ravi Bangoria , Yang Jihong , Ze Gao , Leo Yan , Song Liu , K Prateek Nayak , Kaige Ye , Yicong Yang , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240510053705.2462258-1-irogers@google.com> <20240510053705.2462258-4-irogers@google.com> <35d6875b-9a28-4953-a187-b6659880ac66@arm.com> Content-Language: en-US From: James Clark In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 29/05/2024 19:18, Ian Rogers wrote: > On Wed, May 29, 2024 at 10:39 AM Ian Rogers wrote: >> >> On Wed, May 29, 2024 at 8:39 AM James Clark wrote: >>> >>> >>> >>> On 10/05/2024 06:37, Ian Rogers wrote: >>>> add_default_atttributes would add evsels by having pre-created >>>> perf_event_attr, however, this needed fixing for hybrid as the >>>> extended PMU type was necessary for each core PMU. The logic for this >>>> was in an arch specific x86 function and wasn't present for ARM, >>>> meaning that default events weren't being opened on all PMUs on >>>> ARM. Change the creation of the default events to use parse_events and >>>> strings as that will open the events on all PMUs. >>>> >>>> Rather than try to detect events on PMUs before parsing, parse the >>>> event but skip its output in stat-display. >>>> >>>> The previous order of hardware events was: cycles, >>>> stalled-cycles-frontend, stalled-cycles-backend, instructions. As >>>> instructions is a more fundamental concept the order is changed to: >>>> instructions, cycles, stalled-cycles-frontend, stalled-cycles-backend. >>>> >>>> Closes: https://lore.kernel.org/lkml/CAP-5=fVABSBZnsmtRn1uF-k-G1GWM-L5SgiinhPTfHbQsKXb_g@mail.gmail.com/ >>> >>> Taking a look at this one now. I think some example commands and outputs >>> in the commit message would be helpful because there are quite a few >>> different things mentioned in the closes link. >>> >>> But I'm assuming this is just for the command without specifying an event: >>> >>> $ perf stat >>> >>> I didn't realise that wasn't working properly and I'd missed that Mark >>> spotted it in that link. >> >> Hi James, >> >> Do you want to take on owning fixing this? My concern is that by using >> event parsing: >> >> + "context-switches," >> + "cpu-migrations," >> + "page-faults," >> + "instructions," >> + "cycles," >> + "stalled-cycles-frontend," >> + "stalled-cycles-backend," >> + "branches," >> + "branch-misses", >> >> any of the names could conflict with something advertised on an ARM >> PMU somewhere. Clearly cycles has already proved to be controversial >> and broken for perf record on Neoverse. > > Oh and these events are also broken on ARM M? PMUs with the revert > that's in v6.10, so I don't know how to go about fixing this. > > Thanks, > Ian I'll take it yep. But the fix probably needs to take into context whatever else we decide with the other issue. Conflicting names might not actually be an issue if we work around that with the other change. But I'm still getting up to speed with the other one. James