hi,
i'm trying different options and i keep getting
Error: For this processor, Event Based Profiling is supported only with Linux kernel version 4.9 or later.
are there any tools i could use to profile the code using centos 7.4?
thanks,
yah
HI,
i tried perf using some of the cpu-events
AMDuProfCLI-bin collect --list cpu-events
listed
0x00CA Retired Indirect Branch Instructions Mispredicted
perf stat -e cycles -e cpu/event=0xca,umask=0x01,inv,cmask=0x01/ ./bots-sparselu -n 120 -m 501
Performance counter stats for './bots-sparselu -n 120 -m 501':
58240550701204 cycles
58241020036089 cpu/event=0xca,umask=0x01,inv,cmask=0x01/
439.596918722 seconds time elapsed
0x00C4 Retired Taken Branch Instructions
perf stat -e cycles -e cpu/event=0xc4,umask=0x01,inv,cmask=0x01/ ./bots-sparselu -n 120 -m 501
Performance counter stats for './bots-sparselu -n 120 -m 501':
58054751953774 cycles
39691284251438 cpu/event=0xc4,umask=0x01,inv,cmask=0x01/
438.316381850 seconds time elapsed
0x00C1 Retired uops
Performance counter stats for './bots-sparselu -n 120 -m 501':
58199009753698 cycles
39416777313860 cpu/event=0xc1,umask=0x01,inv,cmask=0x01/
439.075965240 seconds time elapsed
is it ok to use those events with perf? is there an AMD guide i could read to figure out how to use the umask, inv, cmask properties?
thanks,
yah
by the way, i'm using centos 7.4 and this is the cpu description
Vendor ID: AuthenticAMD
CPU family: 23
Model: 1
Model name: AMD EPYC 7451 24-Core Processor
Stepping: 2
Hi Yah,
Please refer Family 0x17 OSRR document for the supported events list:
You can find the core PMC evnets list in the section "2.1.11.3 Core Performance Monitor Counters".
Each event id is encoded as PMCxABC, where 'ABC' is the event id in hexadecimal, i.e. 0xABC, which you can use with -e as "event=0xABC"
Each event will have umask to choose a one or more hardware event attributes. Each valid bit stands for one attribute whenever applicable.
To choose bit-0, bit-2, you need to set umask=0x5 and so on. If a bit is not applicable, then that bit must be set to 0. For some events, none of the attribute bits are applicable, then set umask=0x0. Check the Bits table for each event to find out exact umask for each each PMC event.
Swarup
Hi Yah,
You are using CentOS 7.4 on EPYC processor. The (default) kernel version for CentOS 7.4 is 3.10.0, which doesn't support AMD EPYC processors and all AMD family 23 (0x17) processors. Kernel 4.9.x or later supports AMD family 23 processors.
So, if you try to use any family 23 specific events on CentOS7.x, it would not work.
Swarup
Hi,
i was wondering if you could give tell me what I'm doing wrong. I tried the following
perf stat -e cpu/event=0x052,umask=0x0 ./bots-sparselu_base.gcc -n 120 -m 501
and the following error comes up
event syntax error: '..0x052,umask=0x0'
\___ parser error
Run 'perf list' for a list of valid events
Usage: perf stat [<options>] [<command>]
-e, --event <event> event selector. use 'perf list' to list available events
I tried -e without cpu and it did not work. We are using umask set to 0 because we want to get both attributes ( MabMchCnt and DataPipeSwPfDcHit) information. Could you tell us what we are doing wrong?
thanks,
yah
You missed the closing '/' in your command, which caused the parsing error.
Also, I can see you are using 'umask=0x0' for the event 0x52. If you are trying this on a Family 0x17 processor, then as per the OSRR, umask must have at least 1 bit set out of bit0, bit1. So the meaningful umask values are: 0x1, 0x2, 0x3.
Try the following command:
perf stat -e cpu/event=0x052,umask=0x1/ ./bots-sparselu_base.gcc -n 120 -m 501
thanks for the explanation. it is working now
yah
thanks for the tips