The Valgrind simulation program has a lot of options and for many of them it supplies an XML output option, though not so for the basic “lackey” option that allow one to look at basic memory reads and writes.
I need some XML output from that – it’s simply easier to manipulate and interpret the output (eg to transform into a graph) when you can use a known and well supported format. So I wrote some code to do that and defined a new format – lackeyml.
First run Valgrind and output the raw text to a file (using xterm here as the targeted application):
valgrind --tool=lackey --trace-mem=yes --log-file=xtlackey.txt xterm
Then run the groovy script against that file:
groovy lackey_xml.groovy xtlackey.txt
If, and when, I get the next stage right – producing an SVG from the output, I’ll post that on the blog also.
- Eighteen million lines of XML! (cartesianproduct.wordpress.com)
- Feature of the Week: API outputs JSON instead of XML (bibsonomy.blogspot.com)
- XSLT Transformation to analyze MSSQL Server 2005 traces (consultuning.blogspot.com)