Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1404798ybj; Fri, 8 May 2020 00:07:05 -0700 (PDT) X-Google-Smtp-Source: APiQypL35nVvMCnu+GJuerf5VuWctXXE4I9NhrlXnZeYMAVJ8vS53T4nsS3DEsog7vL0wXcjY4vS X-Received: by 2002:aa7:db0b:: with SMTP id t11mr910668eds.304.1588921625027; Fri, 08 May 2020 00:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588921625; cv=none; d=google.com; s=arc-20160816; b=E4EEshVFOZ5R+GbPg2YRv0yeeFu5D/HTr3bQy5InWNtbH3yQtvZOAO7d+/GbL6Jh/2 q7J/Q+oHo+CSUHjPPNXGSebfu3CwnjlyX+ahtgffyK8FAOWA12H+uoZADxiPpSs/BFfU EVmRyprCDMsbLypVyePwo4w27wrXphya6oh5PKjSblSQH2+NXbuEmW7Tna9riHYZyJ+p 4veVgJW1vKn0SVC4ys8zlBaLil0KCvZ9ivy6LgPcDyCx+MCWlohesAz2fQL4GUO/4LdC R9n6ZPfbYWUxZBnLf0wwAxldw2ysEcv1i0yjbDAsQ+luwx9hJk+MkeTxRD1231vEU6Yj SyZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=FkJ1rI+lNdsPOuT09WhgISsW03vIcZSO0yXfIQXYnGo=; b=E1/MD2O2qILKJm9meCupvH7ALkb+8f/2xEsDGHBuUcS8E236Wit10Sqi6q3aQeQFhm vFyBAhYosndW3EiaFyyd1umbQc/Ss76NaUizL7qI+bTzi24OmWiH79cihTWsqdfloGXv 4ljPKU74Hus0QudJ4jS0ZVDWMhW8qQGBR09Dfj/1U4Qlz4KxfdfPJAdqRldA7gGBL3EB Tkrm/cLWUb6XzqgIvzwI2aIM97IRNwjvQFAKLqkRXzKXgKdXgGqnQVqi/Etq9Tv2J9N7 4MkGzqprTxijf6lUvBDKTa+zNW/FksnrWi++mHR+6nAa5egcYqj9bhfI99N/umslj1z3 k5dQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g24si506821edu.104.2020.05.08.00.06.39; Fri, 08 May 2020 00:07:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbgEHHFN (ORCPT + 99 others); Fri, 8 May 2020 03:05:13 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:9822 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725991AbgEHHFN (ORCPT ); Fri, 8 May 2020 03:05:13 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 04874EDd134993; Fri, 8 May 2020 03:05:07 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 30vtw5b3bc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 May 2020 03:05:07 -0400 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 048756X8140299; Fri, 8 May 2020 03:05:06 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 30vtw5b3au-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 May 2020 03:05:06 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 0486soIa025561; Fri, 8 May 2020 07:05:05 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma04dal.us.ibm.com with ESMTP id 30s0g7m2tp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 May 2020 07:05:05 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 048754ov10224004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 8 May 2020 07:05:04 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7A770BE054; Fri, 8 May 2020 07:05:04 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 09EA9BE051; Fri, 8 May 2020 07:04:57 +0000 (GMT) Received: from localhost.localdomain (unknown [9.199.35.106]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 8 May 2020 07:04:57 +0000 (GMT) Subject: Re: [PATCH 2/2] perf: Add missing metrics to POWER9 'cpi_breakdown' To: "Paul A. Clarke" , linux-perf-users@vger.kernel.org Cc: linux-kernel@vger.kernel.org, acme@kernel.org, ananth@linux.vnet.ibm.com, maddy@linux.vnet.ibm.com, naveen.n.rao@linux.vnet.ibm.com, sukadev@linux.ibm.com, mpe@ellerman.id.au, irogers@google.com References: <1588868938-21933-1-git-send-email-pc@us.ibm.com> <1588868938-21933-3-git-send-email-pc@us.ibm.com> From: kajoljain Message-ID: <0b276c65-9c54-c6eb-0381-f56c4ccf5ec2@linux.ibm.com> Date: Fri, 8 May 2020 12:34:40 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1588868938-21933-3-git-send-email-pc@us.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.676 definitions=2020-05-08_08:2020-05-07,2020-05-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 mlxlogscore=999 priorityscore=1501 suspectscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 bulkscore=0 spamscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2005080056 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/7/20 9:58 PM, Paul A. Clarke wrote: > From: "Paul A. Clarke" > > 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 Reviewed-by: Kajol Jain 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", >