Table of Contents
Valkyrie is a graphical front-end to the Valgrind suite of tools for debugging and profiling Linux executables. She has been specifically developed to support Valgrind version 3.0.0 or higher. Currently, the only supported Valgrind tool is Memcheck, but work is under way for Cachegrind and Massif.
Valkyrie uses the Qt widget library, and should run on most reasonably recent Linux setups. The only sine qua non is that you must have:
Qt v.3.2.0 or higher (but not Qt v.4 as yet), and
Valgrind v.3.0.0 or higher.
Valkyrie also contains a program vk_logmerge. Given multiple log files (in xml format) generated by multiple runs on a parallel machine, or multiple log files generated by sequential runs on a single-processor machine, for the same binary, vk_logmerge merges the log files together, discarding duplicates, and outputs the result in a single file. As input, vk_logmerge expects a file containing the list of log-files to be merged, with each entry on a separate line. Log files can be merged from within Valkyrie, or you can use it in non-gui mode by invoking it thus:
vk_logmerge -f <log-file-list> [-o <output-file>]
Issue the command:
valkyrie -h | --help
to see a list of command-line flags.
Valkyrie can be started with flags on the command-line. Below are some examples of common usage.
valkyrie --view-log=log-file
will start up the graphical user interface, with log-file-to-view in the process of being loaded.
valkyrie --merge=log-file-list
will start up the user interface, with log-file-list in the process of being merged.
valkyrie /bin/ls -lF
will start up the user interface. This command differs from the above two in that Valgrind is being called to run the executable ls. The Valgrind tool used is either the default (Memcheck) in the case of a first-time run, or whichever tool you last used.
You can, of course, give any Valgrind flag(s) on the command line:
valkyrie --tool=name --pointercheck=yes --log-file=log-file /bin/ls -lF
See the Options Dialog pages for more information on setting and saving the various flags, options and preferences.
Below are two example screenshots of the result of running valkyrie /bin/ls -lF
The first shows an error opened up for scrutiny. If the file in which the error occurred has read and/or write permissions, and Valgrind was able to determine the /path/to/the/file, an icon will be displayed. If you have write permission on the file, the icon will show a pencil; otherwise it will not. Double-clicking on this icon will launch an editor with the file loaded at the line where the error occurred.
If you do not have read and/or write permissions on the file, the error will still be displayed, but you will not be able to launch an editor.
The second screenshot shows the actual results of running /bin/ls -lF. Client program output is captured from either stdout and stderr.