Efficient Instruction Tracing Based on QEMU
CSTR:
Author:
Affiliation:

Clc Number:

Fund Project:

  • Article
  • |
  • Figures
  • |
  • Metrics
  • |
  • Reference
  • |
  • Related
  • |
  • Cited by
  • |
  • Materials
  • |
  • Comments
    Abstract:

    The system emulator creates a virtual environment by emulating hardware resources such as processor, memory, and peripherals, which can support software running and debugging of different architectures and greatly shorten the cross-architecture software development cycle. The emulator usually supports instruction tracing and can be employed for analysis by recording the instruction sequence of program running, such as running time evaluation and behavior pattern analysis related to the program, and joint emulation of software and hardware. As the mainstream emulators supporting RISC-V architecture, both QEMU and Spike support instruction tracing. However, they are time- and space-expensive and inefficient when dealing with large-scale applications. Thus, this study proposes an instruction tracing technology with QEMU. When instructions are traced without distortion, static information such as basic blocks and control flow charts in the program is decoupled from branch selection and other dynamic information. Compared with the native instruction tracing implemented by QEMU, the proposed technology reduces the time overhead by more than 80% and the space overhead by more than 95%. Additionally, based on RISC-V architecture, this study realizes off-line analysis of instruction sequences in various scenarios, such as instruction classification statistics, program hotspot marking, and program behavior analysis.

    Reference
    Related
    Cited by
Get Citation

王涛,秦宵宵,徐学政,王璐,方健.基于QEMU的高效指令追踪技术.计算机系统应用,2023,32(11):3-10

Copy
Share
Article Metrics
  • Abstract:
  • PDF:
  • HTML:
  • Cited by:
History
  • Received:March 29,2023
  • Revised:June 27,2023
  • Adopted:
  • Online: September 15,2023
  • Published:
Article QR Code
You are the firstVisitors
Copyright: Institute of Software, Chinese Academy of Sciences Beijing ICP No. 05046678-3
Address:4# South Fourth Street, Zhongguancun,Haidian, Beijing,Postal Code:100190
Phone:010-62661041 Fax: Email:csa (a) iscas.ac.cn
Technical Support:Beijing Qinyun Technology Development Co., Ltd.

Beijing Public Network Security No. 11040202500063