Version: unspecified OS: Linux Enable XML output on drd tool is going to allow easy integration with GUI tools. One example of tool which might take advantage of an XML output is the Linux Tools Valgrind plug-in for Eclipse IDE (http://www.eclipse.org/linuxtools/projectPages/valgrind) Some Valgrind tools (e.g Helgrind, memcheck) already support XML output via any of --xml, --xml-fd, --xml-file or --xml-socket flags. So the idea is to use the already existing Valgrind's infrastructure for XML-formatted reports on the drd tool. Reproducible: Didn't try Expected Results: $ valgrind --tool=drd --exclusive-threshold=<threshold> --xml-file=output.xml <application> $ valgrind --tool=drd --exclusive-threshold=<threshold> --xml <application>
Does the attached patch (which is relative to trunk r12106) allow to construct a tool that uses the DRD XML output in a useful way ?
Created attachment 64252 [details] Enable XML output for DRD.
Hi Bart, Yes, it does. I've applied attached patch and tested it against some drd testcases. The options --xml-file and --xml-fd seems to work fine. However, I didn't test the --xml-socket option. Do you plan to document the XML format somewhere? Thank your for promptly code this feature.
XML output support has been added as r12137. To do: document the output format.
Bart, also add a brief comment in the NEWS file mentioning this, if you didn't already.
(In reply to comment #3) > Do you plan to document the XML format somewhere? A document called drd/docs/drd-xml-output.xsd has been added via r12147. Is that sufficient as documentation ?
(In reply to comment #5) > Bart, also add a brief comment in the NEWS file mentioning > this, if you didn't already. See also r12150.
(In reply to comment #6) > (In reply to comment #3) > > Do you plan to document the XML format somewhere? > > A document called drd/docs/drd-xml-output.xsd has been added via r12147. Is > that sufficient as documentation ? Yes, I've review and it seems find. Thanks!
Hi Bart, I've found a problem with xml options when I've checked out latest Valgrind sources today: $ ../vg-in-place --tool=drd --xml=yes tests/annotate_hb_race valgrind: Bad option: --xml=yes, but no XML destination specified valgrind: --xml=yes has been specified, but there is no XML output valgrind: destination. You must specify an XML output destination valgrind: using --xml-fd, --xml-file or --xml-socket. valgrind: Use --help for more information or consult the user manual. OK, It says says I need to also place --xml-fd, --xml-file or --xml-socket. Now: $ ../vg-in-place --tool=drd --xml=yes --xml-fd=/dev/fd/1 tests/annotate_hb_race valgrind: Bad option: --xml-fd=/dev/fd/1 valgrind: Use --help for more information or consult the user manual. It says there isn't --xml-fd option. I tried with --xml-file and it works fine.
The argument for --xml-fd is a number, not a path. This works here: $ ../vg-in-place --tool=drd --xml=yes --xml-fd=1 tests/annotate_hb_race <?xml version="1.0"?> <valgrindoutput> [ ... ]
(In reply to comment #10) > The argument for --xml-fd is a number, not a path. This works here: > > $ ../vg-in-place --tool=drd --xml=yes --xml-fd=1 tests/annotate_hb_race > <?xml version="1.0"?> > > <valgrindoutput> > [ ... ] Hey Bart, My bad, you are right. I can see it now.