diff mbox

[1/2] power7, perf: Make some new raw event codes available in sysfs

Message ID 1381902780-2719-2-git-send-email-khandual@linux.vnet.ibm.com (mailing list archive)
State Changes Requested, archived
Delegated to: Michael Ellerman
Headers show

Commit Message

Anshuman Khandual Oct. 16, 2013, 5:52 a.m. UTC
This patch adds some more raw event codes into the existing list
of event codes present in power7-events-list.h file. This tries
to complete the list of events supported in Power7 and matches
the raw event list with libpfm4 library.

Signed-off-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
 arch/powerpc/perf/power7-events-list.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Michael Ellerman Dec. 13, 2013, 2:50 a.m. UTC | #1
On Wed, 2013-10-16 at 11:22 +0530, Anshuman Khandual wrote:
> This patch adds some more raw event codes into the existing list
> of event codes present in power7-events-list.h file. This tries
> to complete the list of events supported in Power7 and matches
> the raw event list with libpfm4 library.

It's a bit annoying, but you also need to update the "ABI" document:

  Documentation/ABI/testing/sysfs-bus-event_source-devices-events

Please do so and resend.

cheers
Anshuman Khandual Dec. 13, 2013, 4:30 a.m. UTC | #2
On 12/13/2013 08:20 AM, Michael Ellerman wrote:
> On Wed, 2013-10-16 at 11:22 +0530, Anshuman Khandual wrote:
>> This patch adds some more raw event codes into the existing list
>> of event codes present in power7-events-list.h file. This tries
>> to complete the list of events supported in Power7 and matches
>> the raw event list with libpfm4 library.
> 
> It's a bit annoying, but you also need to update the "ABI" document:

What is annoying ? you need to be specific.

> 
>   Documentation/ABI/testing/sysfs-bus-event_source-devices-events
> 

The events listed under the following heading are events required to do
CPI analysis.

"Description:    POWER-systems specific performance monitoring event"

		/sys/devices/cpu/events/PM_1PLUS_PPC_CMPL
                /sys/devices/cpu/events/PM_BRU_FIN
                /sys/devices/cpu/events/PM_BR_MPRED
                /sys/devices/cpu/events/PM_CMPLU_STALL
                /sys/devices/cpu/events/PM_CMPLU_STALL_BRU
                /sys/devices/cpu/events/PM_CMPLU_STALL_DCACHE_MISS
                /sys/devices/cpu/events/PM_CMPLU_STALL_DFU
                /sys/devices/cpu/events/PM_CMPLU_STALL_DIV
                /sys/devices/cpu/events/PM_CMPLU_STALL_ERAT_MISS
                /sys/devices/cpu/events/PM_CMPLU_STALL_FXU
                /sys/devices/cpu/events/PM_CMPLU_STALL_IFU
                /sys/devices/cpu/events/PM_CMPLU_STALL_LSU
                /sys/devices/cpu/events/PM_CMPLU_STALL_REJECT
                /sys/devices/cpu/events/PM_CMPLU_STALL_SCALAR
                /sys/devices/cpu/events/PM_CMPLU_STALL_SCALAR_LONG
                /sys/devices/cpu/events/PM_CMPLU_STALL_STORE
                /sys/devices/cpu/events/PM_CMPLU_STALL_THRD
                /sys/devices/cpu/events/PM_CMPLU_STALL_VECTOR
                /sys/devices/cpu/events/PM_CMPLU_STALL_VECTOR_LONG
                /sys/devices/cpu/events/PM_CYC
                /sys/devices/cpu/events/PM_GCT_NOSLOT_BR_MPRED
                /sys/devices/cpu/events/PM_GCT_NOSLOT_BR_MPRED_IC_MISS
                /sys/devices/cpu/events/PM_GCT_NOSLOT_CYC
                /sys/devices/cpu/events/PM_GCT_NOSLOT_IC_MISS
                /sys/devices/cpu/events/PM_GRP_CMPL
                /sys/devices/cpu/events/PM_INST_CMPL
                /sys/devices/cpu/events/PM_LD_MISS_L1
                /sys/devices/cpu/events/PM_LD_REF_L1
                /sys/devices/cpu/events/PM_RUN_CYC
                /sys/devices/cpu/events/PM_RUN_INST_CMPL


But I am not sure the events the current patch in context adds

+EVENT(PM_1THRD_CON_RUN_INSTR,                 0x30062)
+EVENT(PM_CMPLU_STALL_COUNT,                   0x4000B)
+EVENT(PM_MEM0_PB_RD_CL,                       0x30083)
+EVENT(PM_THRD_1_RUN_CYC,                      0x10060)
+EVENT(PM_THRD_2_CONC_RUN_INSTR,               0x40062)
+EVENT(PM_THRD_2_RUN_CYC,                      0x20060)
+EVENT(PM_THRD_3_CONC_RUN_INST,                0x10062)
+EVENT(PM_THRD_3_RUN_CYC,                      0x30060)
+EVENT(PM_THRD_4_CONC_RUN_INST,                0x20062)
+EVENT(PM_THRD_4_RUN_CYC,                      0x40060)

will be helpful in CPI stack analysis and should be part of the ABI
documentation file. If it does, I will be glad to add them.
Michael Ellerman Dec. 18, 2013, 1:59 a.m. UTC | #3
On Fri, 2013-12-13 at 10:00 +0530, Anshuman Khandual wrote:
> On 12/13/2013 08:20 AM, Michael Ellerman wrote:
> > On Wed, 2013-10-16 at 11:22 +0530, Anshuman Khandual wrote:
> >> This patch adds some more raw event codes into the existing list
> >> of event codes present in power7-events-list.h file. This tries
> >> to complete the list of events supported in Power7 and matches
> >> the raw event list with libpfm4 library.
> > 
> > It's a bit annoying, but you also need to update the "ABI" document:
> 
> What is annoying ? you need to be specific.

It's annoying that we have to update the ABI document.

> >   Documentation/ABI/testing/sysfs-bus-event_source-devices-events
> > 
> 
> The events listed under the following heading are events required to do
> CPI analysis.

No they are not, it doesn't say that anywhere in the file.

It happens that the events in there *now* are the CPI events, but that's because
they are the only ones that have been added.

> "Description:    POWER-systems specific performance monitoring event"
> 
> 		  /sys/devices/cpu/events/PM_1PLUS_PPC_CMPL
>                 /sys/devices/cpu/events/PM_BRU_FIN
>                 /sys/devices/cpu/events/PM_BR_MPRED
>                 /sys/devices/cpu/events/PM_CMPLU_STALL

All events that appear in /sys/devices/cpu/events on powerpc should be listed
in the file.

cheers
Anshuman Khandual Jan. 2, 2014, 5:05 a.m. UTC | #4
On 12/18/2013 07:29 AM, Michael Ellerman wrote:
> On Fri, 2013-12-13 at 10:00 +0530, Anshuman Khandual wrote:
>> On 12/13/2013 08:20 AM, Michael Ellerman wrote:
>>> On Wed, 2013-10-16 at 11:22 +0530, Anshuman Khandual wrote:
>>>> This patch adds some more raw event codes into the existing list
>>>> of event codes present in power7-events-list.h file. This tries
>>>> to complete the list of events supported in Power7 and matches
>>>> the raw event list with libpfm4 library.
>>>
>>> It's a bit annoying, but you also need to update the "ABI" document:
>>
>> What is annoying ? you need to be specific.
> 
> It's annoying that we have to update the ABI document.
> 
>>>   Documentation/ABI/testing/sysfs-bus-event_source-devices-events
>>>
>>
>> The events listed under the following heading are events required to do
>> CPI analysis.
> 
> No they are not, it doesn't say that anywhere in the file.
> 
> It happens that the events in there *now* are the CPI events, but that's because
> they are the only ones that have been added.
> 
>> "Description:    POWER-systems specific performance monitoring event"
>>
>> 		  /sys/devices/cpu/events/PM_1PLUS_PPC_CMPL
>>                 /sys/devices/cpu/events/PM_BRU_FIN
>>                 /sys/devices/cpu/events/PM_BR_MPRED
>>                 /sys/devices/cpu/events/PM_CMPLU_STALL
> 
> All events that appear in /sys/devices/cpu/events on powerpc should be listed
> in the file.

Done, sent out the V2 version of the patch for POWER7 adding all the sysfs exported
raw events into the ABI documentation file.
diff mbox

Patch

diff --git a/arch/powerpc/perf/power7-events-list.h b/arch/powerpc/perf/power7-events-list.h
index 687790a..64f13d9 100644
--- a/arch/powerpc/perf/power7-events-list.h
+++ b/arch/powerpc/perf/power7-events-list.h
@@ -546,3 +546,13 @@  EVENT(PM_MRK_DATA_FROM_RL2L3_SHR,             0x1d04c)
 EVENT(PM_DTLB_MISS_16M,                       0x4c05e)
 EVENT(PM_LSU1_LMQ_LHR_MERGE,                  0x0d09a)
 EVENT(PM_IFU_FIN,                             0x40066)
+EVENT(PM_1THRD_CON_RUN_INSTR,                 0x30062)
+EVENT(PM_CMPLU_STALL_COUNT,                   0x4000B)
+EVENT(PM_MEM0_PB_RD_CL,                       0x30083)
+EVENT(PM_THRD_1_RUN_CYC,                      0x10060)
+EVENT(PM_THRD_2_CONC_RUN_INSTR,               0x40062)
+EVENT(PM_THRD_2_RUN_CYC,                      0x20060)
+EVENT(PM_THRD_3_CONC_RUN_INST,                0x10062)
+EVENT(PM_THRD_3_RUN_CYC,                      0x30060)
+EVENT(PM_THRD_4_CONC_RUN_INST,                0x20062)
+EVENT(PM_THRD_4_RUN_CYC,                      0x40060)