From patchwork Wed Feb 28 17:56:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 207947 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3510964dyb; Wed, 28 Feb 2024 09:58:55 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV9KZufSkdN9bgKYGfKcaZPLMrE2oD7BWM7KRZAXEgXwInVLMHXdm/GsZZ+wTf2e4CQrO61CWbbJ0qsw3OBd+cnWvcxvA== X-Google-Smtp-Source: AGHT+IEIgNp6PjqT6MzKCAqxaBsPGfZ/tKLBl/gNlb64gvOtD/KObq+pvT00vtPOgiIShliaaiAE X-Received: by 2002:a05:690c:c08:b0:608:769b:ff45 with SMTP id cl8-20020a05690c0c0800b00608769bff45mr6461095ywb.25.1709143135096; Wed, 28 Feb 2024 09:58:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709143135; cv=pass; d=google.com; s=arc-20160816; b=vgwuHLPx+f1II8A7IyqdeeSDlkDALzuAFGtwNKbE+ZT/+q9TJbO6EkHi2J54s+trTp 7iE/txTrXVbkeXwPbPKz5ISO9a0lHGnpbzAa27raGGV4Nlm8T7sxtgGvx3xWYWIgNldJ fDc8I9OOJCHVvrija7no+a1/Lk1Vug9tDI/+11KfAnytsWVxUDM+X664kEBwHBiCva8K +3hHSciikiCoPnC7cBr/Q8c/tR8GQ3s7JcukzRpHcHH2a7E8q1+W88NbZlIX1lj/7HGC yBXYFK7cY5OEXDdDmgPfgXp2HIp521w1Z4UvpTBqFHf53aMsjJQmKwaPutGNsGUSBUuj 14eA== 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=m7iZHAzrJ8d/C2dNv5L3zpaDj4EtK8TSO3ZVMJvtqdg=; b=GEePjeluicV+pke1liUSsb110ADtYQ+pEmyvOzu06ea+8j4yvt9cyrU9LowPMx45Nu E8XsKjloIG3gL+CNiAqzeqA/l1XUrx1FpitwAJuaUAvBk++OBJzlKrtnAByK+qzYKfKy 2OZgwZyM0cOWwDJVhV58Yos0A13GpUcepdtSwgFIXjre5HBZPfY2S+sExn/x3UMYd999 YE+zXDLODoF3qItqhu5piDIrYpXoHUdzWO0cUIPo0mg+u1PmrqIttXYfhc5i2uPgMlhb 3dl+oHd2vNxMmK8KvzA+Yh21E3gTDv4/UBE6YhzdVIi+Pgq2K8Wc/Q4HY+linfWYwWFI dBMg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=gOIIRose; 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-85484-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85484-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id z4-20020ae9f444000000b00785da71a474si31181qkl.193.2024.02.28.09.58.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 09:58:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85484-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=gOIIRose; 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-85484-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85484-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DDCAA1C22B8C for ; Wed, 28 Feb 2024 17:58:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AC5847440A; Wed, 28 Feb 2024 17:57:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="gOIIRose" 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 84DE471EC9 for ; Wed, 28 Feb 2024 17:56:58 +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=1709143020; cv=none; b=W9kCMUHTs3pqGLMxbS2IW/Q812HG+xWDBecNF45D+tJrur6zEdxxu7LGKnj2z/HvrivlQXu5TIuQX5RTlImdStfPjV9GftoO0rj3APS8z0dMIomy9BUJXNzrkr0JZzrq+u2ximSPq1AG7527GUWbzGcWxibsbyev9w8QK+E3IdM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709143020; c=relaxed/simple; bh=r7EPMWXB50WRmPs6Ybs2X/h0mr+Q2k6sSSuIvq/Jh3g=; h=Date:In-Reply-To:Message-Id:Mime-Version:References:Subject:From: To:Content-Type; b=V+BL3seveL1m7URWFbxWTJQkNLnOeiTeHGx8P3mLXzzk3vKN7vzTH1tp+RHKkkNF45kZyNNT3YQcvOF/0GXJWt4oz88iIvwcXoxMpwrVQFRZAV8Lv0ImXtm5SOlrG55ot1pj9nbYfF29Fj15BQS9R1DNQm/jBERKgELzeMf/2OA= 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=gOIIRose; 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-6081639fecfso271947b3.1 for ; Wed, 28 Feb 2024 09:56:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709143017; x=1709747817; 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=gOIIRoseZ9iFqQkJgw3gbBC+pEyaJolPUbWsbPn1fGSfVKntWGgt36vMMRkzagGmJ+ XPL4s/PmMcFZuSYWSHiqAh3IpgsTfmQNLQSI4SJZpDAzcETjBmS63BwrREzrb6yMTNxs wDxD+9NzQ9JfD5oJS5/M52BWA0cER5eFV9ujocNAplkqRAV0Z6ujCyT7yzVL2TPfYqSL oo6MkJDLUqcSzQ0xGs6ccfE293FzMotpkMp2fjI79sBC4E30RX3Qk8WFFmDmbHQ/SDXP W4xcJceBd+fPom6ew32rmJOEnmrTgjw3TkHgEyAuPS8w5Cr+YlF4HBDDbrIezuDIEjRZ aaJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709143017; x=1709747817; 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=FmxWbiMNh5bBRKRm6RlvOYZCdEnakPj53f68kYFfCClCPVUPXIofPTxBX/BkAHfC0i +1rf8ZmQX9glrYDxfwA/4uwIOVt6KtzDmE94yHN/asIE2oTrLJxhKMRCbilSfM07PaIb MReyZ+1TZfWWSTcqBYQ+GZ98GuRHdqZ250hb4bsrMlQULU3VeDEr0jE0l3TyZ23X3tfh /Dvwr1LI3+OEPdIt9N2KoMi8OHXUZdDhwnWezUKib3k3iD3ZkOjZRpM80Ierhbn+RUtH +huTKrunH/9W8hL9ejBwIFX2HZSc3LfBNDjcbhsEnSm4x8VDemWs7hqeD42v6j50t6qk uD4g== X-Forwarded-Encrypted: i=1; AJvYcCWcnuWRQqU49NFyHCJoR+VYq0VmFoWGDt7AJB6SC37TaVMlDzt+2VsnmrnWL8ij73cwxndbiZIoh9a2va14n7idkqQdmINz4RyxmLuq X-Gm-Message-State: AOJu0YxKU30XfTTu8t28SRxbdAi96CNtSROEgW1kKcGGOD5umTRs6lpI 4POeS+0y9rypS8baAHglIykldcimeDnVweI8SmfK1gfr35cqAJiGxjE8mkpbrm/SQSThYKWtcmQ D8ErBww== X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:77dc:144c:334e:e2dd]) (user=irogers job=sendgmr) by 2002:a05:6902:1004:b0:dbe:387d:a8ef with SMTP id w4-20020a056902100400b00dbe387da8efmr155ybt.1.1709143017469; Wed, 28 Feb 2024 09:56:57 -0800 (PST) Date: Wed, 28 Feb 2024 09:56:14 -0800 In-Reply-To: <20240228175617.4049201-1-irogers@google.com> Message-Id: <20240228175617.4049201-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: <20240228175617.4049201-1-irogers@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Subject: [PATCH v1 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792166471951800340 X-GMAIL-MSGID: 1792166471951800340 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)