Skip to content
Memory Trace and Analysis Tool
C++ Python M4 Makefile C Shell CMake
Branch: master
Clone or download

Latest commit

Latest commit a00cf05 Feb 27, 2020


Type Name Latest commit message Commit time
Failed to load latest commit information.
m4 Added files Jun 5, 2018
scripts Mat memory graph Jul 26, 2018
test Enfourced to use clang Oct 1, 2018
.gitignore Add .gitignore Feb 27, 2020
LICENSE Update LICENSE Feb 26, 2020 Added files Jun 5, 2018
NOTICE Add NOTICE file Feb 26, 2020 README update Feb 26, 2020 Enfourced to use clang Oct 1, 2018

MAT: Memory Analysis Tool (Alpha version)

Note: This tool is still alpha version.

This tool traces all memory accesses to stack(Static allocation)/heap(Dynamic allocation) on a trace run in a particular hardware and then estimates execution time on given arbitrary hardware configurations for hardware design space exploration.


Quick Start

1. Building MAT

$ MAT_DIR=<path to installation directory>
$ ./
$ ./configure --with-gotcha=<path to GOTCHA directory> --prefix=$MAT_DIR
$ make
$ make install

2. Tracing and analysing memory access under MAT

$ cd test
$ mkdir mat_llvm_trace
$ ./ #for quick help
$ ./ 1 #for tracing simple test code
$ ./ 5 ./mat_llvm_trace/*/trace-0.mat #for computing reuse distance
$ ./ 6 ./mat_llvm_trace/*/trace-0.mat 0 > trace-0.txt #for printing out memory access in text
$ less ./trace-0.txt #for checking memory access in text

Trace Format

in binary format (trace-0.mat)

|trace type(int)|id(size_t)|thread id(int)|memory access type(int)|head address of the buffer(void*)|allocated size for the buffer(size_t)|accessed address(void*)|accessed size in bytes(size_t)|# of instructions executed from the last memory access(int)|

in text format (trace-0.txt)

<id> <accessed address> <offset> <head address> <is_read> <accessed size in bytes> <allocated size for the buffer> <thread id>



MAT is distributed under the terms of the Apache-2.0 license. See LICENSE and NOTICE for details.

SPDX-License-Identifier: Apache-2.0


You can’t perform that action at this time.