Hi msasongko17,
AMD provides Processor Programming Reference documentation (PPRs) that list the performance monitor events.
If you go to www.amd.com, select Drivers & Support->Support Resources->Tech Docs, you can find them there. Here may the one for your specific processor:
https://www.amd.com/system/files/TechDocs/54945_3.03_ppr_ZP_B2_pub.zip
Search for "PMCx"+three hex digit number, when looking up by number in the pdf reader.
The linux perf utility also has a list subcommand that allows one to see the list of events for their processor: 'perf list'.
The linux perf utility also supports IBS, and capturing the accessed memory addresses, etc., although currently only output in raw format. Here is an invocation example:
$ sudo perf record --raw-samples -c 1000001 -e ibs_op//pp -a sleep 1
We can then view the contents of the raw samples with 'perf report --dump-raw-trace'. Here is what one sample looks like:
159 604884745517170 0xb9cf0 [0x70]: PERF_RECORD_SAMPLE(IP, 0x4001): 0/0: 0xffffffffacd9fec7 period: 1000001 addr: 0
... thread: swapper:0
...... dso: vmlinux
0xb3850 [0x70]: event: 9
.
. ... raw event: size 112 bytes
. 0000: 09 00 00 00 01 40 70 00 c7 fe d9 ac ff ff ff ff .....@p.ÇþÙ¬ÿÿÿÿ
. 0010: 00 00 00 00 00 00 00 00 f8 04 63 b4 23 26 02 00 ........ø.c´#&..
. 0020: 88 00 00 00 00 00 00 00 44 00 00 00 ff 03 00 00 ........D...ÿ...
. 0030: 24 f4 06 00 6a 00 00 00 c7 fe d9 ac ff ff ff ff $ô..j...ÇþÙ¬ÿÿÿÿ
. 0040: 04 00 0d 00 00 01 00 00 02 00 00 00 00 00 00 00 ................
. 0050: 01 00 84 00 00 00 00 00 b0 fa 4c 8d 44 9e ff ff ........°úL.D.ÿÿ
. 0060: 00 00 00 00 00 00 00 00 c7 fe d9 ac ff ff ff ff ........ÇþÙ¬ÿÿÿÿ
In addition, the perf utility has a 'verbose' switch that displays the perf_event_attr struct being passed to the perf_event_open syscall. Here is output from that same sample IBS invocation:
$ sudo perf record -vv --raw-samples -c 100001 -e ibs_op/cnt_ctl=1/pp -a -C 0 taskset -c 0 true
Using CPUID AuthenticAMD-23-31-0
nr_cblocks: 0
affinity: SYS
mmap flush: 1
comp level: 0
------------------------------------------------------------
perf_event_attr:
type 11
size 120
config 0x80000
{ sample_period, sample_freq } 100001
sample_type IP|TID|TIME|CPU|RAW
read_format ID
disabled 1
inherit 1
mmap 1
comm 1
task 1
precise_ip 2
sample_id_all 1
exclude_guest 1
mmap2 1
comm_exec 1
ksymbol 1
bpf_event 1
------------------------------------------------------------
sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 4
Thanks, Kim