Red Hat Developer Toolset 2.0 is distributed with Valgrind 3.8.1, which provides a number of bug fixes over the version included in Red Hat Developer Toolset 1.1. Below is a comprehensive list of changes in this release.
The following features have been added since the release of Valgrind included in Red Hat Developer Toolset 1.1:
- The DWARF debug information for Valgrind is now distributed in a separate package, devtoolset-2-valgrind-debuginfo.
- The SGCHECK OPTIONS section of the
valgrind(1) manual page has been corrected and no longer includes the BBV options. As well, the BBV options are now listed in a separate section.
In addition to the above changes, the following features have been added since the release of Valgrind 3.5.0 included in Red Hat Enterprise Linux 5.9:
- When running in 64-bit mode, Valgrind now supports the SSE4.2 instruction set with the exception of SSE4.2 AES instructions. In 32-bit mode, Valgrind only provides support up to and including the SSSE3 instruction set.
- A new processing script cg_diff has been added to Cachegrind. This processing script can find the difference between two profiles, and can therefore be used to evaluate the performance effects of a change in a program.
- The behavior of the cg_annotate's rarely-used
--thresholdoption has been changed. - Callgrind now supports branch prediction simulation and can optionally count the number of executed global bus events. Note that in order to use this functionality for a better approximation of a “Cycle Estimation” as a derived event, you must manually update the event formula in KCachegrind.
- To accommodate machines with three levels of caches, both Cachegrind and Callgrind now refer to the LL (last-level) cache rather than the L2 cache. When Cachegrind or Callgrind auto-detects the cache configuration of such a machine, it now runs the simulation as if the L2 cache is not present. Consequently, the results are less likely to match the true result for the machine and should not be considered authoritative, but provide a general idea about a program's locality.
- A new command line option
--pages-as-heaphas been added to Massif. When this option is enabled, Massif tracks memory allocations at the level of memory pages (as mapped bymmap,brkand similar functions) instead of tracking allocations at the level of heap blocks (as allocated withmalloc,new, ornew[]). Each mapped page is treated as its own block. Interpreting the page-level output is harder than the heap-level output, but allows you to account for every byte of memory used by a program. By default, the--pages-as-heapoption is disabled. - New command line options
--free-is-writeand--trace-allochave been added to DRD. The--free-is-writeoption allows you to detect reading from already freed memory, the--trace-alloccan be used to trace of all memory allocations and deallocations. - A number of new allocations have been added to DRD. As well, you can now annotate custom barrier implementations and benign races on static variables.
- DRD's happens before and happens after annotations have been enhanced and can be used to annotate, for example, a smart pointer implementation.
- Helgrind's annotation set has been significantly improved to provide a general set of annotations to describe locks, semaphores, barriers, and condition variables. In addition, Helgrind now supports annotations to describe thread-safe reference counted heap objects.
- A new command line option
--show-possibly-losthas been added to Memcheck. By default this option is enabled and causes the leak detector to show possibly-lost blocks. - A new experimental heap profiler, DHAT (Dynamic Heap Analysis Tool), has been added. DHAT keeps track of allocated heap blocks, and also inspects every memory reference to see which block (if any) is being accessed. This gives a lot of insight into block lifetimes, utilization, turnover, liveness, and the location of hot and cold fields. You can use DHAT to do hot-field profiling.
- Support for unfriendly self-modifying code has been improved, and the extra overhead incurred by
--smc-check=allhas been reduced by approximately a factor of 5 as compared with the previous version of Valgrind. - A new command line option
--fullpath-afterhas been added. This option can be used to display directory names for source files in error messages, and is combined with a flexible mechanism for specifying which parts of the paths should be shown. - A new command line option
--require-text-symbolhas been added. This option stops the execution if a specified symbol is not found in a given shared object when loaded into the process. As a result, working with function intercepting and wrapping is now safer and more reliable. - Valgrind now implements more reliable stack unwinding on amd64-linux, particularly in the presence of function wrappers, and with gcc-4.5 compiled code.
- Valgrind now implements modest scalability (performance improvements) for very large, long-running applications.
- Valgrind now provides improved support for analyzing programs that are running in Wine. Users can now include the
valgrind/valgrind.h,valgrind/memcheck.h, andvalgrind/drd.hheader files in Windows programs that are compiled with MinGW or one of the Microsoft Visual Studio compilers.