[PATCH] CPU "IBM Power Architected Events V1" support added to the testsuite
Michael Petlan <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I've added a new entry into the testsuite's event table
to enable support of "IBM Power Architected Events V1"
CPU.
$ cat /proc/cpuinfo
processor : 0
cpu : POWER8 (architected), altivec supported
clock : 3425.000000MHz
revision : 2.1 (pvr 004b 0201)
timebase : 512000000
platform : pSeries
model : IBM pSeries (emulated by qemu)
machine : CHRP IBM pSeries (emulated by qemu)
$ ophelp -r
IBM Power Architected Events V1
Although the CPU is POWER8 family, it has different event
set, because it's a KVM guest.
==========================================================
Here's the patch:
diff --git a/testsuite/lib/op_events.exp b/testsuite/lib/op_events.exp
index eac5db4..8cff5d0 100644
--- a/testsuite/lib/op_events.exp
+++ b/testsuite/lib/op_events.exp
@@ -408,6 +408,20 @@ set op_event_table(power8) \
} \
}
+set op_event_table(ibm_power_architected_v1) \
+ { \
+ { \
+ {0 CYCLES 0 500000} \
+ } \
+ { \
+ {1 PM_INST_DISP 0 1000000} \
+ {1 PM_BR_TAKEN_CMPL 0 100000} \
+ {3 PM_BR_MPRED_CMPL 0 100000} \
+ {4 PM_RUN_INST_CMPL 0 500000} \
+ {5 PM_RUN_CYC 0 500000} \
+ } \
+ }
+
set op_event_table(ibm_compat_v1) \
{ \
{ \
@@ -746,6 +760,7 @@ proc select_cpu_events {cpu_name} {
ppc64/power8 {set type power8}
ppc64_POWER8 {set type power8}
ARM_X-Gene {set type arm8}
+ IBM_Power_Architected_Events_V1 {set type ibm_power_architected_v1}
}
verbose "cpu type is $type"
==========================================================
The only thing I am not sure about is the PM_INST_DISP event.
It uses the same counter as PM_BR_TAKEN_CMPL. But it seems
that it works because of counter multiplexing. If anyone has
an idea which event should replace the PM_INST_DISP to avoid
the counter mismatch, feel free to fix that. But it works.
I've attached the patch and testsuite result logs. They look
reasonable to me.
Regards,
Michael
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
oprofile-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oprofile-list
cpu_type.patch
(text/x-patch, 1.3 KB)
diff --git a/testsuite/lib/op_events.exp b/testsuite/lib/op_events.exp
index eac5db4..8cff5d0 100644
--- a/testsuite/lib/op_events.exp
+++ b/testsuite/lib/op_events.exp
@@ -408,6 +408,20 @@ set op_event_table(power8) \
} \
}
+set op_event_table(ibm_power_architected_v1) \
+ { \
+ { \
+ {0 CYCLES 0 500000} \
+ } \
+ { \
+ {1 PM_INST_DISP 0 1000000} \
+ {1 PM_BR_TAKEN_CMPL 0 100000} \
+ {3 PM_BR_MPRED_CMPL 0 100000} \
+ {4 PM_RUN_INST_CMPL 0 500000} \
+ {5 PM_RUN_CYC 0 500000} \
+ } \
+ }
+
set op_event_table(ibm_compat_v1) \
{ \
{ \
@@ -746,6 +760,7 @@ proc select_cpu_events {cpu_name} {
ppc64/power8 {set type power8}
ppc64_POWER8 {set type power8}
ARM_X-Gene {set type arm8}
+ IBM_Power_Architected_Events_V1 {set type ibm_power_architected_v1}
}
verbose "cpu type is $type"
oprofile.log
(text/x-log, 348.4 KB) - not displayed
oprofile.sum
(text/plain, 7.5 KB)
Test Run By root on Thu Jul 31 14:18:25 2014
Native configuration is powerpc64-unknown-linux-gnu
=== oprofile tests ===
Schedule of variations:
unix
Running target unix
Running ./oprofile-ocount/ocount-run.exp ...
PASS: OProfile operf/ocount version check
PASS: Kill the running workload. Note, if this fails it could be the reason the some non-zero tests failing.
PASS: Non-zero count for workload workload_ocount/load_bin and event CYCLES
PASS: Kill the running workload. Note, if this fails it could be the reason the some non-zero tests failing.
PASS: Non-zero count for workload workload_ocount/load_bin and event CYCLES
PASS: Kill the running workload. Note, if this fails it could be the reason the some non-zero tests failing.
PASS: Non-zero count for workload workload_ocount/load_bin and event CYCLES
PASS: Non-zero count for workload workload_ocount/load_bin and event CYCLES
PASS: Non-zero count for workload workload_ocount/load_bin and event CYCLES
PASS: Event CYCLES count scales by 2, workload workload_ocount/load_bin
PASS: Event CYCLES count scales by 4, workload workload_ocount/load_bin
PASS: Kill the running workload. Note, if this fails it could be the reason the some non-zero tests failing.
PASS: Non-zero count for workload workload_ocount/load_bin and event CYCLES
PASS: Non-zero count for workload workload_ocount/load_bin and event CYCLES]
PASS: Non-zero count for workload workload_ocount/load_bin and event CYCLES
PASS: Event CYCLES, user mode count plus kernel mode count matches user and kernel mode count, workload workload_ocount/load_bin
Running ./oprofile-opcontrol/oprofile-opcontrol-run.exp ...
PASS: version check
PASS: opcontrol --init
PASS: check /dev/oprofile filesystem presence
PASS: opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/2.6.32-492.el6.ppc64/vmlinux
PASS: opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/2.6.32-492.el6.ppc64/vmlinux
PASS: opcontrol --start
PASS: opcontrol --dump
PASS: opcontrol --shutdown
PASS: opreport contains symbol: thread_bin
PASS: opreport contains symbol: mythread
PASS: opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/2.6.32-492.el6.ppc64/vmlinux
PASS: opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/2.6.32-492.el6.ppc64/vmlinux
PASS: opcontrol --start
PASS: opcontrol --dump
PASS: opcontrol --shutdown
PASS: opreport contains symbol: memcpyt_bin
PASS: opreport contains symbol: main
PASS: opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/2.6.32-492.el6.ppc64/vmlinux
PASS: opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/2.6.32-492.el6.ppc64/vmlinux
PASS: opcontrol --start
PASS: opcontrol --dump
PASS: opcontrol --shutdown
PASS: opreport contains symbol: libtcl
Running ./oprofile-operf/oprofile-operf-run.exp ...
PASS: OProfile operf/ocount version check
PASS: operf systemwide check for symbols: workloads/thread_src/thread_bin
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opreport contains symbol: thread_bin
PASS: opreport contains symbol: mythread
PASS: operf systemwide check for symbols: workloads/memcpyt_src/memcpyt_bin
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opreport contains symbol: memcpyt_bin
PASS: opreport contains symbol: main
PASS: operf systemwide check for symbols: tclsh workloads/tcl_src/workload.tcl 150000
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opreport contains symbol: libtcl
PASS: operf systemwide: workloads/thread_src/thread_bin
PASS: nonzero-sized sample file creation: {PM_INST_DISP} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_BR_TAKEN_CMPL} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_BR_MPRED_CMPL} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_RUN_INST_CMPL} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_RUN_CYC} created nonzero sample files
PASS: operf systemwide: workloads/memcpyt_src/memcpyt_bin
PASS: nonzero-sized sample file creation: {PM_INST_DISP} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_BR_TAKEN_CMPL} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_BR_MPRED_CMPL} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_RUN_INST_CMPL} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_RUN_CYC} created nonzero sample files
PASS: operf systemwide: tclsh workloads/tcl_src/workload.tcl 150000
PASS: nonzero-sized sample file creation: {PM_INST_DISP} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_BR_TAKEN_CMPL} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_BR_MPRED_CMPL} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_RUN_INST_CMPL} created nonzero sample files
PASS: nonzero-sized sample file creation: {PM_RUN_CYC} created nonzero sample files
PASS: operf check for callgraph output: operf --callgraph --lazy-conversion --events CYCLES:1500000:0:1:1, workloads/thread_src/thread_bin
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opreport contains symbol: thread_bin
PASS: opreport contains symbol: mythread
PASS: operf check for callgraph output: operf --callgraph --lazy-conversion --events CYCLES:1500000:0:1:1, workloads/memcpyt_src/memcpyt_bin
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opreport contains symbol: memcpyt_bin
PASS: opreport contains symbol: main
PASS: operf check for callgraph output: operf --callgraph --lazy-conversion --events CYCLES:1500000:0:1:1, tclsh workloads/tcl_src/workload.tcl 150000
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opreport contains symbol: libtcl
Running ./oprofile-single_process/oprofile-single_process-run.exp ...
PASS: OProfile operf/ocount version check
PASS: operf check for symbols: operf --events CYCLES:500000:0:1:1, workloads/thread_src/thread_bin
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opreport contains symbol: thread_bin
PASS: opreport contains symbol: mythread
PASS: operf check for symbols: operf --events CYCLES:500000:0:1:1, workloads/memcpyt_src/memcpyt_bin
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opreport contains symbol: memcpyt_bin
PASS: opreport contains symbol: main
PASS: operf check for symbols: operf --events CYCLES:500000:0:1:1, tclsh workloads/tcl_src/workload.tcl 150000
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opreport contains symbol: libtcl
PASS: operf check for symbols (--debug-info): operf --events CYCLES:500000:0:1:1, workloads/thread_src/thread_bin
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opreport contains symbol: mythread
PASS: operf check for symbols (--debug-info): operf --events CYCLES:500000:0:1:1, workloads/memcpyt_src/memcpyt_bin
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opreport contains symbol: main
PASS: operf check for symbols (--debug-info): operf --events CYCLES:500000:0:1:1, tclsh workloads/tcl_src/workload.tcl 150000
PASS: nonzero-sized sample file creation: {CYCLES} created nonzero sample files
PASS: opcontrol --deinit
PASS: check module absence
PASS: check /dev/oprofile filesystem absence
=== oprofile Summary ===
# of expected passes 103