Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp930614pxb; Wed, 13 Apr 2022 16:03:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytT+ZrH/5+EXvL+vGxiVIe2EOHvhjSbId6KOh9ql21p5oxBN4VZumpDmkixHoDxJ4Xhtsx X-Received: by 2002:a05:6a00:f92:b0:505:c53b:2668 with SMTP id ct18-20020a056a000f9200b00505c53b2668mr1059483pfb.64.1649890982259; Wed, 13 Apr 2022 16:03:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649890982; cv=none; d=google.com; s=arc-20160816; b=AFRrq9nk9/V5aqKsL/ssyoalSTJNa5YYFoYDqn3req7eadjGB/i3UBEDH0wOFZ+m9p X9V6D8HulqCg8JqQsOAaoWWLh7yBM64XzmSszjMYEILs1oAYdPoFBVyaBxB/Z31L8hbN 2bg2n/4H2YuM/jeXXfvjj/czUuy6YwF2A+u8JjlCNQ7be/DZddkmgleoXwmA4DviPvks cPs9IhHdyi7dN20OCTfZ5H2kOBHjOaIpYxpFfSj1irCRwlpRVthcFvH/e9hWmna7p0vQ gy2cC5ZE7cU+YvdeErPI9RbRLGWvrXthwsRx3vHq0N5xJ0Dsgai29bxKlkZdnidJaWiv +F6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :dkim-signature; bh=4LdCm2LQ8QCCRGCZyoOA7ym+iNo+PUnyUQ+rUu7M50A=; b=cm7/SW44pW8FpedN0pIc06zticM2byeRf5ICN75fmZfX6g+uAURp4PD8f1W5YPJ8nA oo0c7INUwS42Yg6yeG79XSG2S32cQ3vncw7/NyYn1tcrX+GeZZ28Zi3m5Em+nmXIlZsW 8YLiU9BrcGZxk+VZvaZyUCFyYpsX8yOamPNzZ0RRacaN2fxsA2y1defl2DH6mZHZhSme TFo+3vymuimPLgfayPYJIwz5pgkyVdu2ZsriWxsu2gCE7sdcbymhhL715115X2oaSeij PE3qAPloCGrcLaulsZIBfUSRrhOh2qNCm0xY9bHckl73mx2SsLfAPp+gmaGEVGrvV0i7 /P8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=YfoJJnbg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o11-20020a170902d4cb00b00153b2d16519si15929299plg.289.2022.04.13.16.02.48; Wed, 13 Apr 2022 16:03:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=YfoJJnbg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238796AbiDMVHv (ORCPT + 99 others); Wed, 13 Apr 2022 17:07:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238798AbiDMVHa (ORCPT ); Wed, 13 Apr 2022 17:07:30 -0400 Received: from mail-yw1-x1149.google.com (mail-yw1-x1149.google.com [IPv6:2607:f8b0:4864:20::1149]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFC204BBAA for ; Wed, 13 Apr 2022 14:05:07 -0700 (PDT) Received: by mail-yw1-x1149.google.com with SMTP id 00721157ae682-2ec1914e315so26412417b3.23 for ; Wed, 13 Apr 2022 14:05:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:message-id:mime-version:subject:from:to:cc; bh=4LdCm2LQ8QCCRGCZyoOA7ym+iNo+PUnyUQ+rUu7M50A=; b=YfoJJnbg1Nqy29ie3R1xerMB3Px4QxQ0zzwsUMdXr8xyeEAOzqBbtuRqi9KK61Ttfq WK7ZOpaL3k+GkRHN1Atov1hd008AutBXq+wzYpcGOS/p+q9w5+CA8w2gkFoUyQm0vlF7 4kmJ24MlFOGqhmLOacLllLooikJHFrQiS8g1Pf7OEgYQkbqD6p43eRMZrmO2xFW1cIpD dqmel/GvrUWjNhL1KxwK4qXty2LJ9x5ucrqF67BNjGyHg424rUZ6FAs2W7Tynnjky5m8 XLjRU8CD1iFmcZtOGegPskugaCEotq6OECfF7oQlRymN21yA9Q8eDJXQs+KSq5qeETbw 5YrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=4LdCm2LQ8QCCRGCZyoOA7ym+iNo+PUnyUQ+rUu7M50A=; b=5HzPs0iPciQ6lBdaJNOVjyYO/66oevTYTgFH5DueFSfy16HOImqwnV/MVtpvS5koWD PPZtGcOqlgZG5b8PBehJQnl+3+/+cd5h4e/CrQTHP8XBrv5+0pXkkyEYqF2BZ0ulD1NG fYmC+URvIz9AMFzvnIGksBtQZ454qbo66+EHFLXmm7SEcLApT0US15+OAo6FDivrrD+O LFNbkSJUyT/vH1IgLB7idWLrVRnFnmUQz9UTIPthggDqDnMfRZQMNOlYiWMuGZXxm/+T ZayvY2CaVMW6XXqjXyyquee2HEhWjO4v17K2vR35ov7hVZ3SE7yEmnfpncV+2C1mhKfQ 4OqA== X-Gm-Message-State: AOAM532wrrmtQ4CELDmth8toAiUZ+JWUbWYcpLPhrnSFKCjckkOrdAes fTtNTGR4zbN0W/AvMpf69UJPJnMnErf/ X-Received: from irogers.svl.corp.google.com ([2620:15c:2cd:202:9135:da53:a8a2:bf11]) (user=irogers job=sendgmr) by 2002:a81:748a:0:b0:2eb:e6c0:981b with SMTP id p132-20020a81748a000000b002ebe6c0981bmr707127ywc.71.1649883906883; Wed, 13 Apr 2022 14:05:06 -0700 (PDT) Date: Wed, 13 Apr 2022 14:04:50 -0700 Message-Id: <20220413210503.3256922-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.36.0.rc0.470.gd361397f0d-goog Subject: [PATCH 01/14] perf vendor events intel: Fix icelake cstate metrics From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Maxime Coquelin , Alexandre Torgue , Kan Liang , Xing Zhengjun , Andi Kleen , John Garry , James Clark , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Cc: Ian Rogers Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Apply cstate fix from: https://github.com/intel/event-converter-for-linux-perf/ so that metrics for cstates that exist on the particular architecture are generated. This corrects issues with metric testing. Also correct topic of ASSISTS.ANY event. Signed-off-by: Ian Rogers --- .../arch/x86/icelake/icl-metrics.json | 24 ++++++++++++++----- .../pmu-events/arch/x86/icelake/other.json | 14 +---------- .../pmu-events/arch/x86/icelake/pipeline.json | 14 ++++++++++- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/tools/perf/pmu-events/arch/x86/icelake/icl-metrics.json b/tools/perf/pmu-events/arch/x86/icelake/icl-metrics.json index 4af23c04dc18..ea73bc1889ba 100644 --- a/tools/perf/pmu-events/arch/x86/icelake/icl-metrics.json +++ b/tools/perf/pmu-events/arch/x86/icelake/icl-metrics.json @@ -408,12 +408,6 @@ "MetricGroup": "Branches;OS", "MetricName": "IpFarBranch" }, - { - "BriefDescription": "C3 residency percent per core", - "MetricExpr": "(cstate_core@c3\\-residency@ / msr@tsc@) * 100", - "MetricGroup": "Power", - "MetricName": "C3_Core_Residency" - }, { "BriefDescription": "C6 residency percent per core", "MetricExpr": "(cstate_core@c6\\-residency@ / msr@tsc@) * 100", @@ -449,5 +443,23 @@ "MetricExpr": "(cstate_pkg@c7\\-residency@ / msr@tsc@) * 100", "MetricGroup": "Power", "MetricName": "C7_Pkg_Residency" + }, + { + "BriefDescription": "C8 residency percent per package", + "MetricExpr": "(cstate_pkg@c8\\-residency@ / msr@tsc@) * 100", + "MetricGroup": "Power", + "MetricName": "C8_Pkg_Residency" + }, + { + "BriefDescription": "C9 residency percent per package", + "MetricExpr": "(cstate_pkg@c9\\-residency@ / msr@tsc@) * 100", + "MetricGroup": "Power", + "MetricName": "C9_Pkg_Residency" + }, + { + "BriefDescription": "C10 residency percent per package", + "MetricExpr": "(cstate_pkg@c10\\-residency@ / msr@tsc@) * 100", + "MetricGroup": "Power", + "MetricName": "C10_Pkg_Residency" } ] diff --git a/tools/perf/pmu-events/arch/x86/icelake/other.json b/tools/perf/pmu-events/arch/x86/icelake/other.json index 08f6321025e8..2e177f95a9cb 100644 --- a/tools/perf/pmu-events/arch/x86/icelake/other.json +++ b/tools/perf/pmu-events/arch/x86/icelake/other.json @@ -1,16 +1,4 @@ [ - { - "BriefDescription": "Number of occurrences where a microcode assist is invoked by hardware.", - "CollectPEBSRecord": "2", - "Counter": "0,1,2,3,4,5,6,7", - "EventCode": "0xc1", - "EventName": "ASSISTS.ANY", - "PEBScounters": "0,1,2,3,4,5,6,7", - "PublicDescription": "Counts the number of occurrences where a microcode assist is invoked by hardware Examples include AD (page Access Dirty), FP and AVX related assists.", - "SampleAfterValue": "100003", - "Speculative": "1", - "UMask": "0x7" - }, { "BriefDescription": "Core cycles where the core was running in a manner where Turbo may be clipped to the Non-AVX turbo schedule.", "CollectPEBSRecord": "2", @@ -407,4 +395,4 @@ "Speculative": "1", "UMask": "0x1" } -] \ No newline at end of file +] diff --git a/tools/perf/pmu-events/arch/x86/icelake/pipeline.json b/tools/perf/pmu-events/arch/x86/icelake/pipeline.json index 573ac7ac8879..2b58cfaaaf39 100644 --- a/tools/perf/pmu-events/arch/x86/icelake/pipeline.json +++ b/tools/perf/pmu-events/arch/x86/icelake/pipeline.json @@ -12,6 +12,18 @@ "Speculative": "1", "UMask": "0x9" }, + { + "BriefDescription": "Number of occurrences where a microcode assist is invoked by hardware.", + "CollectPEBSRecord": "2", + "Counter": "0,1,2,3,4,5,6,7", + "EventCode": "0xc1", + "EventName": "ASSISTS.ANY", + "PEBScounters": "0,1,2,3,4,5,6,7", + "PublicDescription": "Counts the number of occurrences where a microcode assist is invoked by hardware Examples include AD (page Access Dirty), FP and AVX related assists.", + "SampleAfterValue": "100003", + "Speculative": "1", + "UMask": "0x7" + }, { "BriefDescription": "All branch instructions retired.", "CollectPEBSRecord": "2", @@ -1102,4 +1114,4 @@ "SampleAfterValue": "1000003", "UMask": "0x2" } -] \ No newline at end of file +] -- 2.36.0.rc0.470.gd361397f0d-goog