Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp817715lqb; Wed, 29 May 2024 11:19:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWmuLDrs7BRUvOw0J6xWGQCuI1twnjMtclD0zmy2SZpD28Dxvaq1/XPXwpjcO9aFvLEzruE/EyoC9paxLHYLbx10tsx3umosUMY8sUByg== X-Google-Smtp-Source: AGHT+IEVylGAd866OWgxPu2TC154nncvh2MUWrqXggGNRVqTdCTt9KFlQZdHjO78jZq7IyEY8joB X-Received: by 2002:a17:902:ea0e:b0:1f6:a43:89c3 with SMTP id d9443c01a7336-1f60a438e60mr14982905ad.57.1717006781406; Wed, 29 May 2024 11:19:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717006781; cv=pass; d=google.com; s=arc-20160816; b=zoFMM/XjZgUDrU5Ct64mOYJSUW/cog125XwV8Ngdbs9Mtud0Havfxoo/urWgnGH43s +Fx7dyGTLh3bYPi3U7MWJweo929q7unK7U+wV2VvhBl9qC9SZJgTWl/r2hTWMtLZLW1y wqazm/az/R5gzDyyCHYZzkW8+rXTybCb1Zph6YDZnj2WySH81uSN6to+W4RmOmmt33/X MsXruTjB6IEqoM3P07F2fh2/cUDTzQYY4naKbGxwVZbq40OcqNX75lVzVO4qX6INT/8E 9x8Esj6NVB9qpcK114suwIA6c8SGKcO7X9zkGifqvJ8w9+fKKsZYCZsKFsy1vvVjwU+R lrag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=JTkoaN82x0Ke+cDptM/CTkf19y5d0qlB64lrfqCGsL0=; fh=+yclHudz8teg5wlBrPhbsPJxkLk6SUkrU0agJ5uGJWk=; b=qjWccP1pGGJ8jGjuZD+f9i0JbBcoI8p2+sVbKcVgFb+c00QMCVimprB1yKxPLm7A3h jZsdrdU7gA6IQkNcoyhiPrRQVSOFvYjiTwRHzfgmFHvlWg82q9wc4otfnMQdG5JlgSmr eYXDZ2J5ltOcoruDALr0RqVIwgBQpl11mRl64BoGtGpWvtUe7R7Gm2NRjWw9cPyMvFJg 6eKNkuEAQ/ol8vaESQSoMIrjx3mRKIs0ch5S5x886aoM7c8WQfnjwvzQbcK8b+n7C6Yj nPb7LpOZzfOqE4B23O13adnsfzitrvuirGutsQ6odMaQ4uWaSTD3uhaNpdssT60sPjqd qEng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=26nGEyZR; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-194562-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194562-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c9bcac3si105167045ad.497.2024.05.29.11.19.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 11:19:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194562-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=26nGEyZR; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-194562-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194562-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BE657B242FA for ; Wed, 29 May 2024 18:18:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D571915CD68; Wed, 29 May 2024 18:18:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="26nGEyZR" Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC328DDA1 for ; Wed, 29 May 2024 18:18:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717006716; cv=none; b=k6ieaHacGlDX1nLs33bFlueCOzvvu8YWvGgRnz3Ae1nZPMwVQiANZ9bKI16i39qyLBrjpUfxsDBGQ/LRXBEVHzuGF8V1m2eh98g1D9xgHlTbajQ/w4R7lpAKID5A2aI8hse+Gqmtjgr2qp7iymbB0ZrH5N6is4JFD022dTgzB2E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717006716; c=relaxed/simple; bh=yH3iRUsoLLDhsHabHWKD2oqxK4r37P5N6+ce1wac2l4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=XbM5DvQ2hsBs3zlyuMbsWdqKM/sga6LlSgooudNnBW3ctMuJ9JjQvAOaHjdAEe3wEUPU+68/pjdm2lE5yf9QOBqtCCph4BDJEice+q8bzB/gLrhiegtjF3SkkU/x40uUVq0nK+y+0rg4/1O4FhQL4wkA4Tn/1q3dsBYlA3588Mc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=26nGEyZR; arc=none smtp.client-ip=209.85.214.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1ee5f3123d8so17825ad.1 for ; Wed, 29 May 2024 11:18:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717006714; x=1717611514; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=JTkoaN82x0Ke+cDptM/CTkf19y5d0qlB64lrfqCGsL0=; b=26nGEyZRSeklHrrkCZ1TqLDqbB2AtS0pvXo8gVGKQELc865XNb7yvDxJ73plMzSoXa 0hyOPBqtw8YSd+Pz4Ftmo+wiUYNeRC9w40hz4ZyKuGq8uOrpKLloAbdNNI+jbhjJQxfc 2CPQlD6u3SyF3dxkzJNSMEpLMdspFRhyV0pZosj7pykiG7kJPtzO3Cirg0kXGLiMDYpy EZukUUzxwgUqIFI/ZSGIb0cb5GfDGo2DEWzwu1DjgcUp9wFwVs37kHtCg4tVgk3tPm7j r5/zBFokLyobJH+dZDhenID0VVVrswg4hsbCp+j88DkKqHJIayZ6zFaV+9Ep3tZvv8KS duQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717006714; x=1717611514; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JTkoaN82x0Ke+cDptM/CTkf19y5d0qlB64lrfqCGsL0=; b=VePiCvJndHT5FymZiYlNSa1OCgUoI/5RPXU8PEgYKR1UbtWBhr+SnewsxeUpjp8t+7 ZTiifbdZI0+dDgJKy3tsjLVFaQ3Ri61sjskNkl6UD+dMXdpOaCqbilAtKcav/WHG8wBL 3KdZsW/QcndmWuupjgIke4rknhIvXoRmlvzqfrrCaC1fy1L/kQQ+P3+jeKQcJITQJQBS EIG21LgtI2LcwWSl801S9aI+48ACWX2v0vfEyPc3j3yil1DrxS5Ikvh4pEQNT5Yqnl3v Kc6zxl+tn30zQGb5NLM+f/YodTrWmSTpWN3Trw/8gVd5VphlQgSEd+7nPMfMMhVeyOr4 8emg== X-Forwarded-Encrypted: i=1; AJvYcCUNB/J4KkXKa/FxTrJrhWEUV4wScR0l5E9phZwN8T8KyqBJNMm1N9vKqz0k+np4hHMdCLn4DAXEL3Is4lTc+8rl8BEQeZEhZSXAsejy X-Gm-Message-State: AOJu0YzLShgrVxiTNDYB6SQAo4CX96bOvFOHQg1/hbEXNm1r+8NSfMgB DvswdlrhIYBQXleEFc2kDgyGU11CXSERM484rtCMigRhPRMP8pjSXadiZZ0e9pLXYWwspMYXSEr Kjq3w4sQIpv8PnDAzCt+XS0yzUawftdRGCJQX X-Received: by 2002:a17:902:e846:b0:1f3:3ede:9b0 with SMTP id d9443c01a7336-1f6170de762mr217315ad.10.1717006713709; Wed, 29 May 2024 11:18:33 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240510053705.2462258-1-irogers@google.com> <20240510053705.2462258-4-irogers@google.com> <35d6875b-9a28-4953-a187-b6659880ac66@arm.com> In-Reply-To: From: Ian Rogers Date: Wed, 29 May 2024 11:18:16 -0700 Message-ID: Subject: Re: [PATCH v3 3/5] perf stat: Remove evlist__add_default_attrs use strings To: James Clark 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 29, 2024 at 10:39=E2=80=AFAM Ian Rogers wr= ote: > > On Wed, May 29, 2024 at 8:39=E2=80=AFAM 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 an= d > > > 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=3DfVABSBZnsmtRn1uF-k-G1GWM= -L5SgiinhPTfHbQsKXb_g@mail.gmail.com/ > > > > Taking a look at this one now. I think some example commands and output= s > > 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 eve= nt: > > > > $ 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