This repository contains a new Valgrind tool called "tracegen." tracegen generates full data and instruction traces, that is a trace of all memory reads or writes and all executed instructions, in the CTF format.
Note: This tool is an EXPERIMENTAL PROTOTYPE used for research purposes. It's neither fast nor safe to use. You have been warned!
See the original Valgrind README for full instructions.
./autogen.sh
# adjust the prefix to your preferred location
./configure --prefix=$PWD/inst
make -j8
make install
To generate a data and program trace from YOUR_APPLICATION
, run
mkdir cts-out # you need to create the output directory first
inst/bin/valgrind --tool=tracegen --trace-mem=yes --output-dir=cts-out YOUR_APPLICATION
You can use any CTS-enabled trace viewer, the most basic one is babeltrace.
It's packaged on Ubuntu, install with
sudo apt-get install babeltrace
To get a text log of all traced events, run babeltrace with the directory containing the stream and metadata files as parameter.
babeltrace cts-out
You can also use the Babeltrace Python bindings to process the trace further in Python 3.
Author: Philipp Wagner [email protected]