From nobody Thu Dec 11 19:10:40 2025 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (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 3EB412D0283 for ; Tue, 2 Dec 2025 17:51:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764697871; cv=none; b=V21EANRNyGfRRwmJUk+7RMK3WQIgeiH18fx7klxnZS1APt2ZUhP6CSIGalHo7EPv286FadiNtIRfsQ6+V4BvZHm9P1cylrBjc2HtV1F5AOUisU9bxTUmtIg++qmQXZgKjTweoRyEzSBSpf/Beg/gNMmsIhBfHE8EfBD5S/tffO0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764697871; c=relaxed/simple; bh=TEv1/HAzSLHeBA3NWyF7DX5ZlJzYioSuwudoqiQdkGg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Content-Type; b=TMqSrGlWa1efhkKaoLbMNypIdgJq/d4FLD93T4ZX+ACZCgYu5SP+v7RoZg+Hy9rnnNuLF96mkgRk47Atw5v6ufQiboLcD7BM+c/0nVE0vqOVFvJpkgUZvaHRwhlr6ueBjtSwbgQ/DsgmXiuyYSDUj3VYWOnHB380dIgtTo4dEBE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=m3oPlgIT; arc=none smtp.client-ip=209.85.214.202 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=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="m3oPlgIT" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-297e5a18652so61901775ad.1 for ; Tue, 02 Dec 2025 09:51:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1764697869; x=1765302669; darn=vger.kernel.org; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=NH2u4VUQ3fj61HenZr1UXZRG+xsck/DPqaTtHXUTkxo=; b=m3oPlgIT2RWA1EQ8RnEnd17DyFOMuQs7dS/QnQj8cLqVvI5157uh1J/0j/xTfwJxf8 7YvLHnavT4PZsLZLdGgS8CuEaS1fKtf66iDNs2klVy8x0ZGjbKq7uvyf2Ly3B6N0H6Vp 5z7yhPC78FFkCYFajhE459evNCwuBMcDSDfQghiCBjNC7ftoAF4egTVfrvTr5BoWmdwi vXZzbBk5fC9/2TYiZtPQQUHvUmxGSUoRflre91E/PO64JOTnJSCi7qqA7PDFMSAtU4Aq ZTpXN4xWqpGK//ToDIAUe5tge9FXQdy5qZ/qctbVk6ILSGIYkML7Pbwyy39X8F+n+Xug FbaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764697869; x=1765302669; h=to:from:subject:message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=NH2u4VUQ3fj61HenZr1UXZRG+xsck/DPqaTtHXUTkxo=; b=nfX1D/UhE6BEohjRoxubyYOm3a/OrDNS4A/Ob//RsPbGU0DyAj+oIK0HdvRYkLxexI piSDJt667lut7P40+Mk8CnYqq0URQlwP0YLZcJD6UJB/hvhrWVFdgp7YvyUkVgZKFpbH 8gOKxwRmwhAWFhiyEpJupdEuwrMn1ec2IJvYt8YQ2G5YMLunKSsvScwqs1QZckLhnzen d2ObeEsImErOKH3yal64jTcYZButdpIOFME0Z2GjsA3X5kjpvFtx5+XFpOTbNUcw4HYP 9H4s/6lxTTs+UUQ4VKsr/nC/H/PfK4waFGUXlKG0JailjABas7Nsd8u5ORqvY+YcLSUr P5ww== X-Forwarded-Encrypted: i=1; AJvYcCWgdwwA1+pKNr33uJVOQU4a+2mtdXoG2sRWTN9P1buKd7/7yGsn4Fw0hlzgCBXPJLGEgAmxyQ7eleCzBgE=@vger.kernel.org X-Gm-Message-State: AOJu0YyFgysQYXv9SD/+9a3CZuKRbwEk5/RE3ULrIDcXGcg2CwfcESRs Hf+FyRtzsQZXflg7wmfzE1Vy7efPhnJZ/w8uNIifMsv6q/UbxnvRYTs3NigpduPpZKalWV6iHSW 7xGfE0kIYwg== X-Google-Smtp-Source: AGHT+IFlGTmkGGNi+SC78cD9hWU6PN0Yrfo0gXOZw0nJvl3+hn9RGHqM3/7qCGozUF6udTtmu99BfqGzB1gx X-Received: from dlag16.prod.google.com ([2002:a05:701b:2510:b0:11b:998d:bdf4]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:1e03:b0:11b:e21e:5653 with SMTP id a92af1059eb24-11defca66c3mr132520c88.19.1764697869345; Tue, 02 Dec 2025 09:51:09 -0800 (PST) Date: Tue, 2 Dec 2025 09:49:58 -0800 In-Reply-To: <20251202175043.623597-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251202175043.623597-1-irogers@google.com> X-Mailer: git-send-email 2.52.0.158.g65b55ccf14-goog Message-ID: <20251202175043.623597-4-irogers@google.com> Subject: [PATCH v9 03/48] perf jevents: Allow multiple metricgroups.json files From: Ian Rogers To: Adrian Hunter , Alexander Shishkin , Arnaldo Carvalho de Melo , Benjamin Gray , Caleb Biggers , Edward Baker , Ian Rogers , Ingo Molnar , James Clark , Jing Zhang , Jiri Olsa , John Garry , Leo Yan , Namhyung Kim , Perry Taylor , Peter Zijlstra , Samantha Alt , Sandipan Das , Thomas Falcon , Weilin Wang , Xu Yang , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Allow multiple metricgroups.json files by handling any file ending with metricgroups.json as a metricgroups file. Signed-off-by: Ian Rogers Tested-by: Thomas Falcon --- tools/perf/pmu-events/jevents.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jeven= ts.py index 3413ee5d0227..03f5ad262eb5 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -640,7 +640,7 @@ def preprocess_one_file(parents: Sequence[str], item: o= s.DirEntry) -> None: if not item.is_file() or not item.name.endswith('.json'): return =20 - if item.name =3D=3D 'metricgroups.json': + if item.name.endswith('metricgroups.json'): metricgroup_descriptions =3D json.load(open(item.path)) for mgroup in metricgroup_descriptions: assert len(mgroup) > 1, parents @@ -693,7 +693,7 @@ def process_one_file(parents: Sequence[str], item: os.D= irEntry) -> None: =20 # Ignore other directories. If the file name does not have a .json # extension, ignore it. It could be a readme.txt for instance. - if not item.is_file() or not item.name.endswith('.json') or item.name = =3D=3D 'metricgroups.json': + if not item.is_file() or not item.name.endswith('.json') or item.name.en= dswith('metricgroups.json'): return =20 add_events_table_entries(item, get_topic(item.name)) --=20 2.52.0.158.g65b55ccf14-goog