问题描述
我有一个测试用例,可以观察
I have a test case to observe perf iTLB-loads,iTLB-load-misses by
perf stat -e dTLB-loads,dTLB-load-misses,iTLB-loads,iTLB-load-misses -p 22479
并获得输出:
进程ID为"22479"的性能计数器统计信息:
Performance counter stats for process id '22479':
1,262,817 dTLB-loads
13,950 dTLB-load-misses # 1.10% of all dTLB cache hits
75 iTLB-loads
6,882 iTLB-load-misses # 9176.00% of all iTLB cache hits
3.999720948 seconds time elapsed
我不知道如何仅解释75个iTLB负载,但是6 882个iTLB负载缺失?!
I have no idea how to interpret iTLB-loads only 75 but iTLB-load-misses 6,882 ?!
lscpu显示:2.10GHz @ Intel(R)Xeon(R)CPU E5-2620 v4
lscpu showes : Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
我可以解释如下:
iTLB加载次数是(75 + 6882)次,有75次命中,但有6882次未命中吗?
do (75+6882) times of iTLB-loads , there are 75 times hits but 6882 times misses ?
ocperf.py list | wc -l
Downloading https://download.01.org/perfmon/mapfile.csv to mapfile.csv
Traceback (most recent call last):
File "/home/marschen/tools/pmu-tools-master/ocperf.py", line 1012, in <module>
emap = find_emap()
File "/home/marschen/tools/pmu-tools-master/ocperf.py", line 831, in find_emap
event_download.download(el, toget)
File "/home/marschen/tools/pmu-tools-master/event_download.py", line 105, in download
getfile(modelpath, dir, "mapfile.csv")
File "/home/marschen/tools/pmu-tools-master/event_download.py", line 86, in getfile
f = urlopen(url)
File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib64/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/usr/lib64/python2.7/urllib2.py", line 1258, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/lib64/python2.7/urllib2.py", line 1211, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/usr/lib64/python2.7/httplib.py", line 1017, in request
self._send_request(method, url, body, headers)
File "/usr/lib64/python2.7/httplib.py", line 1051, in _send_request
self.endheaders(body)
File "/usr/lib64/python2.7/httplib.py", line 1013, in endheaders
self._send_output(message_body)
File "/usr/lib64/python2.7/httplib.py", line 864, in _send_output
self.send(msg)
File "/usr/lib64/python2.7/httplib.py", line 826, in send
self.connect()
File "/usr/lib64/python2.7/httplib.py", line 1227, in connect
HTTPConnection.connect(self)
File "/usr/lib64/python2.7/httplib.py", line 807, in connect
self.timeout, self.source_address)
File "/usr/lib64/python2.7/socket.py", line 562, in create_connection
sock.connect(sa)
File "/usr/lib64/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
推荐答案
在Broadwell处理器上,性能将iTLB-loads
映射到ITLB_MISSES.STLB_HIT
,这表示TLB查找事件错过了L1 ITLB但撞到了统一的TLB (c2)至ITLB_MISSES.MISS_CAUSES_A_WALK
(代表所有页面尺寸),这表示TLB查找事件同时丢失了所有页面尺寸的L1 ITLB和统一的TLB(导致页面遍历).因此,iTLB-load-misses
可以大于或小于或等于iTLB-loads
.它们是独立的事件.
On your Broadwell processor, perf maps iTLB-loads
to ITLB_MISSES.STLB_HIT
, which represents the event of a TLB lookup that misses the L1 ITLB but hits the unified TLB for all page sizes, and iTLB-load-misses
to ITLB_MISSES.MISS_CAUSES_A_WALK
, which represents the event of a TLB lookup that misses both the L1 ITLB and the unified TLB (causing a page walk) for all page sizes. Therefore, iTLB-load-misses
can be larger or smaller than or equal to iTLB-loads
. They are independent events.
这篇关于如何解释性能iTLB负载,iTLB负载缺失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!