Get PEBS data linear address from perf

心不动则不痛 提交于 2019-12-08 11:14:42

问题


I'm now trying to using perf to measure L3_Miss(LLC Miss) with PEBS.

Here is the command: perf record -d -e cpu/event=0xd1,umask=0x20/ppu -c 1 test, and when the perf finished, I using perf script -F ip,sym,addr to check the result.

According to the SDM from intel, Vol. 3B Table 18-55. PEBS record contains a field named Data Linear Address, stands for address of load or destination of store, is what I need.

My question is, the field addr I specified in perf-script is same as Data Linear Address in PEBS record? If not, how to retrieve this field? (and another related field such like CPU register R8~R15)

ps. I'm using i7-6700 CPU (Skylake Microarchitecture)

Thanks, and any suggestion will be appreciated.


回答1:


Yes, you are right. The addr field in perf script does, in fact, give you the data linear address in a PEBS record. This data linear address is associated with the source of the load or the destination of the store, as you correctly specified. The switch -d that you used in your command perf record -d helps to record the linear addresses of the data accessed or written to in memory.

This mechanism to record Data Linear Addresses has started from the processor microarchitecture name Haswell replacing precise-store events. It has carried on to Skylake as well.

If you want to see this in code, here you go.



来源:https://stackoverflow.com/questions/44903459/get-pebs-data-linear-address-from-perf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!