Message ID | 20240228175617.4049201-2-irogers@google.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-85476-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3510173dyb; Wed, 28 Feb 2024 09:57:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXQUpXIQMhwMhVzse/dDSwUhOfjzAcuGRzq9sNjI6uBrX9hGrZbb4x7vGeiUdx6y8/0pi0nZD5eh6KCelp4RCfjH+8TGg== X-Google-Smtp-Source: AGHT+IGq0FqeGoS9X3qbrx72hdyXgOPWjJCf2npN9G0uHniEK5zZQPXGdC5LAfVvMkvMdO1LdSfR X-Received: by 2002:a17:902:e849:b0:1db:f41a:3d9b with SMTP id t9-20020a170902e84900b001dbf41a3d9bmr240779plg.22.1709143029767; Wed, 28 Feb 2024 09:57:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709143029; cv=pass; d=google.com; s=arc-20160816; b=zQ/R2r2Q6Wg3yR2rf71n+l4a7Dw3eF0UyoMFuwpK59X2qK5+9Vd3ORQJDyTn2yoy+1 sWeHcVAxWVxoATL7QscHwqTdaASfaJdOxVaDmf8+bFQRNYrME75FL6D3ewwwW3287ngr lJ0oVljrmsp35T6hY8TZSP+Uc061+Ubg/z6Wi10HHi2TT9e+8pMOBhDi1eU0VNoaPyEb g6oNP1LROBBFCHeoNAFk+wPViKlDYy1ca6zU5mbzmFk2fzIkOpbnLISUQRaFPk6qFSZI 9s0Q3YNFhmnY0RYWPRDc1c+wO4ky2MmB96jsoO91mexArrTboeo3LISl3e32YTr1/Hiy 2HHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:references:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:in-reply-to:date :dkim-signature; bh=FZPkGRhHwcNWwVteqhq4++b4hJ8f8BvedCtUPDM725Y=; fh=i/WDH8SEu+Xw9l9YAG4EeY8fWMe52DQh/Z+elB8qfJE=; b=NmXtT64y+M07/j+qicb3dLEWsyosHtnzDBnU1/4f9HmDeZa3pPGb0KeJXb/gvT/ZsN 47Ld3nHa+cAAMu1/wn+BRwrjDynO8SFqIFa+D0ylFsymF62kHOX5bZhqdCP3BGEkkrrl LkgywxcwTW3z2JB4MI8jMbXJ7e7NSuLuLNrveqIpiTKaddwjvVJCU5dCV0SBOXbO7lyk zF/4BAKMjirCXhFX/DATCIB3swB0LBHKbhZMocTUnnp/8LN1Rk+pMfQuKXioRdxQEiiT sQk5XdUlcnEB95wH9BMrKaB+l1Y4k7szErQ/7qD9wv1V6SfLGlvRuIlWOa9w07XSYo2i t/Sg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=D1q5uGIm; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-85476-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85476-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e15-20020a17090301cf00b001dbcfa705e1si3846745plh.162.2024.02.28.09.57.09 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 09:57:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85476-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=D1q5uGIm; arc=pass (i=1 spf=pass spfdomain=flex--irogers.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-85476-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85476-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 761F32842BF for <ouuuleilei@gmail.com>; Wed, 28 Feb 2024 17:57:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2804C15DBCA; Wed, 28 Feb 2024 17:56:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="D1q5uGIm" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.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 DE20615E5C3 for <linux-kernel@vger.kernel.org>; Wed, 28 Feb 2024 17:56:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709143001; cv=none; b=YF/RFlGvXe+dEY2062B93DcRPlBjb2FnroqVQZVucy8+b0gHzek50AxT1fGzb5khSY25XEAwyqE5xfp1FRBOE/YRuxUj9m7TxucvRpzpAZhYIZPRjOv8Qyc89CF5veJ2wVMzC2XfRvSokPGSUn5oXZb6hFVGx72adWfquShw6Sw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709143001; c=relaxed/simple; bh=Q8r8JCAtkGCJmmXhKhiAJOofwbQwry+nv4WJ1Szla+w=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=VFdNG8FkWhqB0JgUOoLvLhSC2t0kKwesAeABIPop4izsqy295GEwWdYNwMa1MuK/j+RBcf2SafWxwq92FezsyRmyXmE4F8UX7ySpQ4Drb4F1lEnkOyjF2TeQE5WwfXcE1Ed9P4XwUacRVhso7WOmCjXOyPlKV6ZFJRG7axDJ03Y= 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=D1q5uGIm; arc=none smtp.client-ip=209.85.128.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 Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-5efe82b835fso709567b3.0 for <linux-kernel@vger.kernel.org>; Wed, 28 Feb 2024 09:56:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709142999; x=1709747799; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=FZPkGRhHwcNWwVteqhq4++b4hJ8f8BvedCtUPDM725Y=; b=D1q5uGImvlURfYVCMJ91MQQyZgqIKASj5hf65+Sjzq4BYVtSRyLjQ0QwLLdPtuM8LV DUEddmawkVE1k6yFXZYO+kL7T2BCcVRifJi1+/0MISEpDyuEUwIokmHQUze6y6738PEH gv7Evf7gYQ2ztjFUFyOlykq+oZgAHVGubB7+7Ekw844fM38hzgkAHZ9KGpq0/9ZAv5EU WM1Vn2UM6bVAXMDbFuBWcv5bnuZPtR4MZGDL/vncjzx9TYwAKMwZrMx14yMmoA03PZxY lNZRlvSJbuqnFVQhe8LsXbwfcdv+qewG7kn74NWn9G0VGBNYi8r+mfwhLyGvpdFEZyhy hs7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709142999; x=1709747799; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=FZPkGRhHwcNWwVteqhq4++b4hJ8f8BvedCtUPDM725Y=; b=U0NnN0/Hc8nUn4qjm/2k1SI5t0UjQoFM7KQHNjChRZJYaSGMPlInGlAvbX5iB+QoBV FKtL01lCwMpRtOC/1AYUyED2fkIyt1WVjjcAqdW+jR3M7pgesJXZs7ABifr2tmj1C032 +qOB4eA9RTf8KxEOIbFFCGGish+2TUpvIRFMj7pVZrgR7rOXtlM5wBy7o8pzsb0qG4gj QW74RJyAMPnY/lL05iEqSAyudy76CB1KuyHh1Wwev/FxYGn9y9qmwlh/FkOfSI76T/UC 9WJ+/l9bTjQpNHIf5i42fybsIenni+uuLUL+HBJZSUzcwZFr+4wCI+0J0SG54f/ZRiG8 I3Ag== X-Forwarded-Encrypted: i=1; AJvYcCXCw07IX9fNsuxi1qlNOBDfJAmMLuBhRm7BALl+qXXrQz0I9oOvJ00CE/FKnkK8ZgFnqeoVGg128o2xW9N0qCfP6yfpz9fEMzwFDNmB X-Gm-Message-State: AOJu0YyL9cMPAkisij6VqjfUGUuiG7BJ8ot6KeQDwJwg5zMulvdPPNm1 4JoV+bwSA47ix/V6b7+z/f7k1QCTcfc77jmyaj1GfbRS5eZ57p9YXlpBnncmT8SEaPZlwn2bnUS NW7DT/g== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:77dc:144c:334e:e2dd]) (user=irogers job=sendgmr) by 2002:a25:2e43:0:b0:dc7:6efe:1aab with SMTP id b3-20020a252e43000000b00dc76efe1aabmr2866ybn.6.1709142998836; Wed, 28 Feb 2024 09:56:38 -0800 (PST) Date: Wed, 28 Feb 2024 09:56:06 -0800 In-Reply-To: <20240228175617.4049201-1-irogers@google.com> Message-Id: <20240228175617.4049201-2-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> Mime-Version: 1.0 References: <20240228175617.4049201-1-irogers@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Subject: [PATCH v1 01/12] perf jevents: Allow multiple metricgroups.json files From: Ian Rogers <irogers@google.com> To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>, Arnaldo Carvalho de Melo <acme@kernel.org>, Namhyung Kim <namhyung@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>, Adrian Hunter <adrian.hunter@intel.com>, John Garry <john.g.garry@oracle.com>, Kan Liang <kan.liang@linux.intel.com>, Jing Zhang <renyu.zj@linux.alibaba.com>, Thomas Richter <tmricht@linux.ibm.com>, James Clark <james.clark@arm.com>, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Andi Kleen <ak@linux.intel.com>, Kajol Jain <kjain@linux.ibm.com>, Sandipan Das <sandipan.das@amd.com>, Ravi Bangoria <ravi.bangoria@amd.com>, Perry Taylor <perry.taylor@intel.com>, Samantha Alt <samantha.alt@intel.com>, Caleb Biggers <caleb.biggers@intel.com>, Weilin Wang <weilin.wang@intel.com>, Edward Baker <edward.baker@intel.com>, Stephane Eranian <eranian@google.com> Content-Type: text/plain; charset="UTF-8" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792166361544727624 X-GMAIL-MSGID: 1792166361544727624 |
Series |
[v1,01/12] perf jevents: Allow multiple metricgroups.json files
|
|
Commit Message
Ian Rogers
Feb. 28, 2024, 5:56 p.m. UTC
Allow multiple metricgroups.json files by handling any file ending
with metricgroups.json as a metricgroups file.
Signed-off-by: Ian Rogers <irogers@google.com>
---
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/jevents.py index 2c7e5d61ce92..65ab03ce5064 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -603,7 +603,7 @@ def preprocess_one_file(parents: Sequence[str], item: os.DirEntry) -> None: if not item.is_file() or not item.name.endswith('.json'): return - if item.name == 'metricgroups.json': + if item.name.endswith('metricgroups.json'): metricgroup_descriptions = json.load(open(item.path)) for mgroup in metricgroup_descriptions: assert len(mgroup) > 1, parents @@ -653,7 +653,7 @@ def process_one_file(parents: Sequence[str], item: os.DirEntry) -> None: # 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 == 'metricgroups.json': + if not item.is_file() or not item.name.endswith('.json') or item.name.endswith('metricgroups.json'): return add_events_table_entries(item, get_topic(item.name))