A powerful source code instrumentation tool designed for MT3000 processors, enabling detailed performance analysis through time profiling and memory access pattern detection.
- Memory Access Instrumentation: Analyzes memory access patterns
- Tracks array accesses and pointer dereferences
- Identifies dominant access patterns
- Calculates access frequencies and stride patterns
- Supports analysis of specific target functions
- LLVM and Clang (installed via Homebrew)
- C++17 compatible compiler
- MT3000 development environment
- Ensure LLVM and Clang are installed:
brew install llvm- Clone the repository:
git clone https://github.com/yourusername/mt3000-inst.git
cd mt3000-inst- Build the project:
make./bin/MemProfMT input.c -o instrumented_output.c-target-funcs # Specify target functions (comma-separated)
-o <filename> # Specify output filename
-- # Separator for compiler optionsThe memory instrumentation provides:
- Access pattern analysis for arrays and pointers
- Stride pattern detection
- Access frequency statistics
- Per-variable memory access reports
Example output:
[Memory Analysis] array_a in process_data: elements=1000, accesses=5000
Pattern 1: step=1 (95.2%)
Pattern 2: step=32 (4.8%)
- Uses Clang's LibTooling for source code instrumentation
- Supports multi-threaded applications (up to 24 threads)
- Provides accurate memory access tracking with minimal overhead
- Currently supports C/C++ source files only
- Memory instrumentation limited to arrays, pointers, and struct members
- Maximum of 16 different access patterns per variable