Re: [PATCH v2] perf vendor events power10: Add metric events json file for power10 platform

2021-10-28 Thread kajoljain



On 10/26/21 3:28 PM, kajoljain wrote:
> 
> 
> On 10/22/21 8:19 PM, Paul A. Clarke wrote:
>> Thanks for the changes!
>> More nits below (many left over from prior review)...
>>
>> On Fri, Oct 22, 2021 at 11:55:05AM +0530, Kajol Jain wrote:
>>> Add pmu metric json file for power10 platform.
>>>
>>> Signed-off-by: Kajol Jain 
>>> ---
>>> Changelog v1 -> v2:
>>> - Did some nit changes in BriefDescription field
>>>   as suggested by Paul A. Clarke
>>>
>>> - Link to the v1 patch: https://lkml.org/lkml/2021/10/6/131
>>>
>>>  .../arch/powerpc/power10/metrics.json | 676 ++
>>>  1 file changed, 676 insertions(+)
>>>  create mode 100644 tools/perf/pmu-events/arch/powerpc/power10/metrics.json
>>>
>>> diff --git a/tools/perf/pmu-events/arch/powerpc/power10/metrics.json 
>>> b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
>>> new file mode 100644
>>> index ..8adab5cd9934
>>> --- /dev/null
>>> +++ b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
>>> @@ -0,0 +1,676 @@
>>> +[
>>> +{
>>> +"BriefDescription": "Percentage of cycles that are run cycles",
>>> +"MetricExpr": "PM_RUN_CYC / PM_CYC * 100",
>>> +"MetricGroup": "General",
>>> +"MetricName": "RUN_CYCLES_RATE",
>>> +"ScaleUnit": "1%"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per completed instruction",
>>> +"MetricExpr": "PM_CYC / PM_INST_CMPL",
>>> +"MetricGroup": "CPI",
>>> +"MetricName": "CYCLES_PER_INSTRUCTION"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per instruction when dispatch 
>>> was stalled for any reason",
>>> +"MetricExpr": "PM_DISP_STALL_CYC / PM_RUN_INST_CMPL",
>>> +"MetricGroup": "CPI",
>>> +"MetricName": "DISPATCHED_CPI"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per instruction when dispatch 
>>> was stalled because there was a flush",
>>> +"MetricExpr": "PM_DISP_STALL_FLUSH / PM_RUN_INST_CMPL",
>>> +"MetricGroup": "CPI",
>>> +"MetricName": "DISPATCHED_FLUSH_CPI"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per instruction when dispatch 
>>> was stalled because the MMU was handling a translation miss",
>>> +"MetricExpr": "PM_DISP_STALL_TRANSLATION / PM_RUN_INST_CMPL",
>>> +"MetricGroup": "CPI",
>>> +"MetricName": "DISPATCHED_TRANSLATION_CPI"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per instruction when dispatch 
>>> was stalled waiting to resolve an instruction ERAT miss",
>>> +"MetricExpr": "PM_DISP_STALL_IERAT_ONLY_MISS / PM_RUN_INST_CMPL",
>>> +"MetricGroup": "CPI",
>>> +"MetricName": "DISPATCHED_IERAT_ONLY_MISS_CPI"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per instruction when dispatch 
>>> was stalled waiting to resolve an instruction TLB miss",
>>> +"MetricExpr": "PM_DISP_STALL_ITLB_MISS / PM_RUN_INST_CMPL",
>>> +"MetricGroup": "CPI",
>>> +"MetricName": "DISPATCHED_ITLB_MISS_CPI"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per instruction when dispatch 
>>> was stalled due to an icache miss",
>>> +"MetricExpr": "PM_DISP_STALL_IC_MISS / PM_RUN_INST_CMPL",
>>> +"MetricGroup": "CPI",
>>> +"MetricName": "DISPATCHED_IC_MISS_CPI"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per instruction when dispatch 
>>> was stalled while the instruction was fetched from the local L2",
>>> +"MetricExpr": "PM_DISP_STALL_IC_L2 / PM_RUN_INST_CMPL",
>>> +"MetricGroup": "CPI",
>>> +"MetricName": "DISPATCHED_IC_L2_CPI"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per instruction when dispatch 
>>> was stalled while the instruction was fetched from the local L3",
>>> +"MetricExpr": "PM_DISP_STALL_IC_L3 / PM_RUN_INST_CMPL",
>>> +"MetricGroup": "CPI",
>>> +"MetricName": "DISPATCHED_IC_L3_CPI"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per instruction when dispatch 
>>> was stalled while the instruction was fetched from any source beyond the 
>>> local L3",
>>> +"MetricExpr": "PM_DISP_STALL_IC_L3MISS / PM_RUN_INST_CMPL",
>>> +"MetricGroup": "CPI",
>>> +"MetricName": "DISPATCHED_IC_L3MISS_CPI"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per instruction when dispatch 
>>> was stalled due to an icache miss after a branch mispredict",
>>> +"MetricExpr": "PM_DISP_STALL_BR_MPRED_ICMISS / PM_RUN_INST_CMPL",
>>> +"MetricGroup": "CPI",
>>> +"MetricName": "DISPATCHED_BR_MPRED_ICMISS_CPI"
>>> +},
>>> +{
>>> +"BriefDescription": "Average cycles per instruction when dispatch 
>>> was stalled while instruction was fetched from the local L2 after suffering 
>>> a branch mispredict",
>>> +

Re: [PATCH v2] perf vendor events power10: Add metric events json file for power10 platform

2021-10-26 Thread kajoljain



On 10/25/21 5:36 PM, Paul A. Clarke wrote:
> On Mon, Oct 25, 2021 at 02:23:15PM +1100, Michael Ellerman wrote:
>> "Paul A. Clarke"  writes:
>>> Thanks for the changes!
>>> More nits below (many left over from prior review)...
>>>
>>> On Fri, Oct 22, 2021 at 11:55:05AM +0530, Kajol Jain wrote:
 Add pmu metric json file for power10 platform.

 Signed-off-by: Kajol Jain 
 ---
 Changelog v1 -> v2:
 - Did some nit changes in BriefDescription field
   as suggested by Paul A. Clarke

 - Link to the v1 patch: https://lkml.org/lkml/2021/10/6/131

  .../arch/powerpc/power10/metrics.json | 676 ++
  1 file changed, 676 insertions(+)
  create mode 100644 tools/perf/pmu-events/arch/powerpc/power10/metrics.json

 diff --git a/tools/perf/pmu-events/arch/powerpc/power10/metrics.json 
 b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
 new file mode 100644
 index ..8adab5cd9934
 --- /dev/null
 +++ b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
 @@ -0,0 +1,676 @@
 +[
 +{
 +"BriefDescription": "Percentage of cycles that are run cycles",
 +"MetricExpr": "PM_RUN_CYC / PM_CYC * 100",
 +"MetricGroup": "General",
 +"MetricName": "RUN_CYCLES_RATE",
 +"ScaleUnit": "1%"
 +},
 +{
 +"BriefDescription": "Average cycles per completed instruction",
 +"MetricExpr": "PM_CYC / PM_INST_CMPL",
 +"MetricGroup": "CPI",
 +"MetricName": "CYCLES_PER_INSTRUCTION"
 +},
 +{
 +"BriefDescription": "Average cycles per instruction when dispatch 
 was stalled for any reason",
 +"MetricExpr": "PM_DISP_STALL_CYC / PM_RUN_INST_CMPL",
 +"MetricGroup": "CPI",
 +"MetricName": "DISPATCHED_CPI"
 +},
 +{
 +"BriefDescription": "Average cycles per instruction when dispatch 
 was stalled because there was a flush",
 +"MetricExpr": "PM_DISP_STALL_FLUSH / PM_RUN_INST_CMPL",
 +"MetricGroup": "CPI",
 +"MetricName": "DISPATCHED_FLUSH_CPI"
 +},
 +{
 +"BriefDescription": "Average cycles per instruction when dispatch 
 was stalled because the MMU was handling a translation miss",
 +"MetricExpr": "PM_DISP_STALL_TRANSLATION / PM_RUN_INST_CMPL",
 +"MetricGroup": "CPI",
 +"MetricName": "DISPATCHED_TRANSLATION_CPI"
 +},
 +{
 +"BriefDescription": "Average cycles per instruction when dispatch 
 was stalled waiting to resolve an instruction ERAT miss",
 +"MetricExpr": "PM_DISP_STALL_IERAT_ONLY_MISS / PM_RUN_INST_CMPL",
 +"MetricGroup": "CPI",
 +"MetricName": "DISPATCHED_IERAT_ONLY_MISS_CPI"
 +},
 +{
 +"BriefDescription": "Average cycles per instruction when dispatch 
 was stalled waiting to resolve an instruction TLB miss",
 +"MetricExpr": "PM_DISP_STALL_ITLB_MISS / PM_RUN_INST_CMPL",
 +"MetricGroup": "CPI",
 +"MetricName": "DISPATCHED_ITLB_MISS_CPI"
 +},
 +{
 +"BriefDescription": "Average cycles per instruction when dispatch 
 was stalled due to an icache miss",
 +"MetricExpr": "PM_DISP_STALL_IC_MISS / PM_RUN_INST_CMPL",
 +"MetricGroup": "CPI",
 +"MetricName": "DISPATCHED_IC_MISS_CPI"
 +},
 +{
 +"BriefDescription": "Average cycles per instruction when dispatch 
 was stalled while the instruction was fetched from the local L2",
 +"MetricExpr": "PM_DISP_STALL_IC_L2 / PM_RUN_INST_CMPL",
 +"MetricGroup": "CPI",
 +"MetricName": "DISPATCHED_IC_L2_CPI"
 +},
 +{
 +"BriefDescription": "Average cycles per instruction when dispatch 
 was stalled while the instruction was fetched from the local L3",
 +"MetricExpr": "PM_DISP_STALL_IC_L3 / PM_RUN_INST_CMPL",
 +"MetricGroup": "CPI",
 +"MetricName": "DISPATCHED_IC_L3_CPI"
 +},
 +{
 +"BriefDescription": "Average cycles per instruction when dispatch 
 was stalled while the instruction was fetched from any source beyond the 
 local L3",
 +"MetricExpr": "PM_DISP_STALL_IC_L3MISS / PM_RUN_INST_CMPL",
 +"MetricGroup": "CPI",
 +"MetricName": "DISPATCHED_IC_L3MISS_CPI"
 +},
 +{
 +"BriefDescription": "Average cycles per instruction when dispatch 
 was stalled due to an icache miss after a branch mispredict",
 +"MetricExpr": "PM_DISP_STALL_BR_MPRED_ICMISS / PM_RUN_INST_CMPL",
 +"MetricGroup": "CPI",
 +"MetricName": "DISPATCHED_BR_MPRED_ICMISS_CPI"
 +},
 +{
 +"BriefDescription": "Average 

Re: [PATCH v2] perf vendor events power10: Add metric events json file for power10 platform

2021-10-26 Thread kajoljain



On 10/22/21 8:19 PM, Paul A. Clarke wrote:
> Thanks for the changes!
> More nits below (many left over from prior review)...
> 
> On Fri, Oct 22, 2021 at 11:55:05AM +0530, Kajol Jain wrote:
>> Add pmu metric json file for power10 platform.
>>
>> Signed-off-by: Kajol Jain 
>> ---
>> Changelog v1 -> v2:
>> - Did some nit changes in BriefDescription field
>>   as suggested by Paul A. Clarke
>>
>> - Link to the v1 patch: https://lkml.org/lkml/2021/10/6/131
>>
>>  .../arch/powerpc/power10/metrics.json | 676 ++
>>  1 file changed, 676 insertions(+)
>>  create mode 100644 tools/perf/pmu-events/arch/powerpc/power10/metrics.json
>>
>> diff --git a/tools/perf/pmu-events/arch/powerpc/power10/metrics.json 
>> b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
>> new file mode 100644
>> index ..8adab5cd9934
>> --- /dev/null
>> +++ b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
>> @@ -0,0 +1,676 @@
>> +[
>> +{
>> +"BriefDescription": "Percentage of cycles that are run cycles",
>> +"MetricExpr": "PM_RUN_CYC / PM_CYC * 100",
>> +"MetricGroup": "General",
>> +"MetricName": "RUN_CYCLES_RATE",
>> +"ScaleUnit": "1%"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per completed instruction",
>> +"MetricExpr": "PM_CYC / PM_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "CYCLES_PER_INSTRUCTION"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled for any reason",
>> +"MetricExpr": "PM_DISP_STALL_CYC / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled because there was a flush",
>> +"MetricExpr": "PM_DISP_STALL_FLUSH / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_FLUSH_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled because the MMU was handling a translation miss",
>> +"MetricExpr": "PM_DISP_STALL_TRANSLATION / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_TRANSLATION_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled waiting to resolve an instruction ERAT miss",
>> +"MetricExpr": "PM_DISP_STALL_IERAT_ONLY_MISS / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_IERAT_ONLY_MISS_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled waiting to resolve an instruction TLB miss",
>> +"MetricExpr": "PM_DISP_STALL_ITLB_MISS / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_ITLB_MISS_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled due to an icache miss",
>> +"MetricExpr": "PM_DISP_STALL_IC_MISS / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_IC_MISS_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled while the instruction was fetched from the local L2",
>> +"MetricExpr": "PM_DISP_STALL_IC_L2 / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_IC_L2_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled while the instruction was fetched from the local L3",
>> +"MetricExpr": "PM_DISP_STALL_IC_L3 / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_IC_L3_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled while the instruction was fetched from any source beyond the 
>> local L3",
>> +"MetricExpr": "PM_DISP_STALL_IC_L3MISS / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_IC_L3MISS_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled due to an icache miss after a branch mispredict",
>> +"MetricExpr": "PM_DISP_STALL_BR_MPRED_ICMISS / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_BR_MPRED_ICMISS_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled while instruction was fetched from the local L2 after suffering 
>> a branch mispredict",
>> +"MetricExpr": "PM_DISP_STALL_BR_MPRED_IC_L2 / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_BR_MPRED_IC_L2_CPI"
>> +

Re: [PATCH v2] perf vendor events power10: Add metric events json file for power10 platform

2021-10-25 Thread Paul A. Clarke
On Mon, Oct 25, 2021 at 02:23:15PM +1100, Michael Ellerman wrote:
> "Paul A. Clarke"  writes:
> > Thanks for the changes!
> > More nits below (many left over from prior review)...
> >
> > On Fri, Oct 22, 2021 at 11:55:05AM +0530, Kajol Jain wrote:
> >> Add pmu metric json file for power10 platform.
> >> 
> >> Signed-off-by: Kajol Jain 
> >> ---
> >> Changelog v1 -> v2:
> >> - Did some nit changes in BriefDescription field
> >>   as suggested by Paul A. Clarke
> >> 
> >> - Link to the v1 patch: https://lkml.org/lkml/2021/10/6/131
> >> 
> >>  .../arch/powerpc/power10/metrics.json | 676 ++
> >>  1 file changed, 676 insertions(+)
> >>  create mode 100644 tools/perf/pmu-events/arch/powerpc/power10/metrics.json
> >> 
> >> diff --git a/tools/perf/pmu-events/arch/powerpc/power10/metrics.json 
> >> b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
> >> new file mode 100644
> >> index ..8adab5cd9934
> >> --- /dev/null
> >> +++ b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
> >> @@ -0,0 +1,676 @@
> >> +[
> >> +{
> >> +"BriefDescription": "Percentage of cycles that are run cycles",
> >> +"MetricExpr": "PM_RUN_CYC / PM_CYC * 100",
> >> +"MetricGroup": "General",
> >> +"MetricName": "RUN_CYCLES_RATE",
> >> +"ScaleUnit": "1%"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per completed instruction",
> >> +"MetricExpr": "PM_CYC / PM_INST_CMPL",
> >> +"MetricGroup": "CPI",
> >> +"MetricName": "CYCLES_PER_INSTRUCTION"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per instruction when dispatch 
> >> was stalled for any reason",
> >> +"MetricExpr": "PM_DISP_STALL_CYC / PM_RUN_INST_CMPL",
> >> +"MetricGroup": "CPI",
> >> +"MetricName": "DISPATCHED_CPI"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per instruction when dispatch 
> >> was stalled because there was a flush",
> >> +"MetricExpr": "PM_DISP_STALL_FLUSH / PM_RUN_INST_CMPL",
> >> +"MetricGroup": "CPI",
> >> +"MetricName": "DISPATCHED_FLUSH_CPI"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per instruction when dispatch 
> >> was stalled because the MMU was handling a translation miss",
> >> +"MetricExpr": "PM_DISP_STALL_TRANSLATION / PM_RUN_INST_CMPL",
> >> +"MetricGroup": "CPI",
> >> +"MetricName": "DISPATCHED_TRANSLATION_CPI"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per instruction when dispatch 
> >> was stalled waiting to resolve an instruction ERAT miss",
> >> +"MetricExpr": "PM_DISP_STALL_IERAT_ONLY_MISS / PM_RUN_INST_CMPL",
> >> +"MetricGroup": "CPI",
> >> +"MetricName": "DISPATCHED_IERAT_ONLY_MISS_CPI"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per instruction when dispatch 
> >> was stalled waiting to resolve an instruction TLB miss",
> >> +"MetricExpr": "PM_DISP_STALL_ITLB_MISS / PM_RUN_INST_CMPL",
> >> +"MetricGroup": "CPI",
> >> +"MetricName": "DISPATCHED_ITLB_MISS_CPI"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per instruction when dispatch 
> >> was stalled due to an icache miss",
> >> +"MetricExpr": "PM_DISP_STALL_IC_MISS / PM_RUN_INST_CMPL",
> >> +"MetricGroup": "CPI",
> >> +"MetricName": "DISPATCHED_IC_MISS_CPI"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per instruction when dispatch 
> >> was stalled while the instruction was fetched from the local L2",
> >> +"MetricExpr": "PM_DISP_STALL_IC_L2 / PM_RUN_INST_CMPL",
> >> +"MetricGroup": "CPI",
> >> +"MetricName": "DISPATCHED_IC_L2_CPI"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per instruction when dispatch 
> >> was stalled while the instruction was fetched from the local L3",
> >> +"MetricExpr": "PM_DISP_STALL_IC_L3 / PM_RUN_INST_CMPL",
> >> +"MetricGroup": "CPI",
> >> +"MetricName": "DISPATCHED_IC_L3_CPI"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per instruction when dispatch 
> >> was stalled while the instruction was fetched from any source beyond the 
> >> local L3",
> >> +"MetricExpr": "PM_DISP_STALL_IC_L3MISS / PM_RUN_INST_CMPL",
> >> +"MetricGroup": "CPI",
> >> +"MetricName": "DISPATCHED_IC_L3MISS_CPI"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per instruction when dispatch 
> >> was stalled due to an icache miss after a branch mispredict",
> >> +"MetricExpr": "PM_DISP_STALL_BR_MPRED_ICMISS / PM_RUN_INST_CMPL",
> >> +"MetricGroup": "CPI",
> >> +"MetricName": "DISPATCHED_BR_MPRED_ICMISS_CPI"
> >> +},
> >> +{
> >> +"BriefDescription": "Average cycles per instruction when dispatch 
> >> 

Re: [PATCH v2] perf vendor events power10: Add metric events json file for power10 platform

2021-10-24 Thread Michael Ellerman
"Paul A. Clarke"  writes:
> Thanks for the changes!
> More nits below (many left over from prior review)...
>
> On Fri, Oct 22, 2021 at 11:55:05AM +0530, Kajol Jain wrote:
>> Add pmu metric json file for power10 platform.
>> 
>> Signed-off-by: Kajol Jain 
>> ---
>> Changelog v1 -> v2:
>> - Did some nit changes in BriefDescription field
>>   as suggested by Paul A. Clarke
>> 
>> - Link to the v1 patch: https://lkml.org/lkml/2021/10/6/131
>> 
>>  .../arch/powerpc/power10/metrics.json | 676 ++
>>  1 file changed, 676 insertions(+)
>>  create mode 100644 tools/perf/pmu-events/arch/powerpc/power10/metrics.json
>> 
>> diff --git a/tools/perf/pmu-events/arch/powerpc/power10/metrics.json 
>> b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
>> new file mode 100644
>> index ..8adab5cd9934
>> --- /dev/null
>> +++ b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
>> @@ -0,0 +1,676 @@
>> +[
>> +{
>> +"BriefDescription": "Percentage of cycles that are run cycles",
>> +"MetricExpr": "PM_RUN_CYC / PM_CYC * 100",
>> +"MetricGroup": "General",
>> +"MetricName": "RUN_CYCLES_RATE",
>> +"ScaleUnit": "1%"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per completed instruction",
>> +"MetricExpr": "PM_CYC / PM_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "CYCLES_PER_INSTRUCTION"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled for any reason",
>> +"MetricExpr": "PM_DISP_STALL_CYC / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled because there was a flush",
>> +"MetricExpr": "PM_DISP_STALL_FLUSH / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_FLUSH_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled because the MMU was handling a translation miss",
>> +"MetricExpr": "PM_DISP_STALL_TRANSLATION / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_TRANSLATION_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled waiting to resolve an instruction ERAT miss",
>> +"MetricExpr": "PM_DISP_STALL_IERAT_ONLY_MISS / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_IERAT_ONLY_MISS_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled waiting to resolve an instruction TLB miss",
>> +"MetricExpr": "PM_DISP_STALL_ITLB_MISS / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_ITLB_MISS_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled due to an icache miss",
>> +"MetricExpr": "PM_DISP_STALL_IC_MISS / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_IC_MISS_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled while the instruction was fetched from the local L2",
>> +"MetricExpr": "PM_DISP_STALL_IC_L2 / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_IC_L2_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled while the instruction was fetched from the local L3",
>> +"MetricExpr": "PM_DISP_STALL_IC_L3 / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_IC_L3_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled while the instruction was fetched from any source beyond the 
>> local L3",
>> +"MetricExpr": "PM_DISP_STALL_IC_L3MISS / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_IC_L3MISS_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled due to an icache miss after a branch mispredict",
>> +"MetricExpr": "PM_DISP_STALL_BR_MPRED_ICMISS / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_BR_MPRED_ICMISS_CPI"
>> +},
>> +{
>> +"BriefDescription": "Average cycles per instruction when dispatch 
>> was stalled while instruction was fetched from the local L2 after suffering 
>> a branch mispredict",
>> +"MetricExpr": "PM_DISP_STALL_BR_MPRED_IC_L2 / PM_RUN_INST_CMPL",
>> +"MetricGroup": "CPI",
>> +"MetricName": "DISPATCHED_BR_MPRED_IC_L2_CPI"
>> +},
>> +{
>> + 

Re: [PATCH v2] perf vendor events power10: Add metric events json file for power10 platform

2021-10-22 Thread Paul A. Clarke
Thanks for the changes!
More nits below (many left over from prior review)...

On Fri, Oct 22, 2021 at 11:55:05AM +0530, Kajol Jain wrote:
> Add pmu metric json file for power10 platform.
> 
> Signed-off-by: Kajol Jain 
> ---
> Changelog v1 -> v2:
> - Did some nit changes in BriefDescription field
>   as suggested by Paul A. Clarke
> 
> - Link to the v1 patch: https://lkml.org/lkml/2021/10/6/131
> 
>  .../arch/powerpc/power10/metrics.json | 676 ++
>  1 file changed, 676 insertions(+)
>  create mode 100644 tools/perf/pmu-events/arch/powerpc/power10/metrics.json
> 
> diff --git a/tools/perf/pmu-events/arch/powerpc/power10/metrics.json 
> b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
> new file mode 100644
> index ..8adab5cd9934
> --- /dev/null
> +++ b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
> @@ -0,0 +1,676 @@
> +[
> +{
> +"BriefDescription": "Percentage of cycles that are run cycles",
> +"MetricExpr": "PM_RUN_CYC / PM_CYC * 100",
> +"MetricGroup": "General",
> +"MetricName": "RUN_CYCLES_RATE",
> +"ScaleUnit": "1%"
> +},
> +{
> +"BriefDescription": "Average cycles per completed instruction",
> +"MetricExpr": "PM_CYC / PM_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "CYCLES_PER_INSTRUCTION"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled for any reason",
> +"MetricExpr": "PM_DISP_STALL_CYC / PM_RUN_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "DISPATCHED_CPI"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled because there was a flush",
> +"MetricExpr": "PM_DISP_STALL_FLUSH / PM_RUN_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "DISPATCHED_FLUSH_CPI"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled because the MMU was handling a translation miss",
> +"MetricExpr": "PM_DISP_STALL_TRANSLATION / PM_RUN_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "DISPATCHED_TRANSLATION_CPI"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled waiting to resolve an instruction ERAT miss",
> +"MetricExpr": "PM_DISP_STALL_IERAT_ONLY_MISS / PM_RUN_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "DISPATCHED_IERAT_ONLY_MISS_CPI"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled waiting to resolve an instruction TLB miss",
> +"MetricExpr": "PM_DISP_STALL_ITLB_MISS / PM_RUN_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "DISPATCHED_ITLB_MISS_CPI"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled due to an icache miss",
> +"MetricExpr": "PM_DISP_STALL_IC_MISS / PM_RUN_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "DISPATCHED_IC_MISS_CPI"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled while the instruction was fetched from the local L2",
> +"MetricExpr": "PM_DISP_STALL_IC_L2 / PM_RUN_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "DISPATCHED_IC_L2_CPI"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled while the instruction was fetched from the local L3",
> +"MetricExpr": "PM_DISP_STALL_IC_L3 / PM_RUN_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "DISPATCHED_IC_L3_CPI"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled while the instruction was fetched from any source beyond the 
> local L3",
> +"MetricExpr": "PM_DISP_STALL_IC_L3MISS / PM_RUN_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "DISPATCHED_IC_L3MISS_CPI"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled due to an icache miss after a branch mispredict",
> +"MetricExpr": "PM_DISP_STALL_BR_MPRED_ICMISS / PM_RUN_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "DISPATCHED_BR_MPRED_ICMISS_CPI"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled while instruction was fetched from the local L2 after suffering a 
> branch mispredict",
> +"MetricExpr": "PM_DISP_STALL_BR_MPRED_IC_L2 / PM_RUN_INST_CMPL",
> +"MetricGroup": "CPI",
> +"MetricName": "DISPATCHED_BR_MPRED_IC_L2_CPI"
> +},
> +{
> +"BriefDescription": "Average cycles per instruction when dispatch 
> was stalled while instruction was fetched from the local L3 after 

[PATCH v2] perf vendor events power10: Add metric events json file for power10 platform

2021-10-22 Thread Kajol Jain
Add pmu metric json file for power10 platform.

Signed-off-by: Kajol Jain 
---
Changelog v1 -> v2:
- Did some nit changes in BriefDescription field
  as suggested by Paul A. Clarke

- Link to the v1 patch: https://lkml.org/lkml/2021/10/6/131

 .../arch/powerpc/power10/metrics.json | 676 ++
 1 file changed, 676 insertions(+)
 create mode 100644 tools/perf/pmu-events/arch/powerpc/power10/metrics.json

diff --git a/tools/perf/pmu-events/arch/powerpc/power10/metrics.json 
b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
new file mode 100644
index ..8adab5cd9934
--- /dev/null
+++ b/tools/perf/pmu-events/arch/powerpc/power10/metrics.json
@@ -0,0 +1,676 @@
+[
+{
+"BriefDescription": "Percentage of cycles that are run cycles",
+"MetricExpr": "PM_RUN_CYC / PM_CYC * 100",
+"MetricGroup": "General",
+"MetricName": "RUN_CYCLES_RATE",
+"ScaleUnit": "1%"
+},
+{
+"BriefDescription": "Average cycles per completed instruction",
+"MetricExpr": "PM_CYC / PM_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "CYCLES_PER_INSTRUCTION"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled for any reason",
+"MetricExpr": "PM_DISP_STALL_CYC / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled because there was a flush",
+"MetricExpr": "PM_DISP_STALL_FLUSH / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_FLUSH_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled because the MMU was handling a translation miss",
+"MetricExpr": "PM_DISP_STALL_TRANSLATION / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_TRANSLATION_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled waiting to resolve an instruction ERAT miss",
+"MetricExpr": "PM_DISP_STALL_IERAT_ONLY_MISS / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_IERAT_ONLY_MISS_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled waiting to resolve an instruction TLB miss",
+"MetricExpr": "PM_DISP_STALL_ITLB_MISS / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_ITLB_MISS_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled due to an icache miss",
+"MetricExpr": "PM_DISP_STALL_IC_MISS / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_IC_MISS_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled while the instruction was fetched from the local L2",
+"MetricExpr": "PM_DISP_STALL_IC_L2 / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_IC_L2_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled while the instruction was fetched from the local L3",
+"MetricExpr": "PM_DISP_STALL_IC_L3 / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_IC_L3_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled while the instruction was fetched from any source beyond the local L3",
+"MetricExpr": "PM_DISP_STALL_IC_L3MISS / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_IC_L3MISS_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled due to an icache miss after a branch mispredict",
+"MetricExpr": "PM_DISP_STALL_BR_MPRED_ICMISS / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_BR_MPRED_ICMISS_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled while instruction was fetched from the local L2 after suffering a 
branch mispredict",
+"MetricExpr": "PM_DISP_STALL_BR_MPRED_IC_L2 / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_BR_MPRED_IC_L2_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled while instruction was fetched from the local L3 after suffering a 
branch mispredict",
+"MetricExpr": "PM_DISP_STALL_BR_MPRED_IC_L3 / PM_RUN_INST_CMPL",
+"MetricGroup": "CPI",
+"MetricName": "DISPATCHED_BR_MPRED_IC_L3_CPI"
+},
+{
+"BriefDescription": "Average cycles per instruction when dispatch was 
stalled while instruction was fetched from any source beyond the local L3 after 
suffering a