Massif: a heap profiler
19.63^
###
|
#
|
#
::
|
#
: :::
|
:::::::::#
: :
::
|
:
#
: :
: ::
|
:
#
: :
: : :::
|
:
#
: :
: : :
::
|
:::::::::::
#
: :
: : :
: :::
|
:
:
#
: :
: : :
: :
::
|
:::::
:
#
: :
: : :
: :
: ::
|
@@@:
:
:
#
: :
: : :
: :
: : @
|
::@
:
:
:
#
: :
: : :
: :
: : @
|
:::: @
:
:
:
#
: :
: : :
: :
: : @
|
:::
: @
:
:
:
#
: :
: : :
: :
: : @
|
::: :
: @
:
:
:
#
: :
: : :
: :
: : @
|
:::: : :
: @
:
:
:
#
: :
: : :
: :
: : @
|
:::
: : :
: @
:
:
:
#
: :
: : :
: :
: : @
|
:::: :
: : :
: @
:
:
:
#
: :
: : :
: :
: : @
|
:::
: :
: : :
: @
:
:
:
#
: :
: : :
: :
: : @
0 +----------------------------------------------------------------------->KB
0
29.48
Number of snapshots: 25
Detailed snapshots: [9, 14 (peak), 24]
The size of the graph can be changed with ms_print’s
--x
and
--y
options. Each vertical bar represents a snapshot,
i.e. a measurement of the memory usage at a certain point in time. If the next snapshot is more than one column away,
a horizontal line of characters is drawn from the top of the snapshot to just before the next snapshot column. The text
at the bottom show that 25 snapshots were taken for this program, which is one per heap allocation/deallocation, plus
a couple of extras. Massif starts by taking snapshots for every heap allocation/deallocation, but as a program runs for
longer, it takes snapshots less frequently. It also discards older snapshots as the program goes on; when it reaches
the maximum number of snapshots (100 by default, although changeable with the
--max-snapshots
option) half
of them are deleted. This means that a reasonable number of snapshots are always maintained.
Most snapshots are
normal
, and only basic information is recorded for them. Normal snapshots are represented in the
graph by bars consisting of ’:’ characters.
Some snapshots are
detailed
. Information about where allocations happened are recorded for these snapshots, as we
will see shortly. Detailed snapshots are represented in the graph by bars consisting of ’@’ characters. The text at the
bottom show that 3 detailed snapshots were taken for this program (snapshots 9, 14 and 24). By default, every 10th
snapshot is detailed, although this can be changed via the
--detailed-freq
option.
Finally, there is at most one
peak
snapshot.
The peak snapshot is a detailed snapshot, and records the point where
memory consumption was greatest. The peak snapshot is represented in the graph by a bar consisting of ’#’ characters.
The text at the bottom shows that snapshot 14 was the peak.
Massif’s determination of when the peak occurred can be wrong, for two reasons.
140
Содержание BBV
Страница 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 ...