This Time Self-Hosted
dark mode light mode Search

Now I know why there aren’t many valgrind frontends

valgrind has a very nice way to output information in parseable form for the memcheck (the primary) tool: XML.

You don’t really need a custom parser, you just need to read the correct elements and attributes, and you’re done. The format seems actually to provide enough extensibility so that it can be used for every tool, and so I expected.

Starting from this I decided to start working on a new valgrind frontend, in Ruby. To begin with, I started writing the abstraction, and a test suite so that I could make sure what I wrote was what I was expecting to get.

Unfortunately, when I decided to start adding the support for a second tool, to see that my code was doing the right thing with different tools, I discovered that helgrind does not output XML. Nor does massif.

So it seems that to write a frontend to something more than just memcheck (which is what Valkyrie supported), you’d have to parse the plaintext output, which is quite more difficult.

I suppose this is why Valkyrie stopped at supporting memcheck..

At this point, I suppose that to write an Helgrind frontend I’d have to hack at valgrind itself to add XML output to the tool. I think I’ll try that soon enough.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.