从性能获取PEBS数据线性地址 [英] Get PEBS data linear address from perf
问题描述
我现在正尝试使用perf来测量PEBS的L3_Miss(LLC错过).
I'm now trying to using perf to measure L3_Miss(LLC Miss) with PEBS.
这是命令:perf record -d -e cpu/event=0xd1,umask=0x20/ppu -c 1 test
,当性能完成时,我使用perf script -F ip,sym,addr
来检查结果.
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.
根据的Nofollow noreferrer> SDM. 3B表18-55. PEBS记录包含一个名为数据线性地址"的字段,代表我需要的负载地址或存储目的地.
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.
我的问题是,我在perf-script
中指定的字段 addr 是否与PEBS记录中的数据线性地址相同?
如果没有,该如何检索该字段? (以及其他相关字段,例如CPU寄存器R8〜R15)
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.我正在使用i7-6700 CPU(Skylake微体系结构)
ps. I'm using i7-6700 CPU (Skylake Microarchitecture)
谢谢,任何建议将不胜感激.
Thanks, and any suggestion will be appreciated.
推荐答案
是的,您是正确的.实际上, perf脚本中的addr字段确实为您提供了PEBS记录中的数据线性地址.如您正确指定的,此数据线性地址与负载源或存储目的地相关联.您在命令perf record -d
中使用的开关 -d 有助于记录访问或写入内存的数据的线性地址.
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.
这种记录数据线性地址的机制是从处理器微体系结构名称 Haswell 开始的,它代替了精确存储事件.它也一直适用于 Skylake .
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.
这篇关于从性能获取PEBS数据线性地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!