本文提出了一种全新的获得访存trace的方式,并设计实现了基于硬件的零开销多平台实时访存Trace工具——MTT(Memory Trace Tool)。详细介绍了MTT在采样配置、地址识别、trace输出等方面的设计细节,以及接收端配合MTT高效接收分析trace的流程,实现了一个通过MTT获得程序访存trace的完整方案。相比已有方法,MTT具有许多特点:(1)对程序透明;(2)零开销,无内存污染问题;(3)实时获取完整的全系统访存Trace;(4)可实时配置的多种在线Trace分析手段;(5)具有操作系统平台无关性。
We propose a new approach to track memory reference trace and present a hardware-based Memory Trace Tool (MTY) for real systems. This paper details the design of MTT, including sampling configure, translating address, outputting trace and analysis of memory trace, which implement a complete solution to acquire and analyze memory reference trace. Compared to existing methods, MTT has several features: (1) be transparent to applications and system software; (2) be nearly zero-overhead and no pollutions; (3)be available to obtain fuU-system trace on real systems; (4)provide various online analysis approaches; and (5) be independent of system platform, support different CPU and OS platform.