Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp639143lqg; Fri, 1 Mar 2024 17:03:17 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWZtCCZ8oQ4cx45bG76ML7XPZ5Zk4gydykS7rw0DhnVMo6zuS/DSVootNKjWNoQufttBMgoFdYrOSl8T/BeKkjQAbnXSskHXCttplWNoA== X-Google-Smtp-Source: AGHT+IEnLNEovFFfX69vnUX6DfO28rXE24haKB81HD2m6ZX2JnoVUnEFixu/ffMrYlN7P6IejnVj X-Received: by 2002:a17:902:e84e:b0:1db:e245:8c35 with SMTP id t14-20020a170902e84e00b001dbe2458c35mr3881887plg.30.1709341396940; Fri, 01 Mar 2024 17:03:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709341396; cv=pass; d=google.com; s=arc-20160816; b=mnSkIF+OWaWggNsZ8JL/4uiLgCTFJS7kLskBVq7XAITSmUF78NDk9XgZgyBMCuonfO +Tpkk9o9VV1um10H8nyAM3pp1L6W8AJDhX0HBXThbDo6k0pR7V48N0YJkWrAiv7r1BxW tixulXA84oTavxh/KZOel+sltVTeEZ93xxtZ4fMRp02ysGPK+EwsTFYGepxJi6eMG0eo Tuxcy68UhEZAmsC8NGfABYr/dQjemCnKCy0tYuhMaR5Ahc7vkqQGRU1VnelK0/tp0OK2 OR5JLszudkQ5o/TnS9RUtaAOsof/LuTaIW45eWIilccGdWRY6WN5HtHQqjPa8NINF5Jl yC7g== 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=OeiuXCH3Dk75QjPF6SmY/mW2/HCjBpY0R4+6A043swE=; b=okDTH/qydcJqrVLcN+NIg8scHiyfyRwdcrL9WWLOXyo9G8O5UATpSKL5pQm/KrVqT8 snwMcBu9SqSia6972+qIoyPTgqXATTcJrFeTwApIDU3EAkFtKNlkPw3fyyUtHHnvGZ4L R8DJDEEAVVUJpz/N3nspVU4rfO9mTczYr0QOMTnZV/O33yKx842jUQQ/EMk83WxW5pqT YuK3OAMNqpXZwvEABxc5P6vUo+1ZwQbOLOe7FJzanGvV73Mj8ddO+thl7ub6xQdHwXeX AyyzcOtySt0Ywd6ehsBZAsovwlSl+ktLLSM7g3OGE/DWYnt1Vr81YNgiraokaOLlOK3i 6hsA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=D+k4w4qd; 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-89275-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89275-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 i4-20020a170902cf0400b001dcd0d28d46si4813429plg.50.2024.03.01.17.03.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 17:03:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89275-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=D+k4w4qd; 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-89275-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89275-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 786B9B231A2 for ; Sat, 2 Mar 2024 01:00:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90A955680; Sat, 2 Mar 2024 01:00:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="D+k4w4qd" Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (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 4CEB8DDB0 for ; Sat, 2 Mar 2024 01:00:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709341202; cv=none; b=ZKzhb9RDBoerVPP3LVfHseiVhkpWCdHgQNyEBtvk2r8XkEubVZZfcak6RgikWE6J7t64KpffltkWgAfZElvpliErGkyrDuQwt+KldgDhj7Dc6s0SKm+t+xXu7QYr8XcZkoZW/0X8fl+FRs1/SM5uwuxdrHn1wD3cwnGBl1iBFjI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709341202; c=relaxed/simple; bh=Q8r8JCAtkGCJmmXhKhiAJOofwbQwry+nv4WJ1Szla+w=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=dMF8cbRcK0eSrU2WONffOniBfUV+hRUI++iOAzpypo98M7YIDz8oPvUQLG6Zfz63Fog/x+1tFyubQKW1AvWmweK07uvwznC/7IXpCSbxN8QHbGJgeXID1B+Fy5lQiZZOIWz8f2RavTnw0XsCrezWxGMj1g++G8/Sn1kLnMiXB6o= 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=D+k4w4qd; arc=none smtp.client-ip=209.85.214.201 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-pl1-f201.google.com with SMTP id d9443c01a7336-1dcaff13db5so26478575ad.3 for ; Fri, 01 Mar 2024 17:00:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709341200; x=1709946000; 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=D+k4w4qdK0KSO0PU3Qk5EpR+BUWjjWv9Mp//dUGjJaHhPwGc0wgLKoreWgWeXIicBu 3MrEVzhmztJ9sy6Y+IxVsyZ3psvuWbZaEtlnBplOLC1fk0zEDT0XXOfOUfvcapNSvTyG bV2MSLnNWTWZEcTsv2Pz2+GxaG1bW64w0UtPufc4LoIWOMUJLhKtUFWVwwI6Qd90Fvy6 TEghm/bIgRq8byQtxtlPwW1hpCs9FWC7uh3K2dMV528Zf3kUyqd9dD7FVSgEE/ZzcM6V ZiZCfzHq60PClDcodmT4JM6QMYwiniFxtI7+9i7MCZK2/zCUvgK0ntunllCCaXGry5tL GZbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709341200; x=1709946000; 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=ht+25+a6BgOP4F6uyPfDcql+nv8fKZBWfqWE6m5sg7XPpViFCM7TZ2KCxo0dH7hh4N zXvZQM8aOrNAcmfeOAXVJEX0Bs4CEhWS6T7Mt/M+UrAno2BXIzuMCfrTO4d7EXw1zgAu spL3XhheXUgUspNxgZpnHmZFKN5GbGCmsF18h6PLd/R4DpPtb5gGjb9fXLHOAVqGu0Sp 4pVeGaKFOfJNFyFowe/1uwZzn4FoHjX92lzup7KRPzAVrryZ85c9KI/ChJHAyEsmg7R9 OCzqZWaz4OS3HKdcRjTArVyKsX3GjpKndx3QPYdT1aW6F014KHwAayEMxT/Wn8i+oUFU JXhQ== X-Forwarded-Encrypted: i=1; AJvYcCXdGUYlKRXMauQlp3mIe8QdZM/DnTOfOTuLvPW+D3UmmvRbqjBEjmgtzsRXk9OkT/XwN0HNDCIlRhZUVd9VMCbd0wfxvc6D3SdlPMIQ X-Gm-Message-State: AOJu0Yw3c9Tp81eq+QyTmpX16AEQ+4K24P2bkOcTccss4AoHzCmmCyMi 6zY/OmjoAx8ydXVZjBNXJRQKnKEb6fs/hO7btwq60fnkjCciDNO2r7CSvy7m+q20BL1OHaHJl2j X91XLQw== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:aba7:66c5:3365:7114]) (user=irogers job=sendgmr) by 2002:a17:902:c40f:b0:1db:e9ed:bbb8 with SMTP id k15-20020a170902c40f00b001dbe9edbbb8mr143679plk.9.1709341200314; Fri, 01 Mar 2024 17:00:00 -0800 (PST) Date: Fri, 1 Mar 2024 16:59:39 -0800 In-Reply-To: <20240302005950.2847058-1-irogers@google.com> Message-Id: <20240302005950.2847058-2-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240302005950.2847058-1-irogers@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Subject: [PATCH v2 01/12] perf jevents: Allow multiple metricgroups.json files From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , John Garry , Kan Liang , Jing Zhang , Thomas Richter , James Clark , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Andi Kleen , Kajol Jain , Sandipan Das , Ravi Bangoria , Perry Taylor , Samantha Alt , Caleb Biggers , Weilin Wang , Edward Baker , Stephane Eranian 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 --- 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)) -- 2.44.0.278.ge034bb2e1d-goog