基于QEMU的RISC-V程序性能分析
CSTR:
作者:
作者单位:

军事科学院国防科技创新研究院

作者简介:

通讯作者:

中图分类号:

基金项目:


RISC-V Program Profiling with QEMU
Author:
Affiliation:

JUNSHIKEXUEYUANGUOFANGKEJICHUANGXINYANJIUYUAN

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    开源指令集规范RISC-V具有模块化、高可定制的特点,可根据特定应用或需求定制指令集,从而优化性能、节约能耗,提高芯片的应用适配性。为了分析目标场景的需求以优化指令集设计,往往需要基于模拟器深入分析目标应用的特点。为此,本文面向RISC-V,提出了一种基于QEMU模拟器的程序性能分析技术,以动态二进制插桩的方式收集程序的运行信息,并结合调试信息进行基本块级和函数级的热点标注。相比于传统的性能分析技术(如Gprof等),本技术具有以下优势:一是不受硬件平台和操作系统的限制,适用于早期的指令集设计阶段;二是考虑了模拟器与真实芯片之间执行指令的差异,引入指令预估代价模型对结果进行修正。此外,本文提出的性能分析技术也可用于指导程序性能优化以及编译优化等。

    Abstract:

    The open-source instruction set specification RISC-V has modular and highly customizable features, which enables customized instruction sets to be designed according to specific applications or requirements, thereby optimizing performance, saving energy consumption and improving the application adaptability of chips. In order to analyze the requirements of the target scenario and optimize the instruction set design, it is often necessary to analyze the characteristics of the target application in depth based on a simulator. In light of this, the current study proposes a program profiling technique based on the QEMU simulator for RISC-V, which collects the program""s running information dynamically by binary instrumentation, and combines it with debugging information to mark hotspots at the basic block and function levels. Compared with traditional profiling techniques such as GProf, this technique has the following advantages:firstly, it is independent of hardware platform and operating system, and suitable for the early stage of instruction set design; secondly, it considers the difference between the execution of instructions on the simulator and the real chip, and introduces an instruction estimation cost model to correct the results. In addition, the performance analysis technique proposed in this study can also be used to guide program performance optimization and compilation optimization, etc.

    参考文献
    相似文献
    引证文献
引用本文
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2023-11-22
  • 最后修改日期:2023-12-14
  • 录用日期:
  • 在线发布日期: 2024-03-27
  • 出版日期:
文章二维码