Abstract:
This paper designs and implements Perf on Loongson 2F. Perf is a tuning tool on linux. It analyses the implementation of Perf, and modifies the codes related to hardware architecture. It designs functions to control the performance counter in Loongson 2F and handle the overflow interruptions. The results of matrix multiplication sampled by Perf are close to the theoretical values, and more accurate than these sampled by Oprofile.
Key words:
performance counter,
Loongson 2F platform,
Perf,
overflow interrupt,
front-end,
back-end
摘要: 在龙芯2F平台上设计并实现性能调优工具Perf。分析Perf的实现原理,针对龙芯修改Perf内核层中体系相关部分代码,设计硬件性能计数器的操作函数集和溢出中断处理函数。使用Perf分析矩阵相乘测试用例,结果表明Perf得到的采样结果接近理论值,与Oprofile相比,采样数据更精确。
关键词:
性能计数器,
龙芯2F平台,
Perf工具,
溢出中断,
前端,
后端
CLC Number:
XU Heng-Yang, AN Gong, LIU Yu, ZHOU Wei. Design and Implementation of Perf on Loongson 2F[J]. Computer Engineering, 2011, 37(19): 236-238.
徐恒阳, 安虹, 刘玉, 周伟. Perf在龙芯2F上的设计与实现[J]. 计算机工程, 2011, 37(19): 236-238.