Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp639757lqg; Fri, 1 Mar 2024 17:04:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVf1VzxLHm+DbxfPdzSvCkZzddMrWMtJQO/0ynnxzTGpbxK1v/sE5hE70uoM3gBEpcpRdfxV1onnf1gfYvliVSMo8UJUwemt0M/e52+Ug== X-Google-Smtp-Source: AGHT+IExSECXEdL1E/jnHdfdn+cRDvkubJYKWKJaNgdZzzDa1w5W14zoC/HzGr8wR6D/eMPZQ39R X-Received: by 2002:a05:6a00:2d96:b0:6e5:ea19:bbcb with SMTP id fb22-20020a056a002d9600b006e5ea19bbcbmr406940pfb.5.1709341474895; Fri, 01 Mar 2024 17:04:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709341474; cv=pass; d=google.com; s=arc-20160816; b=dpWKR4Ni9VkaF4QXYUrUxkDDJVF17PUF0ugWBp7mNoPV775HbQUakVBxXbmY7ktPPh rL05ZEPFnLpL5b1g3ort23qxm37NJ56xlfz5RG5zTQoPL8ogvFHgZahIpG34njrrnYOu lql2C04uOjekaEqRpYWegVWclk/CgLAOsBEpZqYR67KpbHz+h4+FXNgM9uCHLjCVK3aQ Yf3c63s7zz5UmU6z+81HZ+9UEzoIxhjlxrsAWe6pHX58xD36cYJ1pVSpzNoYzzLNT+tg dQVqMHVnwmg0ab1uDbHXnGAF97zenEpwF8TNoIDM9NiT1dRlNPGi7Sz6/KzqtxwfjQtG P9OQ== 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=yRxIvbPDDMCjNnVdacSzvCtMsT39EeStBSRtXaTCLVU=; fh=wDOWqsEdGMAYy6h4ijUixIF1s5VHaXvwlBvU9AqZkJE=; b=JYNiN4BGUyv6wifA9OQVAxqldKApVO1QhiQy349Q4bEDZQVKa57GDgHJgGo1MIz4ec xw3rUvxPK3YzeQLQ1q9I6JHZASm3qNXIzPt2D/FC5jQgHC0XxQA784YuYaGuHlnHrjzL 73WtrYlDTkxouupYzlnQCJedg6qtHOXIQK3k9jvkRc2oiw0B3EwGLX/1Njnt2iWLpZ7c rqNYFVK9kIu/Y11+wpZsWov2yxb/6WZys2mqDVGG+bnb1lvKe0RzPzLfJ3oj1sSx+HvC 0FJo4ZJ78DCM+5lYcm9I99rShjjLQXybNkB71Lr0MdBOYlgVJ8dYAdsuyoDkBlp3HVdJ 06tQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="Xhr/ucg1"; 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-89283-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89283-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x53-20020a056a000bf500b006e58f1ee2casi4462270pfu.184.2024.03.01.17.04.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 17:04:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89283-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="Xhr/ucg1"; 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-89283-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89283-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 8E854B252DB for ; Sat, 2 Mar 2024 01:02:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B31DB523D; Sat, 2 Mar 2024 01:00:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Xhr/ucg1" Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.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 7DBCE1C16 for ; Sat, 2 Mar 2024 01:00:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709341221; cv=none; b=cwHjq8EH/HST8jvajOq+vgEbqV/IjkxnCb7y/vyynqCpE0PZoIqt7rtP2P5IB7WIxuU5czakHu2tloTJzdDgE3a08hdl4DGWApt4b936tKMQDbKrZMjepf04bepDCHEbcuMrFz19JIvhK+N+d0lSzNoTV8qe+1iNOeJ1FSN2rGo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709341221; c=relaxed/simple; bh=r7EPMWXB50WRmPs6Ybs2X/h0mr+Q2k6sSSuIvq/Jh3g=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=p1S6SGKIR32+vIdkBqyJRps4wwVGAhSgb9nIM0A1fTgvbj88rhE4mrvqZGklwhCgaWePB3js/URwVMUCN6TueokGb9fSAivVKqOGwcGgut4KTYfvQNELFJZvpgn8bmcHwthzm8jYfKoQbN/Ww/skohU1XKIHiVb/1ah/LMGjOv4= 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=Xhr/ucg1; arc=none smtp.client-ip=209.85.219.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-yb1-f201.google.com with SMTP id 3f1490d57ef6-dc743cc50a6so3629929276.2 for ; Fri, 01 Mar 2024 17:00:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709341219; x=1709946019; 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=yRxIvbPDDMCjNnVdacSzvCtMsT39EeStBSRtXaTCLVU=; b=Xhr/ucg1WzqHMRl4tmdOibBGQNwk518oDN4TEROUxHVsglY/zSmmMxbvN5Eu13nsax JUOJCZy7YSPIAb4hw6emVeJd/LJKx6Gwg93F4CCaTm3BmIWYbxSXTPavLJqutZ4BhkzR s9Fnliw+3uLd0tOZRQuJaYWuApofzAO5+fAVGMBS8MzHbb/eWEtY8VjFG76ocPc+ufoy taEJtRT4I/4UBA5d+Mf2Qsr0aptw9T7vxHzqCvEztVjOlhKkBfaeRHqNX7JwI4wvHTIa mPacVLdJXCwzw/gI9ZVbLy25OZgJzbRZXYciYCMt6FaXFpx0JSfkKB2aeO9MjI2r5bwX vWTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709341219; x=1709946019; 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=yRxIvbPDDMCjNnVdacSzvCtMsT39EeStBSRtXaTCLVU=; b=ah0FVJNtoh50XKZ1wriuDyfu4k9w0y9htUSgBN986nRN9u0ybPZErEhqSZVlRCYiQt qDcjrKT9Y5C+z+PHQam/jglDXm31pnJKPngCZYOojozUOhYPnyKo6FcX6iaOS+aMi+OU 7HJfRwWv7ss1TRg3IR8mlyl5yOp+Bnh+SMz6SZMNGhJZv4HWoDHYk9qnksS8i45x5j8L 4gL5Wu35vZ4tRbUS7OOh/1BOTG6tmqawVxCh+XvsoesEIfRAT4U50YZJDpnk6Gztuk3h i090UeHKMotrCaDwylmxJfeQ/cSIaWfQDe22NKpgpECVnmwXrhZJ4jGLtzcGbHfxyEwl IKUA== X-Forwarded-Encrypted: i=1; AJvYcCVHVUPwnXCvVdIw6A3hjfMqajrwOeJPKs1pMmqBjv3i3eSJFbh91+VryYQMwl/QVMu4qlUm2GpfZxVLpdZoriOn/mSR8B/jkVjN/Ksu X-Gm-Message-State: AOJu0Yy6nr6mErTCT1+Zi8bCjk8pO3O2S7aZ8HWE4SCDdrJsdwHEhp62 h4J/8RBy0Il4qwP5kpJfH1TkIlCW6fPfCsd54sJ/AAvCez6WrBi8uYybrfzet6Vq60a1gfztSy7 xCG0kDA== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:aba7:66c5:3365:7114]) (user=irogers job=sendgmr) by 2002:a05:6902:18d3:b0:dc7:865b:22c6 with SMTP id ck19-20020a05690218d300b00dc7865b22c6mr117870ybb.8.1709341219679; Fri, 01 Mar 2024 17:00:19 -0800 (PST) Date: Fri, 1 Mar 2024 16:59:47 -0800 In-Reply-To: <20240302005950.2847058-1-irogers@google.com> Message-Id: <20240302005950.2847058-10-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 09/12] perf jevents: Drop duplicate pending metrics 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" Drop adding a pending metric if there is an existing one. Signed-off-by: Ian Rogers --- tools/perf/pmu-events/jevents.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py index 65ab03ce5064..55205a260a16 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -468,7 +468,7 @@ def add_events_table_entries(item: os.DirEntry, topic: str) -> None: for e in read_json_events(item.path, topic): if e.name: _pending_events.append(e) - if e.metric_name: + if e.metric_name and not any(e.metric_name == x.metric_name for x in _pending_metrics): _pending_metrics.append(e) -- 2.44.0.278.ge034bb2e1d-goog