10. DHAT: a dynamic heap analysis tool
To use this tool, you must specify
--tool=exp-dhat
on the Valgrind command line.
10.1. Overview
DHAT is a tool for examining how programs use their heap allocations.
It tracks the allocated blocks, and inspects every memory access to find which block, if any, it is to. The following
data is collected and presented per allocation point (allocation stack):
• Total allocation (number of bytes and blocks)
• maximum live volume (number of bytes and blocks)
• average block lifetime (number of instructions between allocation and freeing)
• average number of reads and writes to each byte in the block ("access ratios")
• for allocation points which always allocate blocks only of one size, and that size is 4096 bytes or less: counts
showing how often each byte offset inside the block is accessed.
Using these statistics it is possible to identify allocation points with the following characteristics:
• potential process-lifetime leaks: blocks allocated by the point just accumulate, and are freed only at the end of the
run.
• excessive turnover: points which chew through a lot of heap, even if it is not held onto for very long
• excessively transient: points which allocate very short lived blocks
• useless or underused allocations: blocks which are allocated but not completely filled in, or are filled in but not
subsequently read.
• blocks with inefficient layout -- areas never accessed, or with hot fields scattered throughout the block.
149
Содержание Software
Страница 176: ...Valgrind FAQ Release 3 8 0 10 August 2012 Copyright 2000 2012 Valgrind Developers Email valgrind valgrind org ...
Страница 177: ...Valgrind FAQ Table of Contents Valgrind Frequently Asked Questions 1 ii ...
Страница 302: ...README mips based on newer GCC versions if possible 95 ...
Страница 303: ...GNU Licenses ...
Страница 304: ...GNU Licenses Table of Contents 1 The GNU General Public License 1 2 The GNU Free Documentation License 8 ii ...