Valgrind 3.15.0 with improved DHAT heap profiler
Julian Seward released valgrind 3.15.0 which updates support for existing platforms and adds a major overhaul of the DHAT heap profiler. There are, as ever, many refinements and bug fixes. The release notes give more details.
Nicholas Nethercote used the old experimental DHAT tool a lot while profiling the Rust compiler and then decided to write and contribute A better DHAT (which contains a screenshot of the the new graphical viewer).
CORE CHANGES
- The XTree Massif output format now makes use of the information obtained when specifying
--read-inline-info=yes. - amd64 (x86_64): the RDRAND and F16C insn set extensions are now supported.
TOOL CHANGES
DHAT
- DHAT been thoroughly overhauled, improved, and given a GUI. As a result, it has been promoted from an experimental tool to a regular tool. Run it with
--tool=dhatinstead of--tool=exp-dhat. - DHAT now prints only minimal data when the program ends, instead writing the bulk of the profiling data to a file. As a result, the
--show-top-nand--sort-byoptions have been removed. - Profile results can be viewed with the new viewer, dh_view.html. When a run ends, a short message is printed, explaining how to view the result.
- See the documentation for more details.
Cachegrind
cg_annotatehas a new option,--show-percs, which prints percentages next to all event counts.
Callgrind
callgrind_annotatehas a new option,--show-percs, which prints percentages next to all event counts.callgrind_annotatenow inserts commas in call counts, and sort the caller/callee lists in the call tree.
Massif
- The default value for
--read-inline-infois nowyeson Linux/Android/Solaris. It is stillnoon other OS.
Memcheck
- The option
--xtree-leak=yes(to output leak result in xtree format) automatically activates the option--show-leak-kinds=all, as xtree visualisation tools such as kcachegrind can in any case select what kind of leak to visualise. - There has been further work to avoid false positives. In particular, integer equality on partially defined inputs (C
==and!=) is now handled better.
OTHER CHANGES
- The new option
--show-error-list=no|yesdisplays, at the end of the run, the list of detected errors and the used suppressions. Prior to this change, showing this information could only be done by specifying-v -v, but that also produced a lot of other possibly-non-useful messages. The option-sis equivalent to--show-error-list=yes.