intel / PerfSpect

System performance analysis and characterization tool
BSD 3-Clause "New" or "Revised" License
339 stars 31 forks source link

Add support for Oracle Cloud (OCI) #9

Closed amblakem closed 2 years ago

amblakem commented 2 years ago

This PR adds support for Oracle Cloud (OCI)

Note that this will still give warnings[2] but collection will still occur whereas the current behavior is that the application will print an error and exit[3].

[1] Tested on the following:

+--------------+--------------------+-----------------------------------+------------------------------+-----------------------------------------------+
|      OS      |       Shape        |              Kernel               |             Perf             |                      CPU                      |
+--------------+--------------------+-----------------------------------+------------------------------+-----------------------------------------------+
| Ubuntu 20.04 | VM.Standard3.Flex  | 5.13.0-1018-oracle                | 5.13.19                      | Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz  |
| Ubuntu 20.04 | VM.Optimized3.Flex | 5.13.0-1018-oracle                | 5.13.19                      | Intel(R) Xeon(R) Gold 6354 CPU @ 3.00GHz      |
| Ubuntu 20.04 | VM.Standard2.2     | 5.13.0-1018-oracle                | 5.13.19                      | Intel(R) Xeon(R) Platinum 8167M CPU @ 2.00GHz |
| Ubuntu 18.04 | VM.Standard3.Flex  | 5.4.0-1070-oracle                 | 5.4.178                      | Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz  |
| Ubuntu 18.04 | VM.Optimized3.Flex | 5.4.0-1070-oracle                 | 5.4.178                      | Intel(R) Xeon(R) Gold 6354 CPU @ 3.00GHz      |
| Ubuntu 18.04 | VM.Standard2.2     | 5.4.0-1070-oracle                 | 5.4.178                      | Intel(R) Xeon(R) Platinum 8167M CPU @ 2.00GHz |
| OEL8         | VM.Standard3.Flex  | 5.4.17-2136.306.1.3.el8uek.x86_64 | 4.18.0-348.20.1.el8_5.x86_64 | Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz  |
| OEL8         | VM.Optimized3.Flex | 5.4.17-2136.306.1.3.el8uek.x86_64 | 4.18.0-348.20.1.el8_5.x86_64 | Intel(R) Xeon(R) Gold 6354 CPU @ 3.00GHz      |
| OEL8         | VM.Standard2.2     | 5.4.17-2136.306.1.3.el8uek.x86_64 | 4.18.0-348.20.1.el8_5.x86_64 | Intel(R) Xeon(R) Platinum 8167M CPU @ 2.00GHz |
+--------------+--------------------+-----------------------------------+------------------------------+-----------------------------------------------+

[2] Example on VM.Optimized3.Flex, Ubuntu 20.04, Intel(R) Xeon(R) Gold 6354

$ sudo ./perf-collect --cloud oci
These events are not supported with current version of perf, will not be collected!
topdown.slots,
power/energy-pkg/,
power/energy-ram/;
upi/event=0x2,umask=0xf,name='UNC_UPI_TxL_FLITS.ALL_DATA'/,
upi/event=0x2,umask=0x97,name='UNC_UPI_TxL_FLITS.NON_DATA'/,
upi/event=0x1,umask=0x0,name='UNC_UPI_CLOCKTICKS'/;
cha/event=0x35,umask=0xC816FE01,name='UNC_CHA_TOR_INSERTS.IA_MISS_DRD_LOCAL'/,
cha/event=0x35,umask=0xC8177E01,name='UNC_CHA_TOR_INSERTS.IA_MISS_DRD_REMOTE'/,
cha/event=0x35,umask=0xC896FE01,name='UNC_CHA_TOR_INSERTS.IA_MISS_DRD_PREF_LOCAL'/,
cha/event=0x35,umask=0xC8977E01,name='UNC_CHA_TOR_INSERTS.IA_MISS_DRD_PREF_REMOTE'/;
cha/event=0x00,umask=0x00,name='UNC_CHA_CLOCKTICKS'/;
imc/event=0xd3,umask=0x01,name='UNC_M_TAGCHK.HIT'/,
imc/event=0xd3,umask=0x02,name='UNC_M_TAGCHK.MISS_CLEAN'/,
imc/event=0xd3,umask=0x04,name='UNC_M_TAGCHK.MISS_DIRTY'/;
imc/event=0x04,umask=0x0f,name='UNC_M_CAS_COUNT.RD'/,
imc/event=0x04,umask=0x30,name='UNC_M_CAS_COUNT.WR'/;
Collecting perf stat for events in : /home/ubuntu/cloudcompute.perfspect/events/icx_oci.txt

[3] Example

$ sudo ./perf-collect --cloud oci
These events are not supported with current version of perf, will not be collected!
power/energy-pkg/,
power/energy-ram/;
upi/event=0x2,umask=0xf,name='UNC_UPI_TxL_FLITS.ALL_DATA'/,
upi/event=0x2,umask=0x97,name='UNC_UPI_TxL_FLITS.NON_DATA'/,
upi/event=0x1,umask=0x0,name='UNC_UPI_CLOCKTICKS'/;
cha/event=0x35,umask=0xC816FE01,name='UNC_CHA_TOR_INSERTS.IA_MISS_DRD_LOCAL'/,
cha/event=0x35,umask=0xC8177E01,name='UNC_CHA_TOR_INSERTS.IA_MISS_DRD_REMOTE'/,
cha/event=0x35,umask=0xC896FE01,name='UNC_CHA_TOR_INSERTS.IA_MISS_DRD_PREF_LOCAL'/,
cha/event=0x35,umask=0xC8977E01,name='UNC_CHA_TOR_INSERTS.IA_MISS_DRD_PREF_REMOTE'/;
cha/event=0x00,umask=0x00,name='UNC_CHA_CLOCKTICKS'/;
imc/event=0x04,umask=0x0f,name='UNC_M_CAS_COUNT.RD'/,
imc/event=0x04,umask=0x30,name='UNC_M_CAS_COUNT.WR'/;
Collecting perf stat for events in : icx.txt
Consider using cloudtype flag to set instance type -> VM/BM; Default is VM
Error:
The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (slots).
/bin/dmesg | grep -i perf may provide additional information.

Collection complete! Calculating TSC frequency now

perf stat dumped to /home/opc/perfspect/results/perfstat.csv

Signed-off-by: Aaron Blakeman aaron.blakeman@intel.com