perf tutorials के अनुसार, perf stat
हार्डवेयर काउंटर का उपयोग कर कैश मिस की रिपोर्ट करना है। हालांकि, मेरे सिस्टम (अप-टू-डेट आर्क लिनक्स) पर, यह नहीं है:रिपोर्ट कैश मिस क्यों नहीं करता है?
[[email protected] goog]$ perf stat ./hash
Performance counter stats for './hash':
869.447863 task-clock # 0.997 CPUs utilized
92 context-switches # 0.106 K/sec
4 cpu-migrations # 0.005 K/sec
1,041 page-faults # 0.001 M/sec
2,628,646,296 cycles # 3.023 GHz
819,269,992 stalled-cycles-frontend # 31.17% frontend cycles idle
132,355,435 stalled-cycles-backend # 5.04% backend cycles idle
4,515,152,198 instructions # 1.72 insns per cycle
# 0.18 stalled cycles per insn
1,060,739,808 branches # 1220.015 M/sec
2,653,157 branch-misses # 0.25% of all branches
0.871766141 seconds time elapsed
मुझे क्या याद आ रही है? मैंने पहले से ही मैन पेज और वेब की खोज की है, लेकिन कुछ भी स्पष्ट नहीं मिला।
संपादित करें: मेरा सीपीयू एक इंटेल i5 2300K है, यदि यह मायने रखता है।
यह आपके हार्डवेयर काउंटर पर निर्भर करता है। मैंने कभी भी 'perf' का उपयोग नहीं किया है, लेकिन मैंने 'PAPI' (http://icl.cs.utk.edu/PAPI/) का उपयोग किया है और यह पता लगाने के लिए उपलब्ध हार्डवेयर काउंटरों को जांचना संभव है कि आप क्या प्राप्त कर सकते हैं आपका सीपीयू – SamGamgee
'perf stat-d' आज़माएं - यह कुछ कैश घटनाओं की रिपोर्ट करेगा। रिकॉर्ड/रिपोर्ट मेमोरी इवेंट्स के लिए नया 'perf mem' टूल भी देखें - http://www.linuxtag.org/2013/fileadmin/www.linuxtag.org/slides/Arnaldo_Melo_-_Linux__perf__tools__Overview_and_Current_Developments.e323.pdf स्लाइड 10 और http में प्रलेखित : //man7.org/linux/man-pages/man1/perf-mem.1.html – osgx
osgx, 'perf stat -d' ईवेंट मल्टीप्लेक्सिंग चालू करेगा, जो कभी-कभी गलत दरों की रिपोर्ट कर सकता है। प्रति रन 5-7 एचडब्ल्यू घटनाओं को मैन्युअल रूप से चुनना बेहतर है; और केवल ऐसी घटनाओं के नाम प्राप्त करने के लिए perf stat -d का उपयोग करें। इंटेल के लिए अन्य तरीका - https://github.com/andikleen/pmu-tools – osgx