From patchwork Mon Aug 5 19:44:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13753999 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0C6E2C3DA7F for ; Mon, 5 Aug 2024 19:44:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:Mime-Version:Message-Id :Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=FUKElaP/bdXPYBhqzJFUfCKcUdr1LRtZFZi9jz9c8q8=; b=aOdTSi5IgTAbP+ 7k9+uGiMxMk0KcpDZXFu7SMRd9qSYUQ7VGN+2qFvvJyCu6esMyK9NXjK6VGbFFyqgGXa5QFhpgWfh pV44rlWLpqCnpfxmzl4zygiIiKxCnCDykvsr9/CBBUSkBIDKZPZ+mU3ViHbMI0+MFrgyvUdX/rDpl KENXaWlpUOVWlfYKuu3LLU/yphb+bxdXa8O0FeJWtBr+W/+4eWJJAiikzfTtMUmPn07v4h66F3UvW t8D2/NnUI1Hy22iDVu8u6aytOMGbUKOzfZOXv9GmopLoPVyICGPvVDsBtg0lotuddgTnRgkZCuzpS CEdbQ09rDMV0eiIln/yA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3dF-0000000H3Vu-0r7A; Mon, 05 Aug 2024 19:44:37 +0000 Received: from mail-yw1-x1149.google.com ([2607:f8b0:4864:20::1149]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3dB-0000000H3Uf-2d0Y for linux-riscv@lists.infradead.org; Mon, 05 Aug 2024 19:44:35 +0000 Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-672bea19c63so254950267b3.2 for ; Mon, 05 Aug 2024 12:44:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1722887072; x=1723491872; darn=lists.infradead.org; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=iJXWmNBT0oaBhJJEJy7hYTlF13tlRK8nid7RNuMSvR8=; b=mZLw8nlBahajOLXGbG7njY4ZEMnHOs5KBEuDPXLx+WH3fFIjIjMuwxURAnjqyIHlXU 7+U/4dAfrePPX5tnJWS1SQ6G464joOY2iul6BmEgj/SfD0HiECncTIgojq3QCe1rvstu h/czzCEOEvk1Ppa2NUlooRfNzr7s7LaIDVYKgZui8h7Yj/se3jEbNdqjdLex9+4LrgxV cLlmVY9HV18x62DNhUhqlcMbF3EQQll27z++kzfxMZt1aMJFOmZ/IHHm4rzf7Tq8s1ht YNP9W7tY/d6jT9BcWpacfDCG8YWXZHQy9uLkHRNpSpgzN2kZoMDzNXS/T2oF3p5BXA0g VIXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722887072; x=1723491872; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iJXWmNBT0oaBhJJEJy7hYTlF13tlRK8nid7RNuMSvR8=; b=sWYTH5P1SsD83JnwYfahv9mt2Vu7y6sNxaT1XVM1+2SIjoDSmU+Pf162O62zU0Aw9z d7vfbzTuDcG2L/tmPiIY0r5ATEV1VDWUZ3OkczKFd1qSw7iSpb9rMvg2iE0HwERUjpLa bP3eRHPBzsyEWsOH+sezofUpomp2ihWgTT6wRmmAyPWaqDOTqpDNo1sA2UQ3HKI9vBOp nr+/GrkQV8y5vrq9ZfAenwcDhr7DBOo+2YNgGCynAM+MbL5jo9gMkFfhDqlBSmV9HPQn reeTjGnwQq8MSc4HppVymcfuFvtgYm5sc/04cwQXKqavPfRQAoF6FN+MQu1PZSj5y6Aj iUZw== X-Forwarded-Encrypted: i=1; AJvYcCVlh5ZFaCc2R664QlZf9pQ76hHyM/pZPAHbng5FjWM+my99mNIocLMajsASa1Pt/YZW3B6chWuVlh7R5UKl6+eLkZDpYC7kuGmF00m+7/nR X-Gm-Message-State: AOJu0YyuTpLfUTvYtE42gSGZG2Cw5SJSfwk5Urr2HWlSz3BZUIRO0XWH MDsHs/Ti0gpR6FT/es+kGrDUfg2bnnDat4AZUU2oY7oRZ+FxwxADSleqxb3DoSOG+fxBbYxp+Mh AzCpfMQ== X-Google-Smtp-Source: AGHT+IHJSqpiy7EVr1MrO3N5kEdZB8cHENC2V7KXM1QSWWQkT2wB+WeZ6roGFkSYmicbn8frWZfPR7R4IIZC X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:1f65:8dc8:61d0:4b08]) (user=irogers job=sendgmr) by 2002:a05:690c:288:b0:669:f244:2ae5 with SMTP id 00721157ae682-689601a6da3mr4014357b3.3.1722887072239; Mon, 05 Aug 2024 12:44:32 -0700 (PDT) Date: Mon, 5 Aug 2024 12:44:20 -0700 Message-Id: <20240805194424.597244-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.46.0.rc2.264.g509ed76dc8-goog Subject: [PATCH v1 1/5] perf test: Add build test for JEVENTS_ARCH=all From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Samuel Holland , Charles Ci-Jyun Wu , Locus Wei-Han Chen , Atish Patra , Ji Sheng Teoh , Inochi Amaoto , Jing Zhang , Xu Yang , Sandipan Das , Guilherme Amadio , Changbin Du , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, vincent.chen@sifive.com, greentime.hu@sifive.com, Eric Lin X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240805_124433_687317_E4659802 X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Building with JEVENTS_ARCH=all builds all CPU types and allows things like assertions to check the validity of the input json. Signed-off-by: Ian Rogers --- tools/perf/tests/make | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/tests/make b/tools/perf/tests/make index a1f8adf85367..8a9edf758f10 100644 --- a/tools/perf/tests/make +++ b/tools/perf/tests/make @@ -70,6 +70,7 @@ make_python_perf_so := $(python_perf_so) make_debug := DEBUG=1 make_nondistro := BUILD_NONDISTRO=1 make_extra_tests := EXTRA_TESTS=1 +make_jevents_all := JEVENTS_ARCH=all make_no_bpf_skel := BUILD_BPF_SKEL=0 make_gen_vmlinux_h := GEN_VMLINUX_H=1 make_no_libperl := NO_LIBPERL=1 @@ -140,6 +141,7 @@ run += make_python_perf_so run += make_debug run += make_nondistro run += make_extra_tests +run += make_jevents_all run += make_no_bpf_skel run += make_gen_vmlinux_h run += make_no_libperl From patchwork Mon Aug 5 19:44:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13754000 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 216A3C3DA4A for ; Mon, 5 Aug 2024 19:45:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version :Message-Id:In-Reply-To:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EIBi9a6JvGsCVuHslE/WQKTwPUXVifo6fcLRls1HspA=; b=ZdPkJQYTAXZIzs wJ2jM/BRJcgMWzrQPcEO6LJgL+3GItb6mppjkpVEO12TV/CXd3/pPQHxmYQtW1QaNl62H2qJICKHr wW4dKO3mi/UGwcoFrtgHnrNFjGRr3WWgdJQbOUi6WPsVRSJZKymlmh0ut35/++lNLdNCh7/DWy/2x MlMUSN69c631plGyMZl5pyq4W92KzeuQVtR2neriEVXJsex360zLKaut3s/aYqHiGIxzzUpaGNWCr vnGYY+A2xvCQsO8El2EC69mAuISu+v7f8ATRe6X9BPBU4DFPRzb1sRG5g6zwhp7+6Kh0hpDbBKiXB kIS4KgsoAg/AXArD1dqA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3dl-0000000H3jd-2toy; Mon, 05 Aug 2024 19:45:09 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3dE-0000000H3VG-2YF0 for linux-riscv@lists.infradead.org; Mon, 05 Aug 2024 19:44:38 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e0ba318b1b2so13928792276.0 for ; Mon, 05 Aug 2024 12:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1722887074; x=1723491874; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=tA68ylO5jWmS/IidvWPiQaY17OcIuvwiHS8mFC423wA=; b=Ax3mW5+z9vgFsY1MBPEchumEXFByFwEwk/T8fI6asHPCVsGMHNWuJwEZRaPWAxrakb MUA/SuaODO/++6mBWBNRbgu+AaIV9lJwFEorwZjBoKlFpItOAiq3XSvw3mN32imAn7DO Gt1kvbHSfi3e0Yp+wVu3M1S9bZ+TQTT7uK+N+98e1KUNqDeHQd4HgMSI1sQEAE83H05m OTFcXbyLOoJm4mqa39XXA+/R0lHFZqVz2Lmaymoscv5DgaTAh1df54v4rTy5kZqjGCpg JUqj6Zv++/NaiXv4jBcGf9iMHpmH9dKV1vHsFg4gtxaiBlTNzC41bll1ITFWr18Wf1tx aCXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722887074; x=1723491874; 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=tA68ylO5jWmS/IidvWPiQaY17OcIuvwiHS8mFC423wA=; b=b3p0ASKhBe+0UwuUj2rVHesNEuP50jgfC9HJySJ5wtLnaJAHqb28JHiCmMHIB/8RIV mzaXff+lk4NhfKpIskhUJu43DHMhH5VxvGVZacQTDttU72O9m6vL2vnXBMt++YQQV5Ae ajinNEDbM7YyPKZJfyv3Jmkt++cktyPFgUSQPk+immDOFANvAmPqxRtRhRPg0MW19ot/ mKjW7nh4gFyb4v7pjZ0rAu9SN7iNdmsk18VLEuWpj3NOEI5tTXzSKxmeUG5h94dQXfH/ WwCbd1Ld/8KlZSQ5E2IsZ4qv+3vNRBqfq4riOhngCiE9Fsgl6LPhL8Gofrs1xAA5mSek b76Q== X-Forwarded-Encrypted: i=1; AJvYcCVJScBXEC0eTENpTHd8TKeUSwC7Ok1QvFDLAgfqusYU/poNJwVGXw1+McUbIFvseLf57u3LFgKcrCIU1Rtq9tYXze/6e+cSVK1ANOWu/7J1 X-Gm-Message-State: AOJu0YyN9FnS78GKRXyR/tbuSyI0zqXR3wICetJ2yMNud5oS6Mb6F4iC JMl6vqHLdi8gUk+HwJHG9qSdUXLRbYIw34rrxj/be6FmphPPRpXssa1auSalJsYi0LuFREzZFS2 mB+u2xQ== X-Google-Smtp-Source: AGHT+IEe61oyAxRcyJbONskfgG+pxQhuzYOimimwYVvqO8/yvxoo+1a+/P+Oz8TdzIpat9CjNonli4Crb+al X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:1f65:8dc8:61d0:4b08]) (user=irogers job=sendgmr) by 2002:a25:9008:0:b0:e0b:f46d:a2bb with SMTP id 3f1490d57ef6-e0bf46db4edmr40122276.11.1722887074494; Mon, 05 Aug 2024 12:44:34 -0700 (PDT) Date: Mon, 5 Aug 2024 12:44:21 -0700 In-Reply-To: <20240805194424.597244-1-irogers@google.com> Message-Id: <20240805194424.597244-2-irogers@google.com> Mime-Version: 1.0 References: <20240805194424.597244-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.rc2.264.g509ed76dc8-goog Subject: [PATCH v1 2/5] perf pmu-events: Change dependencies for empty-pmu-events.c test From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Samuel Holland , Charles Ci-Jyun Wu , Locus Wei-Han Chen , Atish Patra , Ji Sheng Teoh , Inochi Amaoto , Jing Zhang , Xu Yang , Sandipan Das , Guilherme Amadio , Changbin Du , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, vincent.chen@sifive.com, greentime.hu@sifive.com, Eric Lin X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240805_124436_668985_0CA1FB00 X-CRM114-Status: GOOD ( 13.05 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Switch from $? (all the prerequisites that are newer than the target) to $^ (all the prerequisites) as touching jevents.py will mean that empty-pmu-events.c won't be passed to the diff command breaking the build. Signed-off-by: Ian Rogers Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo --- tools/perf/pmu-events/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/pmu-events/Build b/tools/perf/pmu-events/Build index c3fa43c49706..d941bc9d16e9 100644 --- a/tools/perf/pmu-events/Build +++ b/tools/perf/pmu-events/Build @@ -39,7 +39,7 @@ $(TEST_EMPTY_PMU_EVENTS_C): $(JSON) $(JSON_TEST) $(JEVENTS_PY) $(METRIC_PY) $(ME $(EMPTY_PMU_EVENTS_TEST_LOG): $(EMPTY_PMU_EVENTS_C) $(TEST_EMPTY_PMU_EVENTS_C) $(call rule_mkdir) - $(Q)$(call echo-cmd,test)diff -u $? 2> $@ || (cat $@ && false) + $(Q)$(call echo-cmd,test)diff -u $^ 2> $@ || (cat $@ && false) $(PMU_EVENTS_C): $(JSON) $(JSON_TEST) $(JEVENTS_PY) $(METRIC_PY) $(METRIC_TEST_LOG) $(EMPTY_PMU_EVENTS_TEST_LOG) $(call rule_mkdir) From patchwork Mon Aug 5 19:44:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13754001 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8FF90C3DA7F for ; Mon, 5 Aug 2024 19:45:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version :Message-Id:In-Reply-To:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cFy/Zp16I1tcosf74XeEe88TwsVgmDDnCDPBDzJGQqE=; b=2kSFsGjWHba/1r sdi8dFiV4Z7c3JN5mZXjt7UTW6JBHKkxEGfQtR/DaabQxgqj+ePUTgQxRzXTujxgJWG6ox/P3qXPU ZY8R2XnQuWZWQ0yN4n7xFjUgXkzr/ZQmyiwq4QGvBazoOWaP20Hc+fzDvSLxsmHpqKWWLiGFlJn76 7Zb6T1NkY0cZpL2v9PGEvyYgSkUkpglDg5c7L3eWKRiVrItql6l9/15AtqX3VoiIZMN8nLu/JUGBj pbVP97CDUJH5yg1uYRzCmVRIA77rkD1pGvCYNwP0CCgGsCTyafBXcQCz7n/YaLRrb4rsNotiZ9kgx d+fehD4QEx6ONHHO5H2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3eK-0000000H3z5-3lhI; Mon, 05 Aug 2024 19:45:44 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3dG-0000000H3WM-2JmR for linux-riscv@lists.infradead.org; Mon, 05 Aug 2024 19:44:40 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e0353b731b8so17669520276.2 for ; Mon, 05 Aug 2024 12:44:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1722887077; x=1723491877; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=Z6LamGx0sdNwDED1VdCLCVyXTKgGz4JF2HbccvXV2xg=; b=OLCuVsi53TVWaJyKfwtXtxoY8S0qOZ26kP6BH7CQ7WJNXfkbcGWlUREHXuNilQv0yS yf29WDoHhyDEgqPn0sHAms3m8lPbQ6tIq13ALIPA4/W+JZuQSsNYe5FmZYq1Dx8iJt/2 3eTtdX170cQUdoSPA591RcOgMgsnYYUT2ObsBYimVfmSytDEYkD7FdoiSdLSWsyWMwDb yi9Ex18ShEtG5JP3S8aaJOgalMMleqrCnVnfNF+5Qq345lpTAEX8KmoA5ymVATr+Udgd VtRAtYgyrek8AYEeIVF1u36PQCkTNpEiwMHaiE6FHEck3+BcNdheEEfmAkW771v7j3Kw DYCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722887077; x=1723491877; 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=Z6LamGx0sdNwDED1VdCLCVyXTKgGz4JF2HbccvXV2xg=; b=GFdrEfA1kMdFl6YvbVpAbvu1FStQsuTETdypkSNKxrQign8AN+0T2sJQ01x3boVLfy KfZ9b2xx/38KbCrSkJcO5k7pFhs1xM9cIHEuvia4fb0z/ZTLFWUHxUg+z9eVNh1B+bCT +UPQ+TY1usF5tttjAHAZGdAesztqRAxp8Ukb8NkWxcLoKPWEdvwm/UO2MaU2o6Kv4fFP qhnSEBALrcxEnGEkY5lRJbPSnuLhabUMmt7AigZ/ytG/2ubOW96kIueqOVhVB/729R4h ho6AKZqF38n5bhRmoc/XbRO36WdnYIadx+TvHD3BxkiH8R5u8LAqXxjSPgMGIT3hQDlq Okiw== X-Forwarded-Encrypted: i=1; AJvYcCXg7zpA7bQBZO4RYD6rD1CpmRmBUwwN4LS0km0+yNOXrDiT7OjtmARCnLwpBjBxeCQ+Uf3XYfTk7MxlnYtA8XxzjCl2r5yACcMJotvwVRCr X-Gm-Message-State: AOJu0YzRSMnN9xoadmwiLyh0NLqne79u8sR/meZERSjAff9G2d6uIeD/ l4UHYo2kJQzD8fOz+PzT/cIWY792NUSMRjODhWbUgBldbM1zZ7Zoyd/JyKrfeU0ngi/SgMUHLs+ oHmeUPQ== X-Google-Smtp-Source: AGHT+IFdv3oV3aqOKUmsPGI61CM1Ai9LluPAyOkHwx2uTCKWXxhzLAfMUs0X+MdhGbjcuYrJiIZPaJSwZtB4 X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:1f65:8dc8:61d0:4b08]) (user=irogers job=sendgmr) by 2002:a05:6902:1148:b0:e0b:fe07:1e19 with SMTP id 3f1490d57ef6-e0bfe072223mr13804276.0.1722887076925; Mon, 05 Aug 2024 12:44:36 -0700 (PDT) Date: Mon, 5 Aug 2024 12:44:22 -0700 In-Reply-To: <20240805194424.597244-1-irogers@google.com> Message-Id: <20240805194424.597244-3-irogers@google.com> Mime-Version: 1.0 References: <20240805194424.597244-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.rc2.264.g509ed76dc8-goog Subject: [PATCH v1 3/5] perf pmu-events: Remove duplicated ampereone event From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Samuel Holland , Charles Ci-Jyun Wu , Locus Wei-Han Chen , Atish Patra , Ji Sheng Teoh , Inochi Amaoto , Jing Zhang , Xu Yang , Sandipan Das , Guilherme Amadio , Changbin Du , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, vincent.chen@sifive.com, greentime.hu@sifive.com, Eric Lin X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240805_124438_623233_2FF6EC86 X-CRM114-Status: UNSURE ( 9.66 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org OP_SPEC is repeated twice in the file which will break invariants in perf list as discussed in this thread: https://lore.kernel.org/linux-perf-users/20240719081651.24853-1-eric.lin@sifive.com/ Signed-off-by: Ian Rogers --- .../pmu-events/arch/arm64/ampere/ampereone/instruction.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/instruction.json b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/instruction.json index 18d1f2f76a23..9fe697d12fe0 100644 --- a/tools/perf/pmu-events/arch/arm64/ampere/ampereone/instruction.json +++ b/tools/perf/pmu-events/arch/arm64/ampere/ampereone/instruction.json @@ -77,9 +77,6 @@ { "ArchStdEvent": "OP_RETIRED" }, - { - "ArchStdEvent": "OP_SPEC" - }, { "PublicDescription": "Operation speculatively executed, NOP", "EventCode": "0x100", From patchwork Mon Aug 5 19:44:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13754002 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 253F6C3DA4A for ; Mon, 5 Aug 2024 19:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version :Message-Id:In-Reply-To:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HPSwOT50HvIOeo9koBHLF2JU/WntXKy/GlY2y9EeaoM=; b=UW1bLlrRTEsQ3t GeLRmZWMrEeDY3lOvpfVzr6x5vVRtMn9zQlfigELZg7AfdG+lf+A3kPI2cpxC5Ftv66RrlX/mUFoG ioR+nwRART6PJFfE3Wc0Rn9n2O4mxBojH8Vm2rQmUMJbyW1oTNiMrRQewsfhYcodxfh+zLEx7Dtg/ zQT1awYTDXYc8E0cQcnMwMKcCtUEV1vus0hMngO8kSBwjsm0pUPaKkstLnPzmpstxUkZkw4X+P3Qo pWSm4OBFmZFP5dqE3HOqEcY9Qi7SPcEJ39o7jEO/wl8GbStBcRaBPQ5BQnUcG0oFAbyjON5mySJB8 Ynx64aPWmcqR+4U5GcFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3eq-0000000H48x-2QEn; Mon, 05 Aug 2024 19:46:16 +0000 Received: from mail-yb1-xb4a.google.com ([2607:f8b0:4864:20::b4a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3dI-0000000H3Xj-2Wde for linux-riscv@lists.infradead.org; Mon, 05 Aug 2024 19:44:42 +0000 Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-e0b3742b309so16577024276.1 for ; Mon, 05 Aug 2024 12:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1722887079; x=1723491879; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=Lfe4gxEvYKxDxRwW2qESsqEIUodbK6p7qv/mhdEEZFQ=; b=th8ctGH/tvOeVkICXtC9iF71jrbKdZfrRCz82faohW+rJ/MIQzfU7f56Jjf+OEcQ4s xZcvjtPE8JktgLbeoZaxzqjJ1kYe+KQ/nO5bJAitHAAG9syDuj5gDYdmVHg3K+Spn4o5 lE0OaYsvBuD7nBZMYhHkCGmd7DVbIFHYf65BZi6atg2J5Q1fiOPlTp8rB4pR8yYzs17/ rvTPOakUxmRY0TWQR5r/RDXN0X9AKs6aeM2FymMySHrF7g98DmaLTBhIX+av3G89J/LN OUO/ufDzUXt4EPCgvgqNkPSx1xRngM6nQu3cbLT9htz41yPpKapX4dMY/J8mt72+B654 BbBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722887079; x=1723491879; 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=Lfe4gxEvYKxDxRwW2qESsqEIUodbK6p7qv/mhdEEZFQ=; b=FrWgfeAmBtVnhe4s0w7UTttaPGvKAmnmVy6Rlyfc4Rxr68Smo6T77IR044Sl09g49U LNdNtqefcYbKfNHG9N4MOJN9FkTh7LER+kQt7LFcDcLueFiHy3Md/zfJH7UaXCkMfqVp jN1vEkpB5mfs/s3BETLfItonfsI2iGR109Ygh8w94T2n7vqw4uyrBaF960c+yIsOvAto SNGc1ySywPdRLE79QAKEpS2wpwHvnTcuPXCne6J8z9/3W7bNHTgAv40I/99tFNz8dWOg RTZ7xG6DkYMxn2KQU1CtovYLb2GSPRYf+F/xgZx1qivQQimACYYX/F2+vKFM/yltBXTl aVNQ== X-Forwarded-Encrypted: i=1; AJvYcCVXmhTuEvXwUvXFUcS17O7kh0iz6vMObVf/CAJoWqxusfLz21ejXSojBUtXErV2WORo59jEENXcDcaJr2zxZ8cfQq5yUJr4MYGOiAwaCCoJ X-Gm-Message-State: AOJu0Yyi1C0T95LXeK90/MivDyqsfHVZy2vZZ0rwcKsxUPAt5rb9UI5B k83Gqmb9TxjD/h5GdowRqRxqUkBX2aGA3ZPVEQK1BdPU1jzDEQ51IQ+hN162K6tFO6SmRA4A1Tf vN2qZ7Q== X-Google-Smtp-Source: AGHT+IGrmti4jOH/kazGkyLVxy/soVqkMo0+E8STQu6tXr+6jrpf9QaL4kxNGpeU3MiUA4lgzpOT4h7CHrFx X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:1f65:8dc8:61d0:4b08]) (user=irogers job=sendgmr) by 2002:a05:6902:2311:b0:e0b:6bb1:fac with SMTP id 3f1490d57ef6-e0bde421a34mr35840276.9.1722887079301; Mon, 05 Aug 2024 12:44:39 -0700 (PDT) Date: Mon, 5 Aug 2024 12:44:23 -0700 In-Reply-To: <20240805194424.597244-1-irogers@google.com> Message-Id: <20240805194424.597244-4-irogers@google.com> Mime-Version: 1.0 References: <20240805194424.597244-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.rc2.264.g509ed76dc8-goog Subject: [PATCH v1 4/5] perf pmu-events: Remove duplicated riscv firmware event From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Samuel Holland , Charles Ci-Jyun Wu , Locus Wei-Han Chen , Atish Patra , Ji Sheng Teoh , Inochi Amaoto , Jing Zhang , Xu Yang , Sandipan Das , Guilherme Amadio , Changbin Du , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, vincent.chen@sifive.com, greentime.hu@sifive.com, Eric Lin X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240805_124440_664097_3F087494 X-CRM114-Status: UNSURE ( 9.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org FW_SFENCE_VMA_RECEIVED is repeated twice in the file which will break invariants in perf list as discussed in this thread: https://lore.kernel.org/linux-perf-users/20240719081651.24853-1-eric.lin@sifive.com/ Signed-off-by: Ian Rogers --- tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json | 3 --- tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json | 3 --- .../perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json | 3 --- .../perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json | 3 --- 4 files changed, 12 deletions(-) diff --git a/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json b/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json index 9b4a032186a7..5a996fa4b837 100644 --- a/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json +++ b/tools/perf/pmu-events/arch/riscv/andes/ax45/firmware.json @@ -35,9 +35,6 @@ { "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED" }, - { - "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED" - }, { "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED" }, diff --git a/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json b/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json index 9b4a032186a7..5a996fa4b837 100644 --- a/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json +++ b/tools/perf/pmu-events/arch/riscv/sifive/u74/firmware.json @@ -35,9 +35,6 @@ { "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED" }, - { - "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED" - }, { "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED" }, diff --git a/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json b/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json index 9b4a032186a7..5a996fa4b837 100644 --- a/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json +++ b/tools/perf/pmu-events/arch/riscv/starfive/dubhe-80/firmware.json @@ -35,9 +35,6 @@ { "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED" }, - { - "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED" - }, { "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED" }, diff --git a/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json b/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json index 9b4a032186a7..5a996fa4b837 100644 --- a/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json +++ b/tools/perf/pmu-events/arch/riscv/thead/c900-legacy/firmware.json @@ -35,9 +35,6 @@ { "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED" }, - { - "ArchStdEvent": "FW_SFENCE_VMA_RECEIVED" - }, { "ArchStdEvent": "FW_SFENCE_VMA_ASID_RECEIVED" }, From patchwork Mon Aug 5 19:44:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Rogers X-Patchwork-Id: 13754003 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DAF8FC3DA7F for ; Mon, 5 Aug 2024 19:46:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version :Message-Id:In-Reply-To:Date:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tkkuCFOCRS1WUkF/+shlPEuQkWAhB9Yh1KqoBSLHA6k=; b=tHX0UP2sU4R0ao dlfotGj5FnYSXSynvo2hdMRIEYOrbhZxX9fjnuKn7LynfyMLVqcKI0uhlPuwFZV3VTP1Kdq23PmDf uhHjE+HN6mTAtV9uhy4Qz+nbmZ7qHpe2+b6JqQknz9ejP0L0rcMLokv4ChvJUdLH6BvYdq65dDfpG XSnhdnYDSu5EvgXg4Qk1mdAMbX3Eg1PkHC2VCOk7JgvllYhbTOVcFnEBaWf4h+Y7WRZtKwTBz2702 V2nu/d483zjPC1V+l/Nss1xTcXaBpBFyGY17+Q2UTJMS2wK0jmXb1aw0YTRzBK36Qh3yEHEaKwNFG AWLJZXndVeeyqq3C9KRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3fL-0000000H4IS-0S40; Mon, 05 Aug 2024 19:46:47 +0000 Received: from mail-yb1-xb49.google.com ([2607:f8b0:4864:20::b49]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sb3dK-0000000H3Yo-44ix for linux-riscv@lists.infradead.org; Mon, 05 Aug 2024 19:44:44 +0000 Received: by mail-yb1-xb49.google.com with SMTP id 3f1490d57ef6-e0bb206570aso12019678276.3 for ; Mon, 05 Aug 2024 12:44:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1722887081; x=1723491881; darn=lists.infradead.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=NGlP+W+E1rzo+Hc23sUegbyHJcwAQCTmYUNWikKKi2I=; b=NqNH6Hw1V3A5ATM7MO3K2Kzrc6MQU6fzH9epH0FNQDJJIwT0ImNfbnXYYGzOZ3coxQ zE6Jb4MQ/E/g1AIgFbz7Sy4DIGHoCm9ikJ5I8clm4NI8Y2QzEZ79mA05KqVkvXxWmGe/ WzVr+Glm9IUM36g3RF0ZRjTIyk26DrJkiD/4cwKUP0FD2MSKzhWJcm6LhU8+GkSuofWF Qszor6fg2s7ZBshHuRS4A6QshimtiG+g00QJ5D3VPwn0m3B1g7r5sXRLXUnQGk2v7o42 uJZRK5OPuvJ8CTvIZfaXPlqnyVKFf6UNQcfL7UPH1u32DpHkuvYFgpjaCR7hWiZwek1K sj7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722887081; x=1723491881; 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=NGlP+W+E1rzo+Hc23sUegbyHJcwAQCTmYUNWikKKi2I=; b=skxI88F+1cgIS8TGt7QY5ZhmPwNE6Y9FnCyWZZMCFNBNLECKROgoTxDAE11nul2Dpk ZGJdTizm0fVAYJrdbP4Byxb/4hrANVnZNFCHUlopaWaMRFFtDYe+QIdcPJd/9c6tpPgn 8clDnxtr86Wv2S3al3bnd0QJD/al1rVSpb5Boe/I2Ufv0XqtXAXqjE3JP/kVSk0waFeh BsnBjnkRs/0KShLyQWP19imUhr8vyXKhtrZoUJQmX9KieeU8ZGYZ1nw4V29A+f2AxyxL CiUz2UP2U6GNAV72c/Byk1ZISyrV+O9giqxbgZLyUEwcLx8Mq6iOnctZijINlUHWLxgD XMuA== X-Forwarded-Encrypted: i=1; AJvYcCVtYj7uwVqD0DsiSBc8aTBxHhFflyARfpSkhbLVHXuvVd9o0/E3+tB3R9zBpDsb2CIAOlfvkc0jbQo+UOvDWPaVRr73jNHQCrnlteNgjnn0 X-Gm-Message-State: AOJu0YyxqLl635VtzwaDneDXurxIrKDeVpM7BXo+kzUWIe0LzDd8+FoO c1NJXb1rNVBVGV3pdwH91toqtNHys136KD6A2B+V0pdOJ6vDHT4kKR5me4hCUvJmdzOHDK+ppRU o9QwN3g== X-Google-Smtp-Source: AGHT+IE+AeucgMIyAO3Z0FES/ae0JgHq8LbXGHTnVeU3bAh9HD4a6vZXuMVuSJRiYYFv5skWk5Mgq+Gnxr3N X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:1f65:8dc8:61d0:4b08]) (user=irogers job=sendgmr) by 2002:a05:6902:705:b0:e0e:3f14:c29d with SMTP id 3f1490d57ef6-e0e3f14cae8mr166124276.4.1722887081584; Mon, 05 Aug 2024 12:44:41 -0700 (PDT) Date: Mon, 5 Aug 2024 12:44:24 -0700 In-Reply-To: <20240805194424.597244-1-irogers@google.com> Message-Id: <20240805194424.597244-5-irogers@google.com> Mime-Version: 1.0 References: <20240805194424.597244-1-irogers@google.com> X-Mailer: git-send-email 2.46.0.rc2.264.g509ed76dc8-goog Subject: [PATCH v1 5/5] perf jevents.py: Ensure event names aren't duplicated From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , Kan Liang , John Garry , Will Deacon , James Clark , Mike Leach , Leo Yan , Paul Walmsley , Palmer Dabbelt , Albert Ou , Samuel Holland , Charles Ci-Jyun Wu , Locus Wei-Han Chen , Atish Patra , Ji Sheng Teoh , Inochi Amaoto , Jing Zhang , Xu Yang , Sandipan Das , Guilherme Amadio , Changbin Du , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, vincent.chen@sifive.com, greentime.hu@sifive.com, Eric Lin X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240805_124443_120543_B6EC55F9 X-CRM114-Status: UNSURE ( 9.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Duplicate event names break invariants in perf list. Assert that an event name isn't duplicated so that broken json won't build. Signed-off-by: Ian Rogers --- tools/perf/pmu-events/jevents.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py index fcf0158438b5..1d96b2204e52 100755 --- a/tools/perf/pmu-events/jevents.py +++ b/tools/perf/pmu-events/jevents.py @@ -503,8 +503,11 @@ def print_pending_events() -> None: first = True last_pmu = None + last_name = None pmus = set() for event in sorted(_pending_events, key=event_cmp_key): + if last_pmu and last_pmu == event.pmu: + assert event.name != last_name, f"Duplicate event: {last_pmu}/{last_name}/ in {_pending_events_tblname}" if event.pmu != last_pmu: if not first: _args.output_file.write('};\n') @@ -516,6 +519,7 @@ def print_pending_events() -> None: pmus.add((event.pmu, pmu_name)) _args.output_file.write(event.to_c_string(metric=False)) + last_name = event.name _pending_events = [] _args.output_file.write(f"""