[2/2] perf: Add missing metrics to POWER9 'cpi_breakdown'
diff mbox series

Message ID 1588868938-21933-3-git-send-email-pc@us.ibm.com
State New, archived
Headers show
Series
  • perf: Fix POWER9 cpi_breakdown metricgroup
Related show

Commit Message

Paul A. Clarke May 7, 2020, 4:28 p.m. UTC
From: "Paul A. Clarke" <pc@us.ibm.com>

Add the following metrics to the POWER9 'cpi_breakdown' metricgroup:
- ict_noslot_br_mpred_cpi
- ict_noslot_br_mpred_icmiss_cpi
- ict_noslot_cyc_other_cpi
- ict_noslot_disp_held_cpi
- ict_noslot_disp_held_hb_full_cpi
- ict_noslot_disp_held_issq_cpi
- ict_noslot_disp_held_other_cpi
- ict_noslot_disp_held_sync_cpi
- ict_noslot_disp_held_tbegin_cpi
- ict_noslot_ic_l2_cpi
- ict_noslot_ic_l3_cpi
- ict_noslot_ic_l3miss_cpi
- ict_noslot_ic_miss_cpi

Signed-off-by: Paul A. Clarke <pc@us.ibm.com>
---
 .../arch/powerpc/power9/metrics.json          | 143 ++++++++++--------
 1 file changed, 78 insertions(+), 65 deletions(-)

Comments

Arnaldo May 7, 2020, 4:57 p.m. UTC | #1
Em Thu, May 07, 2020 at 11:28:58AM -0500, Paul A. Clarke escreveu:
> From: "Paul A. Clarke" <pc@us.ibm.com>
> 
> Add the following metrics to the POWER9 'cpi_breakdown' metricgroup:
> - ict_noslot_br_mpred_cpi
> - ict_noslot_br_mpred_icmiss_cpi
> - ict_noslot_cyc_other_cpi
> - ict_noslot_disp_held_cpi
> - ict_noslot_disp_held_hb_full_cpi
> - ict_noslot_disp_held_issq_cpi
> - ict_noslot_disp_held_other_cpi
> - ict_noslot_disp_held_sync_cpi
> - ict_noslot_disp_held_tbegin_cpi
> - ict_noslot_ic_l2_cpi
> - ict_noslot_ic_l3_cpi
> - ict_noslot_ic_l3miss_cpi
> - ict_noslot_ic_miss_cpi

Can folks provide Acked-by or Reviewed-by? Thanks,

- Arnaldo
 
> Signed-off-by: Paul A. Clarke <pc@us.ibm.com>
> ---
>  .../arch/powerpc/power9/metrics.json          | 143 ++++++++++--------
>  1 file changed, 78 insertions(+), 65 deletions(-)
> 
> diff --git a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> index 811c2a8c1c9e..6169351a72c8 100644
> --- a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> +++ b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> @@ -207,6 +207,84 @@
>          "MetricGroup": "cpi_breakdown",
>          "MetricName": "fxu_stall_cpi"
>      },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to branch mispred",
> +        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_br_mpred_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred",
> +        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED_ICMISS/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_br_mpred_icmiss_cpi"
> +    },
> +    {
> +        "BriefDescription": "ICT other stalls",
> +        "MetricExpr": "(PM_ICT_NOSLOT_CYC - PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_BR_MPRED_ICMISS - PM_ICT_NOSLOT_BR_MPRED - PM_ICT_NOSLOT_DISP_HELD)/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_cyc_other_cpi"
> +    },
> +    {
> +        "BriefDescription": "Cycles in which the NTC instruciton is held at dispatch for any reason",
> +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF",
> +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_HB_FULL/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_hb_full_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to dispatch hold on this thread due to Issue q full, BRQ full, XVCF Full, Count cache, Link, Tar full",
> +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_ISSQ/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_issq_cpi"
> +    },
> +    {
> +        "BriefDescription": "ICT_NOSLOT_DISP_HELD_OTHER_CPI",
> +        "MetricExpr": "(PM_ICT_NOSLOT_DISP_HELD - PM_ICT_NOSLOT_DISP_HELD_HB_FULL - PM_ICT_NOSLOT_DISP_HELD_SYNC - PM_ICT_NOSLOT_DISP_HELD_TBEGIN - PM_ICT_NOSLOT_DISP_HELD_ISSQ)/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_other_cpi"
> +    },
> +    {
> +        "BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch",
> +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_SYNC/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_sync_cpi"
> +    },
> +    {
> +        "BriefDescription": "the NTC instruction is being held at dispatch because it is a tbegin instruction and there is an older tbegin in the pipeline that must complete before the younger tbegin can dispatch",
> +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_TBEGIN/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_tbegin_cpi"
> +    },
> +    {
> +        "BriefDescription": "ICT_NOSLOT_IC_L2_CPI",
> +        "MetricExpr": "(PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_IC_L3 - PM_ICT_NOSLOT_IC_L3MISS)/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_ic_l2_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from the local L3",
> +        "MetricExpr": "PM_ICT_NOSLOT_IC_L3/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_ic_l3_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from beyond the local L3. The source could be local/remote/distant memory or another core's cache",
> +        "MetricExpr": "PM_ICT_NOSLOT_IC_L3MISS/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_ic_l3miss_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to Icache Miss",
> +        "MetricExpr": "PM_ICT_NOSLOT_IC_MISS/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_ic_miss_cpi"
> +    },
>      {
>          "MetricExpr": "(PM_NTC_ISSUE_HELD_DARQ_FULL + PM_NTC_ISSUE_HELD_ARB + PM_NTC_ISSUE_HELD_OTHER)/PM_RUN_INST_CMPL",
>          "MetricGroup": "cpi_breakdown",
> @@ -1819,71 +1897,6 @@
>          "MetricExpr": "PM_FXU_IDLE / PM_CYC",
>          "MetricName": "fxu_all_idle"
>      },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to branch mispred",
> -        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_br_mpred_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred",
> -        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED_ICMISS/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_br_mpred_icmiss_cpi"
> -    },
> -    {
> -        "BriefDescription": "ICT other stalls",
> -        "MetricExpr": "(PM_ICT_NOSLOT_CYC - PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_BR_MPRED_ICMISS - PM_ICT_NOSLOT_BR_MPRED - PM_ICT_NOSLOT_DISP_HELD)/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_cyc_other_cpi"
> -    },
> -    {
> -        "BriefDescription": "Cycles in which the NTC instruciton is held at dispatch for any reason",
> -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF",
> -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_HB_FULL/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_hb_full_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to dispatch hold on this thread due to Issue q full, BRQ full, XVCF Full, Count cache, Link, Tar full",
> -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_ISSQ/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_issq_cpi"
> -    },
> -    {
> -        "BriefDescription": "ICT_NOSLOT_DISP_HELD_OTHER_CPI",
> -        "MetricExpr": "(PM_ICT_NOSLOT_DISP_HELD - PM_ICT_NOSLOT_DISP_HELD_HB_FULL - PM_ICT_NOSLOT_DISP_HELD_SYNC - PM_ICT_NOSLOT_DISP_HELD_TBEGIN - PM_ICT_NOSLOT_DISP_HELD_ISSQ)/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_other_cpi"
> -    },
> -    {
> -        "BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch",
> -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_SYNC/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_sync_cpi"
> -    },
> -    {
> -        "BriefDescription": "the NTC instruction is being held at dispatch because it is a tbegin instruction and there is an older tbegin in the pipeline that must complete before the younger tbegin can dispatch",
> -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_TBEGIN/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_tbegin_cpi"
> -    },
> -    {
> -        "BriefDescription": "ICT_NOSLOT_IC_L2_CPI",
> -        "MetricExpr": "(PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_IC_L3 - PM_ICT_NOSLOT_IC_L3MISS)/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_ic_l2_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from the local L3",
> -        "MetricExpr": "PM_ICT_NOSLOT_IC_L3/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_ic_l3_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from beyond the local L3. The source could be local/remote/distant memory or another core's cache",
> -        "MetricExpr": "PM_ICT_NOSLOT_IC_L3MISS/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_ic_l3miss_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to Icache Miss",
> -        "MetricExpr": "PM_ICT_NOSLOT_IC_MISS/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_ic_miss_cpi"
> -    },
>      {
>          "BriefDescription": "Rate of IERAT reloads from L2",
>          "MetricExpr": "PM_IPTEG_FROM_L2 * 100 / PM_RUN_INST_CMPL",
> -- 
> 2.18.2
>
kajoljain May 8, 2020, 7:04 a.m. UTC | #2
On 5/7/20 9:58 PM, Paul A. Clarke wrote:
> From: "Paul A. Clarke" <pc@us.ibm.com>
> 
> Add the following metrics to the POWER9 'cpi_breakdown' metricgroup:
> - ict_noslot_br_mpred_cpi
> - ict_noslot_br_mpred_icmiss_cpi
> - ict_noslot_cyc_other_cpi
> - ict_noslot_disp_held_cpi
> - ict_noslot_disp_held_hb_full_cpi
> - ict_noslot_disp_held_issq_cpi
> - ict_noslot_disp_held_other_cpi
> - ict_noslot_disp_held_sync_cpi
> - ict_noslot_disp_held_tbegin_cpi
> - ict_noslot_ic_l2_cpi
> - ict_noslot_ic_l3_cpi
> - ict_noslot_ic_l3miss_cpi
> - ict_noslot_ic_miss_cpi
> 
> Signed-off-by: Paul A. Clarke <pc@us.ibm.com>

Reviewed-by: Kajol Jain <kjain@linux.ibm.com>

Thanks,
Kajol Jain
> ---
>  .../arch/powerpc/power9/metrics.json          | 143 ++++++++++--------
>  1 file changed, 78 insertions(+), 65 deletions(-)
> 
> diff --git a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> index 811c2a8c1c9e..6169351a72c8 100644
> --- a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> +++ b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> @@ -207,6 +207,84 @@
>          "MetricGroup": "cpi_breakdown",
>          "MetricName": "fxu_stall_cpi"
>      },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to branch mispred",
> +        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_br_mpred_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred",
> +        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED_ICMISS/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_br_mpred_icmiss_cpi"
> +    },
> +    {
> +        "BriefDescription": "ICT other stalls",
> +        "MetricExpr": "(PM_ICT_NOSLOT_CYC - PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_BR_MPRED_ICMISS - PM_ICT_NOSLOT_BR_MPRED - PM_ICT_NOSLOT_DISP_HELD)/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_cyc_other_cpi"
> +    },
> +    {
> +        "BriefDescription": "Cycles in which the NTC instruciton is held at dispatch for any reason",
> +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF",
> +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_HB_FULL/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_hb_full_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to dispatch hold on this thread due to Issue q full, BRQ full, XVCF Full, Count cache, Link, Tar full",
> +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_ISSQ/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_issq_cpi"
> +    },
> +    {
> +        "BriefDescription": "ICT_NOSLOT_DISP_HELD_OTHER_CPI",
> +        "MetricExpr": "(PM_ICT_NOSLOT_DISP_HELD - PM_ICT_NOSLOT_DISP_HELD_HB_FULL - PM_ICT_NOSLOT_DISP_HELD_SYNC - PM_ICT_NOSLOT_DISP_HELD_TBEGIN - PM_ICT_NOSLOT_DISP_HELD_ISSQ)/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_other_cpi"
> +    },
> +    {
> +        "BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch",
> +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_SYNC/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_sync_cpi"
> +    },
> +    {
> +        "BriefDescription": "the NTC instruction is being held at dispatch because it is a tbegin instruction and there is an older tbegin in the pipeline that must complete before the younger tbegin can dispatch",
> +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_TBEGIN/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_disp_held_tbegin_cpi"
> +    },
> +    {
> +        "BriefDescription": "ICT_NOSLOT_IC_L2_CPI",
> +        "MetricExpr": "(PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_IC_L3 - PM_ICT_NOSLOT_IC_L3MISS)/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_ic_l2_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from the local L3",
> +        "MetricExpr": "PM_ICT_NOSLOT_IC_L3/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_ic_l3_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from beyond the local L3. The source could be local/remote/distant memory or another core's cache",
> +        "MetricExpr": "PM_ICT_NOSLOT_IC_L3MISS/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_ic_l3miss_cpi"
> +    },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to Icache Miss",
> +        "MetricExpr": "PM_ICT_NOSLOT_IC_MISS/PM_RUN_INST_CMPL",
> +        "MetricGroup": "cpi_breakdown",
> +        "MetricName": "ict_noslot_ic_miss_cpi"
> +    },
>      {
>          "MetricExpr": "(PM_NTC_ISSUE_HELD_DARQ_FULL + PM_NTC_ISSUE_HELD_ARB + PM_NTC_ISSUE_HELD_OTHER)/PM_RUN_INST_CMPL",
>          "MetricGroup": "cpi_breakdown",
> @@ -1819,71 +1897,6 @@
>          "MetricExpr": "PM_FXU_IDLE / PM_CYC",
>          "MetricName": "fxu_all_idle"
>      },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to branch mispred",
> -        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_br_mpred_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred",
> -        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED_ICMISS/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_br_mpred_icmiss_cpi"
> -    },
> -    {
> -        "BriefDescription": "ICT other stalls",
> -        "MetricExpr": "(PM_ICT_NOSLOT_CYC - PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_BR_MPRED_ICMISS - PM_ICT_NOSLOT_BR_MPRED - PM_ICT_NOSLOT_DISP_HELD)/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_cyc_other_cpi"
> -    },
> -    {
> -        "BriefDescription": "Cycles in which the NTC instruciton is held at dispatch for any reason",
> -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF",
> -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_HB_FULL/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_hb_full_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to dispatch hold on this thread due to Issue q full, BRQ full, XVCF Full, Count cache, Link, Tar full",
> -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_ISSQ/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_issq_cpi"
> -    },
> -    {
> -        "BriefDescription": "ICT_NOSLOT_DISP_HELD_OTHER_CPI",
> -        "MetricExpr": "(PM_ICT_NOSLOT_DISP_HELD - PM_ICT_NOSLOT_DISP_HELD_HB_FULL - PM_ICT_NOSLOT_DISP_HELD_SYNC - PM_ICT_NOSLOT_DISP_HELD_TBEGIN - PM_ICT_NOSLOT_DISP_HELD_ISSQ)/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_other_cpi"
> -    },
> -    {
> -        "BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch",
> -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_SYNC/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_sync_cpi"
> -    },
> -    {
> -        "BriefDescription": "the NTC instruction is being held at dispatch because it is a tbegin instruction and there is an older tbegin in the pipeline that must complete before the younger tbegin can dispatch",
> -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_TBEGIN/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_disp_held_tbegin_cpi"
> -    },
> -    {
> -        "BriefDescription": "ICT_NOSLOT_IC_L2_CPI",
> -        "MetricExpr": "(PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_IC_L3 - PM_ICT_NOSLOT_IC_L3MISS)/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_ic_l2_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from the local L3",
> -        "MetricExpr": "PM_ICT_NOSLOT_IC_L3/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_ic_l3_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from beyond the local L3. The source could be local/remote/distant memory or another core's cache",
> -        "MetricExpr": "PM_ICT_NOSLOT_IC_L3MISS/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_ic_l3miss_cpi"
> -    },
> -    {
> -        "BriefDescription": "Ict empty for this thread due to Icache Miss",
> -        "MetricExpr": "PM_ICT_NOSLOT_IC_MISS/PM_RUN_INST_CMPL",
> -        "MetricName": "ict_noslot_ic_miss_cpi"
> -    },
>      {
>          "BriefDescription": "Rate of IERAT reloads from L2",
>          "MetricExpr": "PM_IPTEG_FROM_L2 * 100 / PM_RUN_INST_CMPL",
>
Ian Rogers May 10, 2020, 6:26 a.m. UTC | #3
On Fri, May 8, 2020 at 12:05 AM kajoljain <kjain@linux.ibm.com> wrote:
> On 5/7/20 9:58 PM, Paul A. Clarke wrote:
> > From: "Paul A. Clarke" <pc@us.ibm.com>
> >
> > Add the following metrics to the POWER9 'cpi_breakdown' metricgroup:
> > - ict_noslot_br_mpred_cpi
> > - ict_noslot_br_mpred_icmiss_cpi
> > - ict_noslot_cyc_other_cpi
> > - ict_noslot_disp_held_cpi
> > - ict_noslot_disp_held_hb_full_cpi
> > - ict_noslot_disp_held_issq_cpi
> > - ict_noslot_disp_held_other_cpi
> > - ict_noslot_disp_held_sync_cpi
> > - ict_noslot_disp_held_tbegin_cpi
> > - ict_noslot_ic_l2_cpi
> > - ict_noslot_ic_l3_cpi
> > - ict_noslot_ic_l3miss_cpi
> > - ict_noslot_ic_miss_cpi
> >
> > Signed-off-by: Paul A. Clarke <pc@us.ibm.com>
>
> Reviewed-by: Kajol Jain <kjain@linux.ibm.com>

Tested with:
https://lore.kernel.org/lkml/20200508053629.210324-3-irogers@google.com/
Tested-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> Thanks,
> Kajol Jain
> > ---
> >  .../arch/powerpc/power9/metrics.json          | 143 ++++++++++--------
> >  1 file changed, 78 insertions(+), 65 deletions(-)
> >
> > diff --git a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> > index 811c2a8c1c9e..6169351a72c8 100644
> > --- a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> > +++ b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> > @@ -207,6 +207,84 @@
> >          "MetricGroup": "cpi_breakdown",
> >          "MetricName": "fxu_stall_cpi"
> >      },
> > +    {
> > +        "BriefDescription": "Ict empty for this thread due to branch mispred",
> > +        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_br_mpred_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred",
> > +        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED_ICMISS/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_br_mpred_icmiss_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "ICT other stalls",
> > +        "MetricExpr": "(PM_ICT_NOSLOT_CYC - PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_BR_MPRED_ICMISS - PM_ICT_NOSLOT_BR_MPRED - PM_ICT_NOSLOT_DISP_HELD)/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_cyc_other_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "Cycles in which the NTC instruciton is held at dispatch for any reason",
> > +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_disp_held_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF",
> > +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_HB_FULL/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_disp_held_hb_full_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "Ict empty for this thread due to dispatch hold on this thread due to Issue q full, BRQ full, XVCF Full, Count cache, Link, Tar full",
> > +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_ISSQ/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_disp_held_issq_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "ICT_NOSLOT_DISP_HELD_OTHER_CPI",
> > +        "MetricExpr": "(PM_ICT_NOSLOT_DISP_HELD - PM_ICT_NOSLOT_DISP_HELD_HB_FULL - PM_ICT_NOSLOT_DISP_HELD_SYNC - PM_ICT_NOSLOT_DISP_HELD_TBEGIN - PM_ICT_NOSLOT_DISP_HELD_ISSQ)/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_disp_held_other_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch",
> > +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_SYNC/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_disp_held_sync_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "the NTC instruction is being held at dispatch because it is a tbegin instruction and there is an older tbegin in the pipeline that must complete before the younger tbegin can dispatch",
> > +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_TBEGIN/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_disp_held_tbegin_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "ICT_NOSLOT_IC_L2_CPI",
> > +        "MetricExpr": "(PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_IC_L3 - PM_ICT_NOSLOT_IC_L3MISS)/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_ic_l2_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from the local L3",
> > +        "MetricExpr": "PM_ICT_NOSLOT_IC_L3/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_ic_l3_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from beyond the local L3. The source could be local/remote/distant memory or another core's cache",
> > +        "MetricExpr": "PM_ICT_NOSLOT_IC_L3MISS/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_ic_l3miss_cpi"
> > +    },
> > +    {
> > +        "BriefDescription": "Ict empty for this thread due to Icache Miss",
> > +        "MetricExpr": "PM_ICT_NOSLOT_IC_MISS/PM_RUN_INST_CMPL",
> > +        "MetricGroup": "cpi_breakdown",
> > +        "MetricName": "ict_noslot_ic_miss_cpi"
> > +    },
> >      {
> >          "MetricExpr": "(PM_NTC_ISSUE_HELD_DARQ_FULL + PM_NTC_ISSUE_HELD_ARB + PM_NTC_ISSUE_HELD_OTHER)/PM_RUN_INST_CMPL",
> >          "MetricGroup": "cpi_breakdown",
> > @@ -1819,71 +1897,6 @@
> >          "MetricExpr": "PM_FXU_IDLE / PM_CYC",
> >          "MetricName": "fxu_all_idle"
> >      },
> > -    {
> > -        "BriefDescription": "Ict empty for this thread due to branch mispred",
> > -        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_br_mpred_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred",
> > -        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED_ICMISS/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_br_mpred_icmiss_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "ICT other stalls",
> > -        "MetricExpr": "(PM_ICT_NOSLOT_CYC - PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_BR_MPRED_ICMISS - PM_ICT_NOSLOT_BR_MPRED - PM_ICT_NOSLOT_DISP_HELD)/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_cyc_other_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "Cycles in which the NTC instruciton is held at dispatch for any reason",
> > -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_disp_held_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF",
> > -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_HB_FULL/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_disp_held_hb_full_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "Ict empty for this thread due to dispatch hold on this thread due to Issue q full, BRQ full, XVCF Full, Count cache, Link, Tar full",
> > -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_ISSQ/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_disp_held_issq_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "ICT_NOSLOT_DISP_HELD_OTHER_CPI",
> > -        "MetricExpr": "(PM_ICT_NOSLOT_DISP_HELD - PM_ICT_NOSLOT_DISP_HELD_HB_FULL - PM_ICT_NOSLOT_DISP_HELD_SYNC - PM_ICT_NOSLOT_DISP_HELD_TBEGIN - PM_ICT_NOSLOT_DISP_HELD_ISSQ)/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_disp_held_other_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch",
> > -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_SYNC/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_disp_held_sync_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "the NTC instruction is being held at dispatch because it is a tbegin instruction and there is an older tbegin in the pipeline that must complete before the younger tbegin can dispatch",
> > -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_TBEGIN/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_disp_held_tbegin_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "ICT_NOSLOT_IC_L2_CPI",
> > -        "MetricExpr": "(PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_IC_L3 - PM_ICT_NOSLOT_IC_L3MISS)/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_ic_l2_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from the local L3",
> > -        "MetricExpr": "PM_ICT_NOSLOT_IC_L3/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_ic_l3_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from beyond the local L3. The source could be local/remote/distant memory or another core's cache",
> > -        "MetricExpr": "PM_ICT_NOSLOT_IC_L3MISS/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_ic_l3miss_cpi"
> > -    },
> > -    {
> > -        "BriefDescription": "Ict empty for this thread due to Icache Miss",
> > -        "MetricExpr": "PM_ICT_NOSLOT_IC_MISS/PM_RUN_INST_CMPL",
> > -        "MetricName": "ict_noslot_ic_miss_cpi"
> > -    },
> >      {
> >          "BriefDescription": "Rate of IERAT reloads from L2",
> >          "MetricExpr": "PM_IPTEG_FROM_L2 * 100 / PM_RUN_INST_CMPL",
> >
Arnaldo May 11, 2020, 3:29 p.m. UTC | #4
Em Sat, May 09, 2020 at 11:26:56PM -0700, Ian Rogers escreveu:
> On Fri, May 8, 2020 at 12:05 AM kajoljain <kjain@linux.ibm.com> wrote:
> > On 5/7/20 9:58 PM, Paul A. Clarke wrote:
> > > From: "Paul A. Clarke" <pc@us.ibm.com>
> > >
> > > Add the following metrics to the POWER9 'cpi_breakdown' metricgroup:
> > > - ict_noslot_br_mpred_cpi
> > > - ict_noslot_br_mpred_icmiss_cpi
> > > - ict_noslot_cyc_other_cpi
> > > - ict_noslot_disp_held_cpi
> > > - ict_noslot_disp_held_hb_full_cpi
> > > - ict_noslot_disp_held_issq_cpi
> > > - ict_noslot_disp_held_other_cpi
> > > - ict_noslot_disp_held_sync_cpi
> > > - ict_noslot_disp_held_tbegin_cpi
> > > - ict_noslot_ic_l2_cpi
> > > - ict_noslot_ic_l3_cpi
> > > - ict_noslot_ic_l3miss_cpi
> > > - ict_noslot_ic_miss_cpi
> > >
> > > Signed-off-by: Paul A. Clarke <pc@us.ibm.com>
> >
> > Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
> 
> Tested with:
> https://lore.kernel.org/lkml/20200508053629.210324-3-irogers@google.com/
> Tested-by: Ian Rogers <irogers@google.com>

Thanks, looking up that series now,

- Arnaldo
 
> Thanks,
> Ian
> 
> > Thanks,
> > Kajol Jain
> > > ---
> > >  .../arch/powerpc/power9/metrics.json          | 143 ++++++++++--------
> > >  1 file changed, 78 insertions(+), 65 deletions(-)
> > >
> > > diff --git a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> > > index 811c2a8c1c9e..6169351a72c8 100644
> > > --- a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> > > +++ b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> > > @@ -207,6 +207,84 @@
> > >          "MetricGroup": "cpi_breakdown",
> > >          "MetricName": "fxu_stall_cpi"
> > >      },
> > > +    {
> > > +        "BriefDescription": "Ict empty for this thread due to branch mispred",
> > > +        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_br_mpred_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred",
> > > +        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED_ICMISS/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_br_mpred_icmiss_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "ICT other stalls",
> > > +        "MetricExpr": "(PM_ICT_NOSLOT_CYC - PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_BR_MPRED_ICMISS - PM_ICT_NOSLOT_BR_MPRED - PM_ICT_NOSLOT_DISP_HELD)/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_cyc_other_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "Cycles in which the NTC instruciton is held at dispatch for any reason",
> > > +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_disp_held_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF",
> > > +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_HB_FULL/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_disp_held_hb_full_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "Ict empty for this thread due to dispatch hold on this thread due to Issue q full, BRQ full, XVCF Full, Count cache, Link, Tar full",
> > > +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_ISSQ/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_disp_held_issq_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "ICT_NOSLOT_DISP_HELD_OTHER_CPI",
> > > +        "MetricExpr": "(PM_ICT_NOSLOT_DISP_HELD - PM_ICT_NOSLOT_DISP_HELD_HB_FULL - PM_ICT_NOSLOT_DISP_HELD_SYNC - PM_ICT_NOSLOT_DISP_HELD_TBEGIN - PM_ICT_NOSLOT_DISP_HELD_ISSQ)/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_disp_held_other_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch",
> > > +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_SYNC/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_disp_held_sync_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "the NTC instruction is being held at dispatch because it is a tbegin instruction and there is an older tbegin in the pipeline that must complete before the younger tbegin can dispatch",
> > > +        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_TBEGIN/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_disp_held_tbegin_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "ICT_NOSLOT_IC_L2_CPI",
> > > +        "MetricExpr": "(PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_IC_L3 - PM_ICT_NOSLOT_IC_L3MISS)/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_ic_l2_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from the local L3",
> > > +        "MetricExpr": "PM_ICT_NOSLOT_IC_L3/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_ic_l3_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from beyond the local L3. The source could be local/remote/distant memory or another core's cache",
> > > +        "MetricExpr": "PM_ICT_NOSLOT_IC_L3MISS/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_ic_l3miss_cpi"
> > > +    },
> > > +    {
> > > +        "BriefDescription": "Ict empty for this thread due to Icache Miss",
> > > +        "MetricExpr": "PM_ICT_NOSLOT_IC_MISS/PM_RUN_INST_CMPL",
> > > +        "MetricGroup": "cpi_breakdown",
> > > +        "MetricName": "ict_noslot_ic_miss_cpi"
> > > +    },
> > >      {
> > >          "MetricExpr": "(PM_NTC_ISSUE_HELD_DARQ_FULL + PM_NTC_ISSUE_HELD_ARB + PM_NTC_ISSUE_HELD_OTHER)/PM_RUN_INST_CMPL",
> > >          "MetricGroup": "cpi_breakdown",
> > > @@ -1819,71 +1897,6 @@
> > >          "MetricExpr": "PM_FXU_IDLE / PM_CYC",
> > >          "MetricName": "fxu_all_idle"
> > >      },
> > > -    {
> > > -        "BriefDescription": "Ict empty for this thread due to branch mispred",
> > > -        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_br_mpred_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred",
> > > -        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED_ICMISS/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_br_mpred_icmiss_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "ICT other stalls",
> > > -        "MetricExpr": "(PM_ICT_NOSLOT_CYC - PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_BR_MPRED_ICMISS - PM_ICT_NOSLOT_BR_MPRED - PM_ICT_NOSLOT_DISP_HELD)/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_cyc_other_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "Cycles in which the NTC instruciton is held at dispatch for any reason",
> > > -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_disp_held_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF",
> > > -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_HB_FULL/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_disp_held_hb_full_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "Ict empty for this thread due to dispatch hold on this thread due to Issue q full, BRQ full, XVCF Full, Count cache, Link, Tar full",
> > > -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_ISSQ/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_disp_held_issq_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "ICT_NOSLOT_DISP_HELD_OTHER_CPI",
> > > -        "MetricExpr": "(PM_ICT_NOSLOT_DISP_HELD - PM_ICT_NOSLOT_DISP_HELD_HB_FULL - PM_ICT_NOSLOT_DISP_HELD_SYNC - PM_ICT_NOSLOT_DISP_HELD_TBEGIN - PM_ICT_NOSLOT_DISP_HELD_ISSQ)/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_disp_held_other_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch",
> > > -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_SYNC/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_disp_held_sync_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "the NTC instruction is being held at dispatch because it is a tbegin instruction and there is an older tbegin in the pipeline that must complete before the younger tbegin can dispatch",
> > > -        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_TBEGIN/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_disp_held_tbegin_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "ICT_NOSLOT_IC_L2_CPI",
> > > -        "MetricExpr": "(PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_IC_L3 - PM_ICT_NOSLOT_IC_L3MISS)/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_ic_l2_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from the local L3",
> > > -        "MetricExpr": "PM_ICT_NOSLOT_IC_L3/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_ic_l3_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from beyond the local L3. The source could be local/remote/distant memory or another core's cache",
> > > -        "MetricExpr": "PM_ICT_NOSLOT_IC_L3MISS/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_ic_l3miss_cpi"
> > > -    },
> > > -    {
> > > -        "BriefDescription": "Ict empty for this thread due to Icache Miss",
> > > -        "MetricExpr": "PM_ICT_NOSLOT_IC_MISS/PM_RUN_INST_CMPL",
> > > -        "MetricName": "ict_noslot_ic_miss_cpi"
> > > -    },
> > >      {
> > >          "BriefDescription": "Rate of IERAT reloads from L2",
> > >          "MetricExpr": "PM_IPTEG_FROM_L2 * 100 / PM_RUN_INST_CMPL",
> > >
Michael Ellerman May 13, 2020, 8:28 a.m. UTC | #5
"Paul A. Clarke" <pc@us.ibm.com> writes:
> From: "Paul A. Clarke" <pc@us.ibm.com>
>
> Add the following metrics to the POWER9 'cpi_breakdown' metricgroup:
> - ict_noslot_br_mpred_cpi
> - ict_noslot_br_mpred_icmiss_cpi
> - ict_noslot_cyc_other_cpi
> - ict_noslot_disp_held_cpi
> - ict_noslot_disp_held_hb_full_cpi
> - ict_noslot_disp_held_issq_cpi
> - ict_noslot_disp_held_other_cpi
> - ict_noslot_disp_held_sync_cpi
> - ict_noslot_disp_held_tbegin_cpi
> - ict_noslot_ic_l2_cpi
> - ict_noslot_ic_l3_cpi
> - ict_noslot_ic_l3miss_cpi
> - ict_noslot_ic_miss_cpi
>
> Signed-off-by: Paul A. Clarke <pc@us.ibm.com>
> ---
>  .../arch/powerpc/power9/metrics.json          | 143 ++++++++++--------
>  1 file changed, 78 insertions(+), 65 deletions(-)
>
> diff --git a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> index 811c2a8c1c9e..6169351a72c8 100644
> --- a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> +++ b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> @@ -207,6 +207,84 @@
>          "MetricGroup": "cpi_breakdown",
>          "MetricName": "fxu_stall_cpi"
>      },
> +    {
> +        "BriefDescription": "Ict empty for this thread due to branch mispred",

I think you're just moving this, not adding it. But ICT is an acronym,
so it should be spelled ICT not Ict.

It might be worth expanding it too?

cheers
Paul A. Clarke May 14, 2020, 9:04 p.m. UTC | #6
On Wed, May 13, 2020 at 06:28:31PM +1000, Michael Ellerman wrote:
> "Paul A. Clarke" <pc@us.ibm.com> writes:
> > Add the following metrics to the POWER9 'cpi_breakdown' metricgroup:
> > - ict_noslot_br_mpred_cpi
> > - ict_noslot_br_mpred_icmiss_cpi
> > - ict_noslot_cyc_other_cpi
> > - ict_noslot_disp_held_cpi
> > - ict_noslot_disp_held_hb_full_cpi
> > - ict_noslot_disp_held_issq_cpi
> > - ict_noslot_disp_held_other_cpi
> > - ict_noslot_disp_held_sync_cpi
> > - ict_noslot_disp_held_tbegin_cpi
> > - ict_noslot_ic_l2_cpi
> > - ict_noslot_ic_l3_cpi
> > - ict_noslot_ic_l3miss_cpi
> > - ict_noslot_ic_miss_cpi
> >
> > Signed-off-by: Paul A. Clarke <pc@us.ibm.com>
> > ---
> >  .../arch/powerpc/power9/metrics.json          | 143 ++++++++++--------
> >  1 file changed, 78 insertions(+), 65 deletions(-)
> >
> > diff --git a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> > index 811c2a8c1c9e..6169351a72c8 100644
> > --- a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> > +++ b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
> > @@ -207,6 +207,84 @@
> >          "MetricGroup": "cpi_breakdown",
> >          "MetricName": "fxu_stall_cpi"
> >      },
> > +    {
> > +        "BriefDescription": "Ict empty for this thread due to branch mispred",
> 
> I think you're just moving this, not adding it. But ICT is an acronym,
> so it should be spelled ICT not Ict.
> 
> It might be worth expanding it too?

This was 98% produced through automated means, translating an existing
XML file to perf's JSON format.

I've gotten the upstream XML file changed to include the "ICT" metrics
in the "cpi_breakdown" group already, and can request the changes you
suggest also be incorporated.

For the time being, can we move forward with the patch as-is?

PC
Michael Ellerman May 16, 2020, 12:03 p.m. UTC | #7
"Paul A. Clarke" <pc@us.ibm.com> writes:
> On Wed, May 13, 2020 at 06:28:31PM +1000, Michael Ellerman wrote:
>> "Paul A. Clarke" <pc@us.ibm.com> writes:
>> > Add the following metrics to the POWER9 'cpi_breakdown' metricgroup:
>> > - ict_noslot_br_mpred_cpi
>> > - ict_noslot_br_mpred_icmiss_cpi
>> > - ict_noslot_cyc_other_cpi
>> > - ict_noslot_disp_held_cpi
>> > - ict_noslot_disp_held_hb_full_cpi
>> > - ict_noslot_disp_held_issq_cpi
>> > - ict_noslot_disp_held_other_cpi
>> > - ict_noslot_disp_held_sync_cpi
>> > - ict_noslot_disp_held_tbegin_cpi
>> > - ict_noslot_ic_l2_cpi
>> > - ict_noslot_ic_l3_cpi
>> > - ict_noslot_ic_l3miss_cpi
>> > - ict_noslot_ic_miss_cpi
>> >
>> > Signed-off-by: Paul A. Clarke <pc@us.ibm.com>
>> > ---
>> >  .../arch/powerpc/power9/metrics.json          | 143 ++++++++++--------
>> >  1 file changed, 78 insertions(+), 65 deletions(-)
>> >
>> > diff --git a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
>> > index 811c2a8c1c9e..6169351a72c8 100644
>> > --- a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
>> > +++ b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
>> > @@ -207,6 +207,84 @@
>> >          "MetricGroup": "cpi_breakdown",
>> >          "MetricName": "fxu_stall_cpi"
>> >      },
>> > +    {
>> > +        "BriefDescription": "Ict empty for this thread due to branch mispred",
>> 
>> I think you're just moving this, not adding it. But ICT is an acronym,
>> so it should be spelled ICT not Ict.
>> 
>> It might be worth expanding it too?
>
> This was 98% produced through automated means, translating an existing
> XML file to perf's JSON format.
>
> I've gotten the upstream XML file changed to include the "ICT" metrics
> in the "cpi_breakdown" group already, and can request the changes you
> suggest also be incorporated.
>
> For the time being, can we move forward with the patch as-is?

Fine by me.

cheers

Patch
diff mbox series

diff --git a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
index 811c2a8c1c9e..6169351a72c8 100644
--- a/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
+++ b/tools/perf/pmu-events/arch/powerpc/power9/metrics.json
@@ -207,6 +207,84 @@ 
         "MetricGroup": "cpi_breakdown",
         "MetricName": "fxu_stall_cpi"
     },
+    {
+        "BriefDescription": "Ict empty for this thread due to branch mispred",
+        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_br_mpred_cpi"
+    },
+    {
+        "BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred",
+        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED_ICMISS/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_br_mpred_icmiss_cpi"
+    },
+    {
+        "BriefDescription": "ICT other stalls",
+        "MetricExpr": "(PM_ICT_NOSLOT_CYC - PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_BR_MPRED_ICMISS - PM_ICT_NOSLOT_BR_MPRED - PM_ICT_NOSLOT_DISP_HELD)/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_cyc_other_cpi"
+    },
+    {
+        "BriefDescription": "Cycles in which the NTC instruciton is held at dispatch for any reason",
+        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_disp_held_cpi"
+    },
+    {
+        "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF",
+        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_HB_FULL/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_disp_held_hb_full_cpi"
+    },
+    {
+        "BriefDescription": "Ict empty for this thread due to dispatch hold on this thread due to Issue q full, BRQ full, XVCF Full, Count cache, Link, Tar full",
+        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_ISSQ/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_disp_held_issq_cpi"
+    },
+    {
+        "BriefDescription": "ICT_NOSLOT_DISP_HELD_OTHER_CPI",
+        "MetricExpr": "(PM_ICT_NOSLOT_DISP_HELD - PM_ICT_NOSLOT_DISP_HELD_HB_FULL - PM_ICT_NOSLOT_DISP_HELD_SYNC - PM_ICT_NOSLOT_DISP_HELD_TBEGIN - PM_ICT_NOSLOT_DISP_HELD_ISSQ)/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_disp_held_other_cpi"
+    },
+    {
+        "BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch",
+        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_SYNC/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_disp_held_sync_cpi"
+    },
+    {
+        "BriefDescription": "the NTC instruction is being held at dispatch because it is a tbegin instruction and there is an older tbegin in the pipeline that must complete before the younger tbegin can dispatch",
+        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_TBEGIN/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_disp_held_tbegin_cpi"
+    },
+    {
+        "BriefDescription": "ICT_NOSLOT_IC_L2_CPI",
+        "MetricExpr": "(PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_IC_L3 - PM_ICT_NOSLOT_IC_L3MISS)/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_ic_l2_cpi"
+    },
+    {
+        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from the local L3",
+        "MetricExpr": "PM_ICT_NOSLOT_IC_L3/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_ic_l3_cpi"
+    },
+    {
+        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from beyond the local L3. The source could be local/remote/distant memory or another core's cache",
+        "MetricExpr": "PM_ICT_NOSLOT_IC_L3MISS/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_ic_l3miss_cpi"
+    },
+    {
+        "BriefDescription": "Ict empty for this thread due to Icache Miss",
+        "MetricExpr": "PM_ICT_NOSLOT_IC_MISS/PM_RUN_INST_CMPL",
+        "MetricGroup": "cpi_breakdown",
+        "MetricName": "ict_noslot_ic_miss_cpi"
+    },
     {
         "MetricExpr": "(PM_NTC_ISSUE_HELD_DARQ_FULL + PM_NTC_ISSUE_HELD_ARB + PM_NTC_ISSUE_HELD_OTHER)/PM_RUN_INST_CMPL",
         "MetricGroup": "cpi_breakdown",
@@ -1819,71 +1897,6 @@ 
         "MetricExpr": "PM_FXU_IDLE / PM_CYC",
         "MetricName": "fxu_all_idle"
     },
-    {
-        "BriefDescription": "Ict empty for this thread due to branch mispred",
-        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_br_mpred_cpi"
-    },
-    {
-        "BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred",
-        "MetricExpr": "PM_ICT_NOSLOT_BR_MPRED_ICMISS/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_br_mpred_icmiss_cpi"
-    },
-    {
-        "BriefDescription": "ICT other stalls",
-        "MetricExpr": "(PM_ICT_NOSLOT_CYC - PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_BR_MPRED_ICMISS - PM_ICT_NOSLOT_BR_MPRED - PM_ICT_NOSLOT_DISP_HELD)/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_cyc_other_cpi"
-    },
-    {
-        "BriefDescription": "Cycles in which the NTC instruciton is held at dispatch for any reason",
-        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_disp_held_cpi"
-    },
-    {
-        "BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF",
-        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_HB_FULL/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_disp_held_hb_full_cpi"
-    },
-    {
-        "BriefDescription": "Ict empty for this thread due to dispatch hold on this thread due to Issue q full, BRQ full, XVCF Full, Count cache, Link, Tar full",
-        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_ISSQ/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_disp_held_issq_cpi"
-    },
-    {
-        "BriefDescription": "ICT_NOSLOT_DISP_HELD_OTHER_CPI",
-        "MetricExpr": "(PM_ICT_NOSLOT_DISP_HELD - PM_ICT_NOSLOT_DISP_HELD_HB_FULL - PM_ICT_NOSLOT_DISP_HELD_SYNC - PM_ICT_NOSLOT_DISP_HELD_TBEGIN - PM_ICT_NOSLOT_DISP_HELD_ISSQ)/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_disp_held_other_cpi"
-    },
-    {
-        "BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch",
-        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_SYNC/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_disp_held_sync_cpi"
-    },
-    {
-        "BriefDescription": "the NTC instruction is being held at dispatch because it is a tbegin instruction and there is an older tbegin in the pipeline that must complete before the younger tbegin can dispatch",
-        "MetricExpr": "PM_ICT_NOSLOT_DISP_HELD_TBEGIN/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_disp_held_tbegin_cpi"
-    },
-    {
-        "BriefDescription": "ICT_NOSLOT_IC_L2_CPI",
-        "MetricExpr": "(PM_ICT_NOSLOT_IC_MISS - PM_ICT_NOSLOT_IC_L3 - PM_ICT_NOSLOT_IC_L3MISS)/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_ic_l2_cpi"
-    },
-    {
-        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from the local L3",
-        "MetricExpr": "PM_ICT_NOSLOT_IC_L3/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_ic_l3_cpi"
-    },
-    {
-        "BriefDescription": "Ict empty for this thread due to icache misses that were sourced from beyond the local L3. The source could be local/remote/distant memory or another core's cache",
-        "MetricExpr": "PM_ICT_NOSLOT_IC_L3MISS/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_ic_l3miss_cpi"
-    },
-    {
-        "BriefDescription": "Ict empty for this thread due to Icache Miss",
-        "MetricExpr": "PM_ICT_NOSLOT_IC_MISS/PM_RUN_INST_CMPL",
-        "MetricName": "ict_noslot_ic_miss_cpi"
-    },
     {
         "BriefDescription": "Rate of IERAT reloads from L2",
         "MetricExpr": "PM_IPTEG_FROM_L2 * 100 / PM_RUN_INST_CMPL",