mirror of
https://github.com/ioacademy-jikim/debugging
synced 2026-08-31 09:49:38 +00:00
first commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1,128 @@
|
||||
massif_x86_linux-ms_main.o: ms_main.c /usr/include/stdc-predef.h \
|
||||
../include/pub_tool_basics.h ../VEX/pub/libvex_basictypes.h \
|
||||
/usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h ../include/pub_tool_vki.h \
|
||||
../include/vki/vki-linux.h ../include/vki/vki-posixtypes-x86-linux.h \
|
||||
../include/vki/vki-x86-linux.h ../include/vki/vki-linux-drm.h \
|
||||
../include/vki/vki-xen.h ../include/vki/vki-xen-x86.h \
|
||||
../include/vki/vki-xen-domctl.h ../include/vki/vki-xen-sysctl.h \
|
||||
../include/vki/vki-xen-mmuext.h ../include/vki/vki-xen-schedop.h \
|
||||
../include/vki/vki-xen-memory.h ../include/vki/vki-xen-evtchn.h \
|
||||
../include/vki/vki-xen-gnttab.h ../include/vki/vki-xen-version.h \
|
||||
../include/vki/vki-xen-hvm.h ../include/vki/vki-xen-tmem.h \
|
||||
../include/vki/vki-xen-xsm.h ../include/vki/vki-xen-physdev.h \
|
||||
../include/pub_tool_aspacemgr.h ../include/pub_tool_basics.h \
|
||||
../include/pub_tool_debuginfo.h ../include/pub_tool_xarray.h \
|
||||
../include/pub_tool_hashtable.h ../include/pub_tool_libcbase.h \
|
||||
../include/pub_tool_libcassert.h ../include/pub_tool_libcfile.h \
|
||||
../include/pub_tool_vki.h ../include/pub_tool_libcprint.h \
|
||||
../include/pub_tool_libcproc.h ../include/pub_tool_machine.h \
|
||||
../VEX/pub/libvex.h ../VEX/pub/libvex_basictypes.h \
|
||||
../VEX/pub/libvex_ir.h ../include/pub_tool_mallocfree.h \
|
||||
../include/pub_tool_options.h ../include/pub_tool_replacemalloc.h \
|
||||
../include/pub_tool_stacktrace.h ../include/pub_tool_threadstate.h \
|
||||
../include/pub_tool_tooliface.h ../include/pub_tool_errormgr.h \
|
||||
../include/pub_tool_execontext.h ../include/pub_tool_xarray.h \
|
||||
../include/pub_tool_clientstate.h ../include/pub_tool_gdbserver.h \
|
||||
../include/pub_tool_clreq.h ../include/valgrind.h
|
||||
|
||||
/usr/include/stdc-predef.h:
|
||||
|
||||
../include/pub_tool_basics.h:
|
||||
|
||||
../VEX/pub/libvex_basictypes.h:
|
||||
|
||||
/usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h:
|
||||
|
||||
../include/pub_tool_vki.h:
|
||||
|
||||
../include/vki/vki-linux.h:
|
||||
|
||||
../include/vki/vki-posixtypes-x86-linux.h:
|
||||
|
||||
../include/vki/vki-x86-linux.h:
|
||||
|
||||
../include/vki/vki-linux-drm.h:
|
||||
|
||||
../include/vki/vki-xen.h:
|
||||
|
||||
../include/vki/vki-xen-x86.h:
|
||||
|
||||
../include/vki/vki-xen-domctl.h:
|
||||
|
||||
../include/vki/vki-xen-sysctl.h:
|
||||
|
||||
../include/vki/vki-xen-mmuext.h:
|
||||
|
||||
../include/vki/vki-xen-schedop.h:
|
||||
|
||||
../include/vki/vki-xen-memory.h:
|
||||
|
||||
../include/vki/vki-xen-evtchn.h:
|
||||
|
||||
../include/vki/vki-xen-gnttab.h:
|
||||
|
||||
../include/vki/vki-xen-version.h:
|
||||
|
||||
../include/vki/vki-xen-hvm.h:
|
||||
|
||||
../include/vki/vki-xen-tmem.h:
|
||||
|
||||
../include/vki/vki-xen-xsm.h:
|
||||
|
||||
../include/vki/vki-xen-physdev.h:
|
||||
|
||||
../include/pub_tool_aspacemgr.h:
|
||||
|
||||
../include/pub_tool_basics.h:
|
||||
|
||||
../include/pub_tool_debuginfo.h:
|
||||
|
||||
../include/pub_tool_xarray.h:
|
||||
|
||||
../include/pub_tool_hashtable.h:
|
||||
|
||||
../include/pub_tool_libcbase.h:
|
||||
|
||||
../include/pub_tool_libcassert.h:
|
||||
|
||||
../include/pub_tool_libcfile.h:
|
||||
|
||||
../include/pub_tool_vki.h:
|
||||
|
||||
../include/pub_tool_libcprint.h:
|
||||
|
||||
../include/pub_tool_libcproc.h:
|
||||
|
||||
../include/pub_tool_machine.h:
|
||||
|
||||
../VEX/pub/libvex.h:
|
||||
|
||||
../VEX/pub/libvex_basictypes.h:
|
||||
|
||||
../VEX/pub/libvex_ir.h:
|
||||
|
||||
../include/pub_tool_mallocfree.h:
|
||||
|
||||
../include/pub_tool_options.h:
|
||||
|
||||
../include/pub_tool_replacemalloc.h:
|
||||
|
||||
../include/pub_tool_stacktrace.h:
|
||||
|
||||
../include/pub_tool_threadstate.h:
|
||||
|
||||
../include/pub_tool_tooliface.h:
|
||||
|
||||
../include/pub_tool_errormgr.h:
|
||||
|
||||
../include/pub_tool_execontext.h:
|
||||
|
||||
../include/pub_tool_xarray.h:
|
||||
|
||||
../include/pub_tool_clientstate.h:
|
||||
|
||||
../include/pub_tool_gdbserver.h:
|
||||
|
||||
../include/pub_tool_clreq.h:
|
||||
|
||||
../include/valgrind.h:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,100 @@
|
||||
include $(top_srcdir)/Makefile.tool.am
|
||||
|
||||
EXTRA_DIST = \
|
||||
docs/ms-manual.xml \
|
||||
docs/ms_print-manpage.xml
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Headers, etc
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
bin_SCRIPTS = ms_print
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# massif-<platform>
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
noinst_PROGRAMS = massif-@VGCONF_ARCH_PRI@-@VGCONF_OS@
|
||||
if VGCONF_HAVE_PLATFORM_SEC
|
||||
noinst_PROGRAMS += massif-@VGCONF_ARCH_SEC@-@VGCONF_OS@
|
||||
endif
|
||||
|
||||
MASSIF_SOURCES_COMMON = ms_main.c
|
||||
|
||||
massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_SOURCES = \
|
||||
$(MASSIF_SOURCES_COMMON)
|
||||
massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS = \
|
||||
$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_DEPENDENCIES = \
|
||||
$(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDADD = \
|
||||
$(TOOL_LDADD_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS = \
|
||||
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LINK = \
|
||||
$(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
|
||||
@VALT_LOAD_ADDRESS_PRI@ \
|
||||
$(LINK) \
|
||||
$(massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_CFLAGS) \
|
||||
$(massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_LDFLAGS)
|
||||
|
||||
if VGCONF_HAVE_PLATFORM_SEC
|
||||
massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_SOURCES = \
|
||||
$(MASSIF_SOURCES_COMMON)
|
||||
massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS = \
|
||||
$(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_DEPENDENCIES = \
|
||||
$(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDADD = \
|
||||
$(TOOL_LDADD_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS = \
|
||||
$(TOOL_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LINK = \
|
||||
$(top_builddir)/coregrind/link_tool_exe_@VGCONF_OS@ \
|
||||
@VALT_LOAD_ADDRESS_SEC@ \
|
||||
$(LINK) \
|
||||
$(massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_CFLAGS) \
|
||||
$(massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_LDFLAGS)
|
||||
endif
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# vgpreload_massif-<platform>.so
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
noinst_PROGRAMS += vgpreload_massif-@VGCONF_ARCH_PRI@-@VGCONF_OS@.so
|
||||
if VGCONF_HAVE_PLATFORM_SEC
|
||||
noinst_PROGRAMS += vgpreload_massif-@VGCONF_ARCH_SEC@-@VGCONF_OS@.so
|
||||
endif
|
||||
|
||||
if VGCONF_OS_IS_DARWIN
|
||||
noinst_DSYMS = $(noinst_PROGRAMS)
|
||||
endif
|
||||
|
||||
vgpreload_massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_SOURCES =
|
||||
vgpreload_massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
vgpreload_massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_CFLAGS = \
|
||||
$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
vgpreload_massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_DEPENDENCIES = \
|
||||
$(LIBREPLACEMALLOC_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
vgpreload_massif_@VGCONF_ARCH_PRI@_@VGCONF_OS@_so_LDFLAGS = \
|
||||
$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) \
|
||||
$(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_PRI_CAPS@)
|
||||
|
||||
if VGCONF_HAVE_PLATFORM_SEC
|
||||
vgpreload_massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_SOURCES =
|
||||
vgpreload_massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CPPFLAGS = \
|
||||
$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
vgpreload_massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_CFLAGS = \
|
||||
$(AM_CFLAGS_PSO_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
vgpreload_massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_DEPENDENCIES = \
|
||||
$(LIBREPLACEMALLOC_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
vgpreload_massif_@VGCONF_ARCH_SEC@_@VGCONF_OS@_so_LDFLAGS = \
|
||||
$(PRELOAD_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) \
|
||||
$(LIBREPLACEMALLOC_LDFLAGS_@VGCONF_PLATFORM_SEC_CAPS@)
|
||||
endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,971 @@
|
||||
<?xml version="1.0"?> <!-- -*- sgml -*- -->
|
||||
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[ <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]>
|
||||
|
||||
|
||||
<chapter id="ms-manual" xreflabel="Massif: a heap profiler">
|
||||
<title>Massif: a heap profiler</title>
|
||||
|
||||
<para>To use this tool, you must specify
|
||||
<option>--tool=massif</option> on the Valgrind
|
||||
command line.</para>
|
||||
|
||||
<sect1 id="ms-manual.overview" xreflabel="Overview">
|
||||
<title>Overview</title>
|
||||
|
||||
<para>Massif is a heap profiler. It measures how much heap memory your
|
||||
program uses. This includes both the useful space, and the extra bytes
|
||||
allocated for book-keeping and alignment purposes. It can also
|
||||
measure the size of your program's stack(s), although it does not do so by
|
||||
default.</para>
|
||||
|
||||
<para>Heap profiling can help you reduce the amount of memory your program
|
||||
uses. On modern machines with virtual memory, this provides the following
|
||||
benefits:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>It can speed up your program -- a smaller
|
||||
program will interact better with your machine's caches and
|
||||
avoid paging.</para></listitem>
|
||||
|
||||
<listitem><para>If your program uses lots of memory, it will
|
||||
reduce the chance that it exhausts your machine's swap
|
||||
space.</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>Also, there are certain space leaks that aren't detected by
|
||||
traditional leak-checkers, such as Memcheck's. That's because
|
||||
the memory isn't ever actually lost -- a pointer remains to it --
|
||||
but it's not in use. Programs that have leaks like this can
|
||||
unnecessarily increase the amount of memory they are using over
|
||||
time. Massif can help identify these leaks.</para>
|
||||
|
||||
<para>Importantly, Massif tells you not only how much heap memory your
|
||||
program is using, it also gives very detailed information that indicates
|
||||
which parts of your program are responsible for allocating the heap memory.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
||||
<sect1 id="ms-manual.using" xreflabel="Using Massif and ms_print">
|
||||
<title>Using Massif and ms_print</title>
|
||||
|
||||
<para>First off, as for the other Valgrind tools, you should compile with
|
||||
debugging info (the <option>-g</option> option). It shouldn't
|
||||
matter much what optimisation level you compile your program with, as this
|
||||
is unlikely to affect the heap memory usage.</para>
|
||||
|
||||
<para>Then, you need to run Massif itself to gather the profiling
|
||||
information, and then run ms_print to present it in a readable way.</para>
|
||||
|
||||
|
||||
|
||||
|
||||
<sect2 id="ms-manual.anexample" xreflabel="An Example">
|
||||
<title>An Example Program</title>
|
||||
|
||||
<para>An example will make things clear. Consider the following C program
|
||||
(annotated with line numbers) which allocates a number of different blocks
|
||||
on the heap.</para>
|
||||
|
||||
<screen><![CDATA[
|
||||
1 #include <stdlib.h>
|
||||
2
|
||||
3 void g(void)
|
||||
4 {
|
||||
5 malloc(4000);
|
||||
6 }
|
||||
7
|
||||
8 void f(void)
|
||||
9 {
|
||||
10 malloc(2000);
|
||||
11 g();
|
||||
12 }
|
||||
13
|
||||
14 int main(void)
|
||||
15 {
|
||||
16 int i;
|
||||
17 int* a[10];
|
||||
18
|
||||
19 for (i = 0; i < 10; i++) {
|
||||
20 a[i] = malloc(1000);
|
||||
21 }
|
||||
22
|
||||
23 f();
|
||||
24
|
||||
25 g();
|
||||
26
|
||||
27 for (i = 0; i < 10; i++) {
|
||||
28 free(a[i]);
|
||||
29 }
|
||||
30
|
||||
31 return 0;
|
||||
32 }
|
||||
]]></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 id="ms-manual.running-massif" xreflabel="Running Massif">
|
||||
<title>Running Massif</title>
|
||||
|
||||
<para>To gather heap profiling information about the program
|
||||
<computeroutput>prog</computeroutput>, type:</para>
|
||||
<screen><![CDATA[
|
||||
valgrind --tool=massif prog
|
||||
]]></screen>
|
||||
|
||||
<para>The program will execute (slowly). Upon completion, no summary
|
||||
statistics are printed to Valgrind's commentary; all of Massif's profiling
|
||||
data is written to a file. By default, this file is called
|
||||
<filename>massif.out.<pid></filename>, where
|
||||
<filename><pid></filename> is the process ID, although this filename
|
||||
can be changed with the <option>--massif-out-file</option> option.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 id="ms-manual.running-ms_print" xreflabel="Running ms_print">
|
||||
<title>Running ms_print</title>
|
||||
|
||||
<para>To see the information gathered by Massif in an easy-to-read form, use
|
||||
ms_print. If the output file's name is
|
||||
<filename>massif.out.12345</filename>, type:</para>
|
||||
<screen><![CDATA[
|
||||
ms_print massif.out.12345]]></screen>
|
||||
|
||||
<para>ms_print will produce (a) a graph showing the memory consumption over
|
||||
the program's execution, and (b) detailed information about the responsible
|
||||
allocation sites at various points in the program, including the point of
|
||||
peak memory allocation. The use of a separate script for presenting the
|
||||
results is deliberate: it separates the data gathering from its
|
||||
presentation, and means that new methods of presenting the data can be added in
|
||||
the future.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 id="ms-manual.theoutputpreamble" xreflabel="The Output Preamble">
|
||||
<title>The Output Preamble</title>
|
||||
|
||||
<para>After running this program under Massif, the first part of ms_print's
|
||||
output contains a preamble which just states how the program, Massif and
|
||||
ms_print were each invoked:</para>
|
||||
|
||||
<screen><![CDATA[
|
||||
--------------------------------------------------------------------------------
|
||||
Command: example
|
||||
Massif arguments: (none)
|
||||
ms_print arguments: massif.out.12797
|
||||
--------------------------------------------------------------------------------
|
||||
]]></screen>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 id="ms-manual.theoutputgraph" xreflabel="The Output Graph">
|
||||
<title>The Output Graph</title>
|
||||
|
||||
<para>The next part is the graph that shows how memory consumption occurred
|
||||
as the program executed:</para>
|
||||
|
||||
<screen><![CDATA[
|
||||
KB
|
||||
19.63^ #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| :#
|
||||
| :#
|
||||
| :#
|
||||
0 +----------------------------------------------------------------------->ki 0 113.4
|
||||
|
||||
|
||||
Number of snapshots: 25
|
||||
Detailed snapshots: [9, 14 (peak), 24]
|
||||
]]></screen>
|
||||
|
||||
<para>Why is most of the graph empty, with only a couple of bars at the very
|
||||
end? By default, Massif uses "instructions executed" as the unit of time.
|
||||
For very short-run programs such as the example, most of the executed
|
||||
instructions involve the loading and dynamic linking of the program. The
|
||||
execution of <computeroutput>main</computeroutput> (and thus the heap
|
||||
allocations) only occur at the very end. For a short-running program like
|
||||
this, we can use the <option>--time-unit=B</option> option
|
||||
to specify that we want the time unit to instead be the number of bytes
|
||||
allocated/deallocated on the heap and stack(s).</para>
|
||||
|
||||
<para>If we re-run the program under Massif with this option, and then
|
||||
re-run ms_print, we get this more useful graph:</para>
|
||||
|
||||
<screen><![CDATA[
|
||||
19.63^ ###
|
||||
| #
|
||||
| # ::
|
||||
| # : :::
|
||||
| :::::::::# : : ::
|
||||
| : # : : : ::
|
||||
| : # : : : : :::
|
||||
| : # : : : : : ::
|
||||
| ::::::::::: # : : : : : : :::
|
||||
| : : # : : : : : : : ::
|
||||
| ::::: : # : : : : : : : : ::
|
||||
| @@@: : : # : : : : : : : : : @
|
||||
| ::@ : : : # : : : : : : : : : @
|
||||
| :::: @ : : : # : : : : : : : : : @
|
||||
| ::: : @ : : : # : : : : : : : : : @
|
||||
| ::: : : @ : : : # : : : : : : : : : @
|
||||
| :::: : : : @ : : : # : : : : : : : : : @
|
||||
| ::: : : : : @ : : : # : : : : : : : : : @
|
||||
| :::: : : : : : @ : : : # : : : : : : : : : @
|
||||
| ::: : : : : : : @ : : : # : : : : : : : : : @
|
||||
0 +----------------------------------------------------------------------->KB 0 29.48
|
||||
|
||||
Number of snapshots: 25
|
||||
Detailed snapshots: [9, 14 (peak), 24]
|
||||
]]></screen>
|
||||
|
||||
<para>The size of the graph can be changed with ms_print's
|
||||
<option>--x</option> and <option>--y</option> 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
|
||||
<option>--max-snapshots</option> option) half of them are
|
||||
deleted. This means that a reasonable number of snapshots are always
|
||||
maintained.</para>
|
||||
|
||||
<para>Most snapshots are <emphasis>normal</emphasis>, and only basic
|
||||
information is recorded for them. Normal snapshots are represented in the
|
||||
graph by bars consisting of ':' characters.</para>
|
||||
|
||||
<para>Some snapshots are <emphasis>detailed</emphasis>. 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
|
||||
<option>--detailed-freq</option> option.</para>
|
||||
|
||||
<para>Finally, there is at most one <emphasis>peak</emphasis> 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.</para>
|
||||
|
||||
<para>Massif's determination of when the peak occurred can be wrong, for
|
||||
two reasons.</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Peak snapshots are only ever taken after a deallocation
|
||||
happens. This avoids lots of unnecessary peak snapshot recordings
|
||||
(imagine what happens if your program allocates a lot of heap blocks in
|
||||
succession, hitting a new peak every time). But it means that if your
|
||||
program never deallocates any blocks, no peak will be recorded. It also
|
||||
means that if your program does deallocate blocks but later allocates to a
|
||||
higher peak without subsequently deallocating, the reported peak will be
|
||||
too low.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem><para>Even with this behaviour, recording the peak accurately
|
||||
is slow. So by default Massif records a peak whose size is within 1% of
|
||||
the size of the true peak. This inaccuracy in the peak measurement can be
|
||||
changed with the <option>--peak-inaccuracy</option> option.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>The following graph is from an execution of Konqueror, the KDE web
|
||||
browser. It shows what graphs for larger programs look like.</para>
|
||||
<screen><![CDATA[
|
||||
MB
|
||||
3.952^ #
|
||||
| @#:
|
||||
| :@@#:
|
||||
| @@::::@@#:
|
||||
| @ :: :@@#::
|
||||
| @@@ :: :@@#::
|
||||
| @@:@@@ :: :@@#::
|
||||
| :::@ :@@@ :: :@@#::
|
||||
| : :@ :@@@ :: :@@#::
|
||||
| :@: :@ :@@@ :: :@@#::
|
||||
| @@:@: :@ :@@@ :: :@@#:::
|
||||
| : :: ::@@:@: :@ :@@@ :: :@@#:::
|
||||
| :@@: ::::: ::::@@@:::@@:@: :@ :@@@ :: :@@#:::
|
||||
| ::::@@: ::: ::::::: @ :::@@:@: :@ :@@@ :: :@@#:::
|
||||
| @: ::@@: ::: ::::::: @ :::@@:@: :@ :@@@ :: :@@#:::
|
||||
| @: ::@@: ::: ::::::: @ :::@@:@: :@ :@@@ :: :@@#:::
|
||||
| @: ::@@:::::: ::::::: @ :::@@:@: :@ :@@@ :: :@@#:::
|
||||
| ::@@@: ::@@:: ::: ::::::: @ :::@@:@: :@ :@@@ :: :@@#:::
|
||||
| :::::@ @: ::@@:: ::: ::::::: @ :::@@:@: :@ :@@@ :: :@@#:::
|
||||
| @@:::::@ @: ::@@:: ::: ::::::: @ :::@@:@: :@ :@@@ :: :@@#:::
|
||||
0 +----------------------------------------------------------------------->Mi
|
||||
0 626.4
|
||||
|
||||
Number of snapshots: 63
|
||||
Detailed snapshots: [3, 4, 10, 11, 15, 16, 29, 33, 34, 36, 39, 41,
|
||||
42, 43, 44, 49, 50, 51, 53, 55, 56, 57 (peak)]
|
||||
]]></screen>
|
||||
|
||||
<para>Note that the larger size units are KB, MB, GB, etc. As is typical
|
||||
for memory measurements, these are based on a multiplier of 1024, rather
|
||||
than the standard SI multiplier of 1000. Strictly speaking, they should be
|
||||
written KiB, MiB, GiB, etc.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 id="ms-manual.thesnapshotdetails" xreflabel="The Snapshot Details">
|
||||
<title>The Snapshot Details</title>
|
||||
|
||||
<para>Returning to our example, the graph is followed by the detailed
|
||||
information for each snapshot. The first nine snapshots are normal, so only
|
||||
a small amount of information is recorded for each one:</para>
|
||||
<screen><![CDATA[
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 1,008 1,008 1,000 8 0
|
||||
2 2,016 2,016 2,000 16 0
|
||||
3 3,024 3,024 3,000 24 0
|
||||
4 4,032 4,032 4,000 32 0
|
||||
5 5,040 5,040 5,000 40 0
|
||||
6 6,048 6,048 6,000 48 0
|
||||
7 7,056 7,056 7,000 56 0
|
||||
8 8,064 8,064 8,000 64 0
|
||||
]]></screen>
|
||||
|
||||
<para>Each normal snapshot records several things.</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>Its number.</para></listitem>
|
||||
|
||||
<listitem><para>The time it was taken. In this case, the time unit is
|
||||
bytes, due to the use of
|
||||
<option>--time-unit=B</option>.</para></listitem>
|
||||
|
||||
<listitem><para>The total memory consumption at that point.</para></listitem>
|
||||
|
||||
<listitem><para>The number of useful heap bytes allocated at that point.
|
||||
This reflects the number of bytes asked for by the
|
||||
program.</para></listitem>
|
||||
|
||||
<listitem><para>The number of extra heap bytes allocated at that point.
|
||||
This reflects the number of bytes allocated in excess of what the program
|
||||
asked for. There are two sources of extra heap bytes.</para>
|
||||
|
||||
<para>First, every heap block has administrative bytes associated with it.
|
||||
The exact number of administrative bytes depends on the details of the
|
||||
allocator. By default Massif assumes 8 bytes per block, as can be seen
|
||||
from the example, but this number can be changed via the
|
||||
<option>--heap-admin</option> option.</para>
|
||||
|
||||
<para>Second, allocators often round up the number of bytes asked for to a
|
||||
larger number, usually 8 or 16. This is required to ensure that elements
|
||||
within the block are suitably aligned. If N bytes are asked for, Massif
|
||||
rounds N up to the nearest multiple of the value specified by the
|
||||
<option><xref linkend="opt.alignment"/></option> option.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>The size of the stack(s). By default, stack profiling is
|
||||
off as it slows Massif down greatly. Therefore, the stack column is zero
|
||||
in the example. Stack profiling can be turned on with the
|
||||
<option>--stacks=yes</option> option.
|
||||
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>The next snapshot is detailed. As well as the basic counts, it gives
|
||||
an allocation tree which indicates exactly which pieces of code were
|
||||
responsible for allocating heap memory:</para>
|
||||
|
||||
<screen><![CDATA[
|
||||
9 9,072 9,072 9,000 72 0
|
||||
99.21% (9,000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->99.21% (9,000B) 0x804841A: main (example.c:20)
|
||||
]]></screen>
|
||||
|
||||
<para>The allocation tree can be read from the top down. The first line
|
||||
indicates all heap allocation functions such as <function>malloc</function>
|
||||
and C++ <function>new</function>. All heap allocations go through these
|
||||
functions, and so all 9,000 useful bytes (which is 99.21% of all allocated
|
||||
bytes) go through them. But how were <function>malloc</function> and new
|
||||
called? At this point, every allocation so far has been due to line 20
|
||||
inside <function>main</function>, hence the second line in the tree. The
|
||||
<option>-></option> indicates that main (line 20) called
|
||||
<function>malloc</function>.</para>
|
||||
|
||||
<para>Let's see what the subsequent output shows happened next:</para>
|
||||
|
||||
<screen><![CDATA[
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 10,080 10,080 10,000 80 0
|
||||
11 12,088 12,088 12,000 88 0
|
||||
12 16,096 16,096 16,000 96 0
|
||||
13 20,104 20,104 20,000 104 0
|
||||
14 20,104 20,104 20,000 104 0
|
||||
99.48% (20,000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->49.74% (10,000B) 0x804841A: main (example.c:20)
|
||||
|
|
||||
->39.79% (8,000B) 0x80483C2: g (example.c:5)
|
||||
| ->19.90% (4,000B) 0x80483E2: f (example.c:11)
|
||||
| | ->19.90% (4,000B) 0x8048431: main (example.c:23)
|
||||
| |
|
||||
| ->19.90% (4,000B) 0x8048436: main (example.c:25)
|
||||
|
|
||||
->09.95% (2,000B) 0x80483DA: f (example.c:10)
|
||||
->09.95% (2,000B) 0x8048431: main (example.c:23)
|
||||
]]></screen>
|
||||
|
||||
<para>The first four snapshots are similar to the previous ones. But then
|
||||
the global allocation peak is reached, and a detailed snapshot (number 14)
|
||||
is taken. Its allocation tree shows that 20,000B of useful heap memory has
|
||||
been allocated, and the lines and arrows indicate that this is from three
|
||||
different code locations: line 20, which is responsible for 10,000B
|
||||
(49.74%); line 5, which is responsible for 8,000B (39.79%); and line 10,
|
||||
which is responsible for 2,000B (9.95%).</para>
|
||||
|
||||
<para>We can then drill down further in the allocation tree. For example,
|
||||
of the 8,000B asked for by line 5, half of it was due to a call from line
|
||||
11, and half was due to a call from line 25.</para>
|
||||
|
||||
<para>In short, Massif collates the stack trace of every single allocation
|
||||
point in the program into a single tree, which gives a complete picture at
|
||||
a particular point in time of how and why all heap memory was
|
||||
allocated.</para>
|
||||
|
||||
<para>Note that the tree entries correspond not to functions, but to
|
||||
individual code locations. For example, if function <function>A</function>
|
||||
calls <function>malloc</function>, and function <function>B</function> calls
|
||||
<function>A</function> twice, once on line 10 and once on line 11, then
|
||||
the two calls will result in two distinct stack traces in the tree. In
|
||||
contrast, if <function>B</function> calls <function>A</function> repeatedly
|
||||
from line 15 (e.g. due to a loop), then each of those calls will be
|
||||
represented by the same stack trace in the tree.</para>
|
||||
|
||||
<para>Note also that each tree entry with children in the example satisfies an
|
||||
invariant: the entry's size is equal to the sum of its children's sizes.
|
||||
For example, the first entry has size 20,000B, and its children have sizes
|
||||
10,000B, 8,000B, and 2,000B. In general, this invariant almost always
|
||||
holds. However, in rare circumstances stack traces can be malformed, in
|
||||
which case a stack trace can be a sub-trace of another stack trace. This
|
||||
means that some entries in the tree may not satisfy the invariant -- the
|
||||
entry's size will be greater than the sum of its children's sizes. This is
|
||||
not a big problem, but could make the results confusing. Massif can
|
||||
sometimes detect when this happens; if it does, it issues a warning:</para>
|
||||
|
||||
<screen><![CDATA[
|
||||
Warning: Malformed stack trace detected. In Massif's output,
|
||||
the size of an entry's child entries may not sum up
|
||||
to the entry's size as they normally do.
|
||||
]]></screen>
|
||||
|
||||
<para>However, Massif does not detect and warn about every such occurrence.
|
||||
Fortunately, malformed stack traces are rare in practice.</para>
|
||||
|
||||
<para>Returning now to ms_print's output, the final part is similar:</para>
|
||||
|
||||
<screen><![CDATA[
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
15 21,112 19,096 19,000 96 0
|
||||
16 22,120 18,088 18,000 88 0
|
||||
17 23,128 17,080 17,000 80 0
|
||||
18 24,136 16,072 16,000 72 0
|
||||
19 25,144 15,064 15,000 64 0
|
||||
20 26,152 14,056 14,000 56 0
|
||||
21 27,160 13,048 13,000 48 0
|
||||
22 28,168 12,040 12,000 40 0
|
||||
23 29,176 11,032 11,000 32 0
|
||||
24 30,184 10,024 10,000 24 0
|
||||
99.76% (10,000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->79.81% (8,000B) 0x80483C2: g (example.c:5)
|
||||
| ->39.90% (4,000B) 0x80483E2: f (example.c:11)
|
||||
| | ->39.90% (4,000B) 0x8048431: main (example.c:23)
|
||||
| |
|
||||
| ->39.90% (4,000B) 0x8048436: main (example.c:25)
|
||||
|
|
||||
->19.95% (2,000B) 0x80483DA: f (example.c:10)
|
||||
| ->19.95% (2,000B) 0x8048431: main (example.c:23)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
]]></screen>
|
||||
|
||||
<para>The final detailed snapshot shows how the heap looked at termination.
|
||||
The 00.00% entry represents the code locations for which memory was
|
||||
allocated and then freed (line 20 in this case, the memory for which was
|
||||
freed on line 28). However, no code location details are given for this
|
||||
entry; by default, Massif only records the details for code locations
|
||||
responsible for more than 1% of useful memory bytes, and ms_print likewise
|
||||
only prints the details for code locations responsible for more than 1%.
|
||||
The entries that do not meet this threshold are aggregated. This avoids
|
||||
filling up the output with large numbers of unimportant entries. The
|
||||
thresholds can be changed with the
|
||||
<option>--threshold</option> option that both Massif and
|
||||
ms_print support.</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 id="ms-manual.forkingprograms" xreflabel="Forking Programs">
|
||||
<title>Forking Programs</title>
|
||||
<para>If your program forks, the child will inherit all the profiling data that
|
||||
has been gathered for the parent.</para>
|
||||
|
||||
<para>If the output file format string (controlled by
|
||||
<option>--massif-out-file</option>) does not contain <option>%p</option>, then
|
||||
the outputs from the parent and child will be intermingled in a single output
|
||||
file, which will almost certainly make it unreadable by ms_print.</para>
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 id="ms-manual.not-measured"
|
||||
xreflabel="Measuring All Memory in a Process">
|
||||
<title>Measuring All Memory in a Process</title>
|
||||
<para>
|
||||
It is worth emphasising that by default Massif measures only heap memory, i.e.
|
||||
memory allocated with
|
||||
<function>malloc</function>,
|
||||
<function>calloc</function>,
|
||||
<function>realloc</function>,
|
||||
<function>memalign</function>,
|
||||
<function>new</function>,
|
||||
<function>new[]</function>,
|
||||
and a few other, similar functions. (And it can optionally measure stack
|
||||
memory, of course.) This means it does <emphasis>not</emphasis> directly
|
||||
measure memory allocated with lower-level system calls such as
|
||||
<function>mmap</function>,
|
||||
<function>mremap</function>, and
|
||||
<function>brk</function>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Heap allocation functions such as <function>malloc</function> are built on
|
||||
top of these system calls. For example, when needed, an allocator will
|
||||
typically call <function>mmap</function> to allocate a large chunk of
|
||||
memory, and then hand over pieces of that memory chunk to the client program
|
||||
in response to calls to <function>malloc</function> et al. Massif directly
|
||||
measures only these higher-level <function>malloc</function> et al calls,
|
||||
not the lower-level system calls.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Furthermore, a client program may use these lower-level system calls
|
||||
directly to allocate memory. By default, Massif does not measure these. Nor
|
||||
does it measure the size of code, data and BSS segments. Therefore, the
|
||||
numbers reported by Massif may be significantly smaller than those reported by
|
||||
tools such as <filename>top</filename> that measure a program's total size in
|
||||
memory.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
However, if you wish to measure <emphasis>all</emphasis> the memory used by
|
||||
your program, you can use the <option>--pages-as-heap=yes</option>. When this
|
||||
option is enabled, Massif's normal heap block profiling is replaced by
|
||||
lower-level page profiling. Every page allocated via
|
||||
<function>mmap</function> and similar system calls is treated as a distinct
|
||||
block. This means that code, data and BSS segments are all measured, as they
|
||||
are just memory pages. Even the stack is measured, since it is ultimately
|
||||
allocated (and extended when necessary) via <function>mmap</function>; for
|
||||
this reason <option>--stacks=yes</option> is not allowed in conjunction with
|
||||
<option>--pages-as-heap=yes</option>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
After <option>--pages-as-heap=yes</option> is used, ms_print's output is
|
||||
mostly unchanged. One difference is that the start of each detailed snapshot
|
||||
says:
|
||||
</para>
|
||||
|
||||
<screen><![CDATA[
|
||||
(page allocation syscalls) mmap/mremap/brk, --alloc-fns, etc.
|
||||
]]></screen>
|
||||
|
||||
<para>instead of the usual</para>:
|
||||
|
||||
<screen><![CDATA[
|
||||
(heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
]]></screen>
|
||||
|
||||
<para>
|
||||
The stack traces in the output may be more difficult to read, and interpreting
|
||||
them may require some detailed understanding of the lower levels of a program
|
||||
like the memory allocators. But for some programs having the full information
|
||||
about memory usage can be very useful.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
|
||||
<sect2 id="ms-manual.acting" xreflabel="Action on Massif's Information">
|
||||
<title>Acting on Massif's Information</title>
|
||||
<para>Massif's information is generally fairly easy to act upon. The
|
||||
obvious place to start looking is the peak snapshot.</para>
|
||||
|
||||
<para>It can also be useful to look at the overall shape of the graph, to
|
||||
see if memory usage climbs and falls as you expect; spikes in the graph
|
||||
might be worth investigating.</para>
|
||||
|
||||
<para>The detailed snapshots can get quite large. It is worth viewing them
|
||||
in a very wide window. It's also a good idea to view them with a text
|
||||
editor. That makes it easy to scroll up and down while keeping the cursor
|
||||
in a particular column, which makes following the allocation chains easier.
|
||||
</para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
||||
<sect1 id="ms-manual.options" xreflabel="Massif Command-line Options">
|
||||
<title>Massif Command-line Options</title>
|
||||
|
||||
<para>Massif-specific command-line options are:</para>
|
||||
|
||||
<!-- start of xi:include in the manpage -->
|
||||
<variablelist id="ms.opts.list">
|
||||
|
||||
<varlistentry id="opt.heap" xreflabel="--heap">
|
||||
<term>
|
||||
<option><![CDATA[--heap=<yes|no> [default: yes] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Specifies whether heap profiling should be done.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.heap-admin" xreflabel="--heap-admin">
|
||||
<term>
|
||||
<option><![CDATA[--heap-admin=<size> [default: 8] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>If heap profiling is enabled, gives the number of administrative
|
||||
bytes per block to use. This should be an estimate of the average,
|
||||
since it may vary. For example, the allocator used by
|
||||
glibc on Linux requires somewhere between 4 to
|
||||
15 bytes per block, depending on various factors. That allocator also
|
||||
requires admin space for freed blocks, but Massif cannot
|
||||
account for this.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.stacks" xreflabel="--stacks">
|
||||
<term>
|
||||
<option><![CDATA[--stacks=<yes|no> [default: no] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Specifies whether stack profiling should be done. This option
|
||||
slows Massif down greatly, and so is off by default. Note that Massif
|
||||
assumes that the main stack has size zero at start-up. This is not
|
||||
true, but doing otherwise accurately is difficult. Furthermore,
|
||||
starting at zero better indicates the size of the part of the main
|
||||
stack that a user program actually has control over.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.pages-as-heap" xreflabel="--pages-as-heap">
|
||||
<term>
|
||||
<option><![CDATA[--pages-as-heap=<yes|no> [default: no] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Tells Massif to profile memory at the page level rather
|
||||
than at the malloc'd block level. See above for details.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.depth" xreflabel="--depth">
|
||||
<term>
|
||||
<option><![CDATA[--depth=<number> [default: 30] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Maximum depth of the allocation trees recorded for detailed
|
||||
snapshots. Increasing it will make Massif run somewhat more slowly,
|
||||
use more memory, and produce bigger output files.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.alloc-fn" xreflabel="--alloc-fn">
|
||||
<term>
|
||||
<option><![CDATA[--alloc-fn=<name> ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Functions specified with this option will be treated as though
|
||||
they were a heap allocation function such as
|
||||
<function>malloc</function>. This is useful for functions that are
|
||||
wrappers to <function>malloc</function> or <function>new</function>,
|
||||
which can fill up the allocation trees with uninteresting information.
|
||||
This option can be specified multiple times on the command line, to
|
||||
name multiple functions.</para>
|
||||
|
||||
<para>Note that the named function will only be treated this way if it is
|
||||
the top entry in a stack trace, or just below another function treated
|
||||
this way. For example, if you have a function
|
||||
<function>malloc1</function> that wraps <function>malloc</function>,
|
||||
and <function>malloc2</function> that wraps
|
||||
<function>malloc1</function>, just specifying
|
||||
<option>--alloc-fn=malloc2</option> will have no effect. You need to
|
||||
specify <option>--alloc-fn=malloc1</option> as well. This is a little
|
||||
inconvenient, but the reason is that checking for allocation functions
|
||||
is slow, and it saves a lot of time if Massif can stop looking through
|
||||
the stack trace entries as soon as it finds one that doesn't match
|
||||
rather than having to continue through all the entries.</para>
|
||||
|
||||
<para>Note that C++ names are demangled. Note also that overloaded
|
||||
C++ names must be written in full. Single quotes may be necessary to
|
||||
prevent the shell from breaking them up. For example:
|
||||
<screen><![CDATA[
|
||||
--alloc-fn='operator new(unsigned, std::nothrow_t const&)'
|
||||
]]></screen>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.ignore-fn" xreflabel="--ignore-fn">
|
||||
<term>
|
||||
<option><![CDATA[--ignore-fn=<name> ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Any direct heap allocation (i.e. a call to
|
||||
<function>malloc</function>, <function>new</function>, etc, or a call
|
||||
to a function named by an <option>--alloc-fn</option>
|
||||
option) that occurs in a function specified by this option will be
|
||||
ignored. This is mostly useful for testing purposes. This option can
|
||||
be specified multiple times on the command line, to name multiple
|
||||
functions.
|
||||
</para>
|
||||
|
||||
<para>Any <function>realloc</function> of an ignored block will
|
||||
also be ignored, even if the <function>realloc</function> call does
|
||||
not occur in an ignored function. This avoids the possibility of
|
||||
negative heap sizes if ignored blocks are shrunk with
|
||||
<function>realloc</function>.
|
||||
</para>
|
||||
|
||||
<para>The rules for writing C++ function names are the same as
|
||||
for <option>--alloc-fn</option> above.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.threshold" xreflabel="--threshold">
|
||||
<term>
|
||||
<option><![CDATA[--threshold=<m.n> [default: 1.0] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>The significance threshold for heap allocations, as a
|
||||
percentage of total memory size. Allocation tree entries that account
|
||||
for less than this will be aggregated. Note that this should be
|
||||
specified in tandem with ms_print's option of the same name.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.peak-inaccuracy" xreflabel="--peak-inaccuracy">
|
||||
<term>
|
||||
<option><![CDATA[--peak-inaccuracy=<m.n> [default: 1.0] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Massif does not necessarily record the actual global memory
|
||||
allocation peak; by default it records a peak only when the global
|
||||
memory allocation size exceeds the previous peak by at least 1.0%.
|
||||
This is because there can be many local allocation peaks along the way,
|
||||
and doing a detailed snapshot for every one would be expensive and
|
||||
wasteful, as all but one of them will be later discarded. This
|
||||
inaccuracy can be changed (even to 0.0%) via this option, but Massif
|
||||
will run drastically slower as the number approaches zero.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.time-unit" xreflabel="--time-unit">
|
||||
<term>
|
||||
<option><![CDATA[--time-unit=<i|ms|B> [default: i] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>The time unit used for the profiling. There are three
|
||||
possibilities: instructions executed (i), which is good for most
|
||||
cases; real (wallclock) time (ms, i.e. milliseconds), which is
|
||||
sometimes useful; and bytes allocated/deallocated on the heap and/or
|
||||
stack (B), which is useful for very short-run programs, and for
|
||||
testing purposes, because it is the most reproducible across different
|
||||
machines.</para> </listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.detailed-freq" xreflabel="--detailed-freq">
|
||||
<term>
|
||||
<option><![CDATA[--detailed-freq=<n> [default: 10] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Frequency of detailed snapshots. With
|
||||
<option>--detailed-freq=1</option>, every snapshot is
|
||||
detailed.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.max-snapshots" xreflabel="--max-snapshots">
|
||||
<term>
|
||||
<option><![CDATA[--max-snapshots=<n> [default: 100] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>The maximum number of snapshots recorded. If set to N, for all
|
||||
programs except very short-running ones, the final number of snapshots
|
||||
will be between N/2 and N.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.massif-out-file" xreflabel="--massif-out-file">
|
||||
<term>
|
||||
<option><![CDATA[--massif-out-file=<file> [default: massif.out.%p] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Write the profile data to <computeroutput>file</computeroutput>
|
||||
rather than to the default output file,
|
||||
<computeroutput>massif.out.<pid></computeroutput>. The
|
||||
<option>%p</option> and <option>%q</option> format specifiers can be
|
||||
used to embed the process ID and/or the contents of an environment
|
||||
variable in the name, as is the case for the core option
|
||||
<option><xref linkend="opt.log-file"/></option>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
<!-- end of xi:include in the manpage -->
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="ms-manual.monitor-commands" xreflabel="Massif Monitor Commands">
|
||||
<title>Massif Monitor Commands</title>
|
||||
<para>The Massif tool provides monitor commands handled by the Valgrind
|
||||
gdbserver (see <xref linkend="manual-core-adv.gdbserver-commandhandling"/>).
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><varname>snapshot [<filename>]</varname> requests
|
||||
to take a snapshot and save it in the given <filename>
|
||||
(default massif.vgdb.out).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><varname>detailed_snapshot [<filename>]</varname>
|
||||
requests to take a detailed snapshot and save it in the given
|
||||
<filename> (default massif.vgdb.out).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><varname>all_snapshots [<filename>]</varname>
|
||||
requests to take all captured snapshots so far and save them in the given
|
||||
<filename> (default massif.vgdb.out).
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="ms-manual.clientreqs" xreflabel="Client requests">
|
||||
<title>Massif Client Requests</title>
|
||||
|
||||
<para>Massif does not have a <filename>massif.h</filename> file, but it does
|
||||
implement two of the core client requests:
|
||||
<function>VALGRIND_MALLOCLIKE_BLOCK</function> and
|
||||
<function>VALGRIND_FREELIKE_BLOCK</function>; they are described in
|
||||
<xref linkend="manual-core-adv.clientreq"/>.
|
||||
</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
||||
<sect1 id="ms-manual.ms_print-options" xreflabel="ms_print Command-line Options">
|
||||
<title>ms_print Command-line Options</title>
|
||||
|
||||
<para>ms_print's options are:</para>
|
||||
|
||||
<!-- start of xi:include in the manpage -->
|
||||
<variablelist id="ms_print.opts.list">
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<option><![CDATA[-h --help ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Show the help message.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<option><![CDATA[--version ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Show the version number.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<option><![CDATA[--threshold=<m.n> [default: 1.0] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Same as Massif's <option>--threshold</option> option, but
|
||||
applied after profiling rather than during.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<option><![CDATA[--x=<4..1000> [default: 72]]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Width of the graph, in columns.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<option><![CDATA[--y=<4..1000> [default: 20] ]]></option>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>Height of the graph, in rows.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
</sect1>
|
||||
|
||||
<sect1 id="ms-manual.fileformat" xreflabel="fileformat">
|
||||
<title>Massif's Output File Format</title>
|
||||
<para>Massif's file format is plain text (i.e. not binary) and deliberately
|
||||
easy to read for both humans and machines. Nonetheless, the exact format
|
||||
is not described here. This is because the format is currently very
|
||||
Massif-specific. In the future we hope to make the format more general, and
|
||||
thus suitable for possible use with other tools. Once this has been done,
|
||||
the format will be documented here.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
</chapter>
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0"?> <!-- -*- sgml -*- -->
|
||||
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
||||
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
|
||||
[ <!ENTITY % vg-entities SYSTEM "../../docs/xml/vg-entities.xml"> %vg-entities; ]>
|
||||
|
||||
|
||||
<refentry id="ms_print">
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>ms_print</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo>Release &rel-version;</refmiscinfo>
|
||||
<date>rel-date</date>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname>ms_print</refname>
|
||||
<refpurpose>post-processing tool for Massif</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>ms_print</command>
|
||||
<arg><replaceable>options</replaceable></arg>
|
||||
<arg choice="plain"><replaceable>massif-out-file</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
|
||||
<refsect1 id="description">
|
||||
<title>Description</title>
|
||||
|
||||
<para><command>ms_print</command> takes an output file produced by the
|
||||
Valgrind tool Massif and prints the information in an easy-to-read form.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
||||
|
||||
<refsect1 id="options">
|
||||
<title>Options</title>
|
||||
|
||||
<xi:include href="ms-manual.xml" xpointer="ms_print.opts.list"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude" />
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
||||
|
||||
|
||||
<refsect1 id="see_also">
|
||||
<title>See Also</title>
|
||||
|
||||
<para>
|
||||
valgrind(1),
|
||||
<filename>&vg-docs-path;</filename> or
|
||||
<filename>&vg-docs-url;</filename>.
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1 id="author">
|
||||
<title>Author</title>
|
||||
|
||||
<para>Nicholas Nethercote.</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
||||
</refentry>
|
||||
|
||||
|
||||
BIN
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,685 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
##--------------------------------------------------------------------##
|
||||
##--- Massif's results printer ms_print.in ---##
|
||||
##--------------------------------------------------------------------##
|
||||
|
||||
# This file is part of Massif, a Valgrind tool for profiling memory
|
||||
# usage of programs.
|
||||
#
|
||||
# Copyright (C) 2007-2015 Nicholas Nethercote
|
||||
# njn@valgrind.org
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
#
|
||||
# The GNU General Public License is contained in the file COPYING.
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Global variables, main data structures
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# Command line of profiled program.
|
||||
my $cmd;
|
||||
|
||||
# Time unit used in profile.
|
||||
my $time_unit;
|
||||
|
||||
# Threshold dictating what percentage an entry must represent for us to
|
||||
# bother showing it.
|
||||
my $threshold = 1.0;
|
||||
|
||||
# Graph x and y dimensions.
|
||||
my $graph_x = 72;
|
||||
my $graph_y = 20;
|
||||
|
||||
# Input file name
|
||||
my $input_file = undef;
|
||||
|
||||
# Where to create tmp files. See also function VG_(tmpdir) in m_libcfile.c.
|
||||
my $tmp_dir = $ENV{"TMPDIR"};
|
||||
$tmp_dir = "/tmp" if (! $tmp_dir);
|
||||
$tmp_dir = "/tmp" if (! $tmp_dir);
|
||||
|
||||
# Tmp file name.
|
||||
my $tmp_file = "$tmp_dir/ms_print.tmp.$$";
|
||||
|
||||
# Version number.
|
||||
my $version = "3.11.0";
|
||||
|
||||
# Args passed, for printing.
|
||||
my $ms_print_args;
|
||||
|
||||
# Usage message.
|
||||
my $usage = <<END
|
||||
usage: ms_print [options] massif-out-file
|
||||
|
||||
options for the user, with defaults in [ ], are:
|
||||
-h --help show this message
|
||||
--version show version
|
||||
--threshold=<m.n> significance threshold, in percent [$threshold]
|
||||
--x=<4..1000> graph width, in columns [72]
|
||||
--y=<4..1000> graph height, in rows [20]
|
||||
|
||||
ms_print is Copyright (C) 2007-2015 Nicholas Nethercote.
|
||||
and licensed under the GNU General Public License, version 2.
|
||||
Bug reports, feedback, admiration, abuse, etc, to: njn\@valgrind.org.
|
||||
|
||||
END
|
||||
;
|
||||
|
||||
# Used in various places of output.
|
||||
my $fancy = '-' x 80;
|
||||
my $fancy_nl = $fancy . "\n";
|
||||
|
||||
# Returns 0 if the denominator is 0.
|
||||
sub safe_div_0($$)
|
||||
{
|
||||
my ($x, $y) = @_;
|
||||
return ($y ? $x / $y : 0);
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Argument and option handling
|
||||
#-----------------------------------------------------------------------------
|
||||
sub process_cmd_line()
|
||||
{
|
||||
my @files;
|
||||
|
||||
# Grab a copy of the arguments, for printing later.
|
||||
for my $arg (@ARGV) {
|
||||
$ms_print_args .= " $arg"; # The arguments.
|
||||
}
|
||||
|
||||
for my $arg (@ARGV) {
|
||||
|
||||
# Option handling
|
||||
if ($arg =~ /^-/) {
|
||||
|
||||
# --version
|
||||
if ($arg =~ /^--version$/) {
|
||||
die("ms_print-$version\n");
|
||||
|
||||
# --threshold=X (tolerates a trailing '%')
|
||||
} elsif ($arg =~ /^--threshold=([\d\.]+)%?$/) {
|
||||
$threshold = $1;
|
||||
($1 >= 0 && $1 <= 100) or die($usage);
|
||||
|
||||
} elsif ($arg =~ /^--x=(\d+)$/) {
|
||||
$graph_x = $1;
|
||||
(4 <= $graph_x && $graph_x <= 1000) or die($usage);
|
||||
|
||||
} elsif ($arg =~ /^--y=(\d+)$/) {
|
||||
$graph_y = $1;
|
||||
(4 <= $graph_y && $graph_y <= 1000) or die($usage);
|
||||
|
||||
} else { # -h and --help fall under this case
|
||||
die($usage);
|
||||
}
|
||||
} else {
|
||||
# Not an option. Remember it as a filename.
|
||||
push(@files, $arg);
|
||||
}
|
||||
}
|
||||
|
||||
# Must have chosen exactly one input file.
|
||||
if (scalar @files) {
|
||||
$input_file = $files[0];
|
||||
} else {
|
||||
die($usage);
|
||||
}
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Reading the input file: auxiliary functions
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Gets the next line, stripping comments and skipping blanks.
|
||||
# Returns undef at EOF.
|
||||
sub get_line()
|
||||
{
|
||||
while (my $line = <INPUTFILE>) {
|
||||
$line =~ s/#.*$//; # remove comments
|
||||
if ($line !~ /^\s*$/) {
|
||||
return $line; # return $line if non-empty
|
||||
}
|
||||
}
|
||||
return undef; # EOF: return undef
|
||||
}
|
||||
|
||||
sub equals_num_line($$)
|
||||
{
|
||||
my ($line, $fieldname) = @_;
|
||||
defined($line)
|
||||
or die("Line $.: expected \"$fieldname\" line, got end of file\n");
|
||||
$line =~ s/^$fieldname=(.*)\s*$//
|
||||
or die("Line $.: expected \"$fieldname\" line, got:\n$line");
|
||||
return $1;
|
||||
}
|
||||
|
||||
sub is_significant_XPt($$$)
|
||||
{
|
||||
my ($is_top_node, $xpt_szB, $total_szB) = @_;
|
||||
($xpt_szB <= $total_szB) or die;
|
||||
# Nb: we always consider the alloc-XPt significant, even if the size is
|
||||
# zero.
|
||||
return $is_top_node || 0 == $threshold ||
|
||||
( $total_szB != 0 && $xpt_szB * 100 / $total_szB >= $threshold );
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Reading the input file: reading heap trees
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Forward declaration, because it's recursive.
|
||||
sub read_heap_tree($$$$$);
|
||||
|
||||
# Return pair: if the tree was significant, both are zero. If it was
|
||||
# insignificant, the first element is 1 and the second is the number of
|
||||
# bytes.
|
||||
sub read_heap_tree($$$$$)
|
||||
{
|
||||
# Read the line and determine if it is significant.
|
||||
my ($is_top_node, $this_prefix, $child_midfix, $arrow, $mem_total_B) = @_;
|
||||
my $line = get_line();
|
||||
(defined $line and $line =~ /^\s*n(\d+):\s*(\d+)(.*)$/)
|
||||
or die("Line $.: expected a tree node line, got:\n$line\n");
|
||||
my $n_children = $1;
|
||||
my $bytes = $2;
|
||||
my $details = $3;
|
||||
my $perc = safe_div_0(100 * $bytes, $mem_total_B);
|
||||
# Nb: we always print the alloc-XPt, even if its size is zero.
|
||||
my $is_significant = is_significant_XPt($is_top_node, $bytes, $mem_total_B);
|
||||
|
||||
# We precede this node's line with "$this_prefix.$arrow". We precede
|
||||
# any children of this node with "$this_prefix$child_midfix$arrow".
|
||||
if ($is_significant) {
|
||||
# Nb: $details might have '%' in it, so don't embed directly in the
|
||||
# format string.
|
||||
printf(TMPFILE
|
||||
"$this_prefix$arrow%05.2f%% (%sB)%s\n", $perc, commify($bytes),
|
||||
$details);
|
||||
}
|
||||
|
||||
# Now read all the children.
|
||||
my $n_insig_children = 0;
|
||||
my $total_insig_children_szB = 0;
|
||||
my $this_prefix2 = $this_prefix . $child_midfix;
|
||||
for (my $i = 0; $i < $n_children; $i++) {
|
||||
# If child is the last sibling, the midfix is empty.
|
||||
my $child_midfix2 = ( $i+1 == $n_children ? " " : "| " );
|
||||
my ($is_child_insignificant, $child_insig_bytes) =
|
||||
# '0' means it's not the top node of the tree.
|
||||
read_heap_tree(0, $this_prefix2, $child_midfix2, "->",
|
||||
$mem_total_B);
|
||||
$n_insig_children += $is_child_insignificant;
|
||||
$total_insig_children_szB += $child_insig_bytes;
|
||||
}
|
||||
|
||||
if ($is_significant) {
|
||||
# If this was significant but any children were insignificant, print
|
||||
# the "in N places" line for them.
|
||||
if ($n_insig_children > 0) {
|
||||
$perc = safe_div_0(100 * $total_insig_children_szB, $mem_total_B);
|
||||
printf(TMPFILE "%s->%05.2f%% (%sB) in %d+ places, all below "
|
||||
. "ms_print's threshold (%05.2f%%)\n",
|
||||
$this_prefix2, $perc, commify($total_insig_children_szB),
|
||||
$n_insig_children, $threshold);
|
||||
print(TMPFILE "$this_prefix2\n");
|
||||
}
|
||||
|
||||
# If this node has no children, print an extra (mostly) empty line.
|
||||
if (0 == $n_children) {
|
||||
print(TMPFILE "$this_prefix2\n");
|
||||
}
|
||||
return (0, 0);
|
||||
|
||||
} else {
|
||||
return (1, $bytes);
|
||||
}
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Reading the input file: main
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
sub max_label_2($$)
|
||||
{
|
||||
my ($szB, $szB_scaled) = @_;
|
||||
|
||||
# For the label, if $szB is 999B or below, we print it as an integer.
|
||||
# Otherwise, we print it as a float with 5 characters (including the '.').
|
||||
# Examples (for bytes):
|
||||
# 1 --> 1 B
|
||||
# 999 --> 999 B
|
||||
# 1000 --> 0.977 KB
|
||||
# 1024 --> 1.000 KB
|
||||
# 10240 --> 10.00 KB
|
||||
# 102400 --> 100.0 KB
|
||||
# 1024000 --> 0.977 MB
|
||||
# 1048576 --> 1.000 MB
|
||||
#
|
||||
if ($szB < 1000) { return sprintf("%5d", $szB); }
|
||||
elsif ($szB_scaled < 10) { return sprintf("%5.3f", $szB_scaled); }
|
||||
elsif ($szB_scaled < 100) { return sprintf("%5.2f", $szB_scaled); }
|
||||
else { return sprintf("%5.1f", $szB_scaled); }
|
||||
}
|
||||
|
||||
# Work out the units for the max value, measured in instructions.
|
||||
sub i_max_label($)
|
||||
{
|
||||
my ($nI) = @_;
|
||||
|
||||
# We repeat until the number is less than 1000.
|
||||
my $nI_scaled = $nI;
|
||||
my $unit = "i";
|
||||
# Nb: 'k' is the "kilo" (1000) prefix.
|
||||
if ($nI_scaled >= 1000) { $unit = "ki"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Mi"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Gi"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Ti"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Pi"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Ei"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Zi"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Yi"; $nI_scaled /= 1024; }
|
||||
|
||||
return (max_label_2($nI, $nI_scaled), $unit);
|
||||
}
|
||||
|
||||
# Work out the units for the max value, measured in bytes.
|
||||
sub B_max_label($)
|
||||
{
|
||||
my ($szB) = @_;
|
||||
|
||||
# We repeat until the number is less than 1000, but we divide by 1024 on
|
||||
# each scaling.
|
||||
my $szB_scaled = $szB;
|
||||
my $unit = "B";
|
||||
# Nb: 'K' or 'k' are acceptable as the "binary kilo" (1024) prefix.
|
||||
# (Strictly speaking, should use "KiB" (kibibyte), "MiB" (mebibyte), etc,
|
||||
# but they're not in common use.)
|
||||
if ($szB_scaled >= 1000) { $unit = "KB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "MB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "GB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "TB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "PB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "EB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "ZB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "YB"; $szB_scaled /= 1024; }
|
||||
|
||||
return (max_label_2($szB, $szB_scaled), $unit);
|
||||
}
|
||||
|
||||
# Work out the units for the max value, measured in ms/s/h.
|
||||
sub t_max_label($)
|
||||
{
|
||||
my ($szB) = @_;
|
||||
|
||||
# We scale from millisecond to seconds to hours.
|
||||
#
|
||||
# XXX: this allows a number with 6 chars, eg. "3599.0 s"
|
||||
my $szB_scaled = $szB;
|
||||
my $unit = "ms";
|
||||
if ($szB_scaled >= 1000) { $unit = "s"; $szB_scaled /= 1000; }
|
||||
if ($szB_scaled >= 3600) { $unit = "h"; $szB_scaled /= 3600; }
|
||||
|
||||
return (max_label_2($szB, $szB_scaled), $unit);
|
||||
}
|
||||
|
||||
# This prints four things:
|
||||
# - the output header
|
||||
# - the graph
|
||||
# - the snapshot summaries (number, list of detailed ones)
|
||||
# - the snapshots
|
||||
#
|
||||
# The first three parts can't be printed until we've read the whole input file;
|
||||
# but the fourth part is much easier to print while we're reading the file. So
|
||||
# we print the fourth part to a tmp file, and then dump the tmp file at the
|
||||
# end.
|
||||
#
|
||||
sub read_input_file()
|
||||
{
|
||||
my $desc = ""; # Concatenated description lines.
|
||||
my $peak_mem_total_szB = 0;
|
||||
|
||||
# Info about each snapshot.
|
||||
my @snapshot_nums = ();
|
||||
my @times = ();
|
||||
my @mem_total_Bs = ();
|
||||
my @is_detaileds = ();
|
||||
my $peak_num = -1; # An initial value that will be ok if no peak
|
||||
# entry is in the file.
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Read start of input file.
|
||||
#-------------------------------------------------------------------------
|
||||
open(INPUTFILE, "< $input_file")
|
||||
|| die "Cannot open $input_file for reading\n";
|
||||
|
||||
# Read "desc:" lines.
|
||||
my $line;
|
||||
while ($line = get_line()) {
|
||||
if ($line =~ s/^desc://) {
|
||||
$desc .= $line;
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
# Read "cmd:" line (Nb: will already be in $line from "desc:" loop above).
|
||||
($line =~ /^cmd:\s*(.*)$/) or die("Line $.: missing 'cmd' line\n");
|
||||
$cmd = $1;
|
||||
|
||||
# Read "time_unit:" line.
|
||||
$line = get_line();
|
||||
($line =~ /^time_unit:\s*(.*)$/) or
|
||||
die("Line $.: missing 'time_unit' line\n");
|
||||
$time_unit = $1;
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Print snapshot list header to $tmp_file.
|
||||
#-------------------------------------------------------------------------
|
||||
open(TMPFILE, "> $tmp_file")
|
||||
|| die "Cannot open $tmp_file for writing\n";
|
||||
|
||||
my $time_column = sprintf("%14s", "time($time_unit)");
|
||||
my $column_format = "%3s %14s %16s %16s %13s %12s\n";
|
||||
my $header =
|
||||
$fancy_nl .
|
||||
sprintf($column_format
|
||||
, "n"
|
||||
, $time_column
|
||||
, "total(B)"
|
||||
, "useful-heap(B)"
|
||||
, "extra-heap(B)"
|
||||
, "stacks(B)"
|
||||
) .
|
||||
$fancy_nl;
|
||||
print(TMPFILE $header);
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Read body of input file.
|
||||
#-------------------------------------------------------------------------
|
||||
$line = get_line();
|
||||
while (defined $line) {
|
||||
my $snapshot_num = equals_num_line($line, "snapshot");
|
||||
my $time = equals_num_line(get_line(), "time");
|
||||
my $mem_heap_B = equals_num_line(get_line(), "mem_heap_B");
|
||||
my $mem_heap_extra_B = equals_num_line(get_line(), "mem_heap_extra_B");
|
||||
my $mem_stacks_B = equals_num_line(get_line(), "mem_stacks_B");
|
||||
my $mem_total_B = $mem_heap_B + $mem_heap_extra_B + $mem_stacks_B;
|
||||
my $heap_tree = equals_num_line(get_line(), "heap_tree");
|
||||
|
||||
# Print the snapshot data to $tmp_file.
|
||||
printf(TMPFILE $column_format,
|
||||
, $snapshot_num
|
||||
, commify($time)
|
||||
, commify($mem_total_B)
|
||||
, commify($mem_heap_B)
|
||||
, commify($mem_heap_extra_B)
|
||||
, commify($mem_stacks_B)
|
||||
);
|
||||
|
||||
# Remember the snapshot data.
|
||||
push(@snapshot_nums, $snapshot_num);
|
||||
push(@times, $time);
|
||||
push(@mem_total_Bs, $mem_total_B);
|
||||
push(@is_detaileds, ( $heap_tree eq "empty" ? 0 : 1 ));
|
||||
$peak_mem_total_szB = $mem_total_B
|
||||
if $mem_total_B > $peak_mem_total_szB;
|
||||
|
||||
# Read the heap tree, and if it's detailed, print it and a subsequent
|
||||
# snapshot list header to $tmp_file.
|
||||
if ($heap_tree eq "empty") {
|
||||
$line = get_line();
|
||||
} elsif ($heap_tree =~ "(detailed|peak)") {
|
||||
# If "peak", remember the number.
|
||||
if ($heap_tree eq "peak") {
|
||||
$peak_num = $snapshot_num;
|
||||
}
|
||||
# '1' means it's the top node of the tree.
|
||||
read_heap_tree(1, "", "", "", $mem_total_B);
|
||||
|
||||
# Print the header, unless there are no more snapshots.
|
||||
$line = get_line();
|
||||
if (defined $line) {
|
||||
print(TMPFILE $header);
|
||||
}
|
||||
} else {
|
||||
die("Line $.: expected 'empty' or '...' after 'heap_tree='\n");
|
||||
}
|
||||
}
|
||||
|
||||
close(INPUTFILE);
|
||||
close(TMPFILE);
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Print header.
|
||||
#-------------------------------------------------------------------------
|
||||
print($fancy_nl);
|
||||
print("Command: $cmd\n");
|
||||
print("Massif arguments: $desc");
|
||||
print("ms_print arguments:$ms_print_args\n");
|
||||
print($fancy_nl);
|
||||
print("\n\n");
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Setup for graph.
|
||||
#-------------------------------------------------------------------------
|
||||
# The ASCII graph.
|
||||
# Row 0 ([0..graph_x][0]) is the X-axis.
|
||||
# Column 0 ([0][0..graph_y]) is the Y-axis.
|
||||
# The rest ([1][1]..[graph_x][graph_y]) is the usable graph area.
|
||||
my @graph;
|
||||
my $x;
|
||||
my $y;
|
||||
|
||||
my $n_snapshots = scalar(@snapshot_nums);
|
||||
($n_snapshots > 0) or die;
|
||||
my $end_time = $times[$n_snapshots-1];
|
||||
($end_time >= 0) or die;
|
||||
|
||||
# Setup graph[][].
|
||||
$graph[0][0] = '+'; # axes join point
|
||||
for ($x = 1; $x <= $graph_x; $x++) { $graph[$x][0] = '-'; } # X-axis
|
||||
for ($y = 1; $y <= $graph_y; $y++) { $graph[0][$y] = '|'; } # Y-axis
|
||||
$graph[$graph_x][0] = '>'; # X-axis arrow
|
||||
$graph[0][$graph_y] = '^'; # Y-axis arrow
|
||||
for ($x = 1; $x <= $graph_x; $x++) { # usable area
|
||||
for ($y = 1; $y <= $graph_y; $y++) {
|
||||
$graph[$x][$y] = ' ';
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Write snapshot bars into graph[][].
|
||||
#-------------------------------------------------------------------------
|
||||
# Each row represents K bytes, which is 1/graph_y of the peak size
|
||||
# (and K can be non-integral). When drawing the column for a snapshot,
|
||||
# in order to fill the slot in row y (where the first row drawn on is
|
||||
# row 1) with a full-char (eg. ':'), it must be >= y*K. For example, if
|
||||
# K = 10 bytes, then the values 0, 4, 5, 9, 10, 14, 15, 19, 20, 24, 25,
|
||||
# 29, 30 would be drawn like this (showing one per column):
|
||||
#
|
||||
# y y * K
|
||||
# - -----------
|
||||
# 30 | : 3 3 * 10 = 30
|
||||
# 20 | ::::: 2 2 * 10 = 20
|
||||
# 10 | ::::::::: 1 1 * 10 = 10
|
||||
# 0 +-------------
|
||||
|
||||
my $peak_char = '#';
|
||||
my $detailed_char = '@';
|
||||
my $normal_char = ':';
|
||||
|
||||
# Work out how many bytes each row represents. If the peak size was 0,
|
||||
# make it 1 so that the Y-axis covers a non-zero range of values.
|
||||
# Likewise for end_time.
|
||||
if (0 == $peak_mem_total_szB) { $peak_mem_total_szB = 1; }
|
||||
if (0 == $end_time ) { $end_time = 1; }
|
||||
my $K = $peak_mem_total_szB / $graph_y;
|
||||
|
||||
$x = 0;
|
||||
my $prev_x = 0;
|
||||
my $prev_y_max = 0;
|
||||
my $prev_char = ':';
|
||||
|
||||
for (my $i = 0; $i < $n_snapshots; $i++) {
|
||||
|
||||
# Work out which column this snapshot belongs to.
|
||||
$prev_x = $x;
|
||||
my $x_pos_frac = ($times[$i] / ($end_time)) * $graph_x;
|
||||
$x = int($x_pos_frac) + 1; # +1 due to Y-axis
|
||||
# The final snapshot will spill over into the n+1th column, which
|
||||
# doesn't get shown. So we fudge that one and pull it back a
|
||||
# column, as if the end_time was actually end_time+epsilon.
|
||||
if ($times[$i] == $end_time) {
|
||||
($x == $graph_x+1) or die;
|
||||
$x = $graph_x;
|
||||
}
|
||||
|
||||
# If there was a gap between the previous snapshot's column and this
|
||||
# one, we draw a horizontal line in the gap (so long as it doesn't
|
||||
# trash the x-axis). Without this, graphs with a few sparse
|
||||
# snapshots look funny -- as if the memory usage is in temporary
|
||||
# spikes.
|
||||
if ($prev_y_max > 0) {
|
||||
for (my $x2 = $prev_x + 1; $x2 < $x; $x2++) {
|
||||
$graph[$x2][$prev_y_max] = $prev_char;
|
||||
}
|
||||
}
|
||||
|
||||
# Choose the column char.
|
||||
my $char;
|
||||
if ($i == $peak_num) { $char = $peak_char; }
|
||||
elsif ($is_detaileds[$i]) { $char = $detailed_char; }
|
||||
else { $char = $normal_char; }
|
||||
|
||||
# Grow this snapshot bar from bottom to top.
|
||||
my $y_max = 0;
|
||||
for ($y = 1; $y <= $graph_y; $y++) {
|
||||
if ($mem_total_Bs[$i] >= $y * $K) {
|
||||
# Priority order for chars: peak > detailed > normal
|
||||
my $should_draw_char =
|
||||
(($char eq $peak_char)
|
||||
or
|
||||
($char eq $detailed_char and
|
||||
$graph[$x][$y] ne $peak_char
|
||||
)
|
||||
or
|
||||
($char eq $normal_char and
|
||||
$graph[$x][$y] ne $peak_char and
|
||||
$graph[$x][$y] ne $detailed_char
|
||||
)
|
||||
);
|
||||
|
||||
if ($should_draw_char) {
|
||||
$graph[$x][$y] = $char;
|
||||
}
|
||||
$y_max = $y;
|
||||
}
|
||||
}
|
||||
$prev_y_max = $y_max;
|
||||
$prev_char = $char;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Print graph[][].
|
||||
#-------------------------------------------------------------------------
|
||||
my ($y_label, $y_unit) = B_max_label($peak_mem_total_szB);
|
||||
my ($x_label, $x_unit);
|
||||
if ($time_unit eq "i") { ($x_label, $x_unit) = i_max_label($end_time) }
|
||||
elsif ($time_unit eq "ms") { ($x_label, $x_unit) = t_max_label($end_time) }
|
||||
elsif ($time_unit eq "B") { ($x_label, $x_unit) = B_max_label($end_time) }
|
||||
else { die "bad time_unit: $time_unit\n"; }
|
||||
|
||||
printf(" %2s\n", $y_unit);
|
||||
for ($y = $graph_y; $y >= 0; $y--) {
|
||||
if ($graph_y == $y) { # top row
|
||||
print($y_label);
|
||||
} elsif (0 == $y) { # bottom row
|
||||
print(" 0 ");
|
||||
} else { # anywhere else
|
||||
print(" ");
|
||||
}
|
||||
|
||||
# Axis and data for the row.
|
||||
for ($x = 0; $x <= $graph_x; $x++) {
|
||||
printf("%s", $graph[$x][$y]);
|
||||
}
|
||||
if (0 == $y) {
|
||||
print("$x_unit\n");
|
||||
} else {
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
printf(" 0%s%5s\n", ' ' x ($graph_x-5), $x_label);
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Print snapshot numbers.
|
||||
#-------------------------------------------------------------------------
|
||||
print("\n");
|
||||
print("Number of snapshots: $n_snapshots\n");
|
||||
print(" Detailed snapshots: [");
|
||||
my $first_detailed = 1;
|
||||
for (my $i = 0; $i < $n_snapshots; $i++) {
|
||||
if ($is_detaileds[$i]) {
|
||||
if ($first_detailed) {
|
||||
printf("$i");
|
||||
$first_detailed = 0;
|
||||
} else {
|
||||
printf(", $i");
|
||||
}
|
||||
if ($i == $peak_num) {
|
||||
print(" (peak)");
|
||||
}
|
||||
}
|
||||
}
|
||||
print("]\n\n");
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Print snapshots, from $tmp_file.
|
||||
#-------------------------------------------------------------------------
|
||||
open(TMPFILE, "< $tmp_file")
|
||||
|| die "Cannot open $tmp_file for reading\n";
|
||||
|
||||
while (my $line = <TMPFILE>) {
|
||||
print($line);
|
||||
}
|
||||
unlink($tmp_file);
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Misc functions
|
||||
#-----------------------------------------------------------------------------
|
||||
sub commify ($) {
|
||||
my ($val) = @_;
|
||||
1 while ($val =~ s/^(\d+)(\d{3})/$1,$2/);
|
||||
return $val;
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# "main()"
|
||||
#----------------------------------------------------------------------------
|
||||
process_cmd_line();
|
||||
read_input_file();
|
||||
|
||||
##--------------------------------------------------------------------##
|
||||
##--- end ms_print.in ---##
|
||||
##--------------------------------------------------------------------##
|
||||
+685
@@ -0,0 +1,685 @@
|
||||
#! @PERL@
|
||||
|
||||
##--------------------------------------------------------------------##
|
||||
##--- Massif's results printer ms_print.in ---##
|
||||
##--------------------------------------------------------------------##
|
||||
|
||||
# This file is part of Massif, a Valgrind tool for profiling memory
|
||||
# usage of programs.
|
||||
#
|
||||
# Copyright (C) 2007-2015 Nicholas Nethercote
|
||||
# njn@valgrind.org
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 2 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
#
|
||||
# The GNU General Public License is contained in the file COPYING.
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Global variables, main data structures
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
# Command line of profiled program.
|
||||
my $cmd;
|
||||
|
||||
# Time unit used in profile.
|
||||
my $time_unit;
|
||||
|
||||
# Threshold dictating what percentage an entry must represent for us to
|
||||
# bother showing it.
|
||||
my $threshold = 1.0;
|
||||
|
||||
# Graph x and y dimensions.
|
||||
my $graph_x = 72;
|
||||
my $graph_y = 20;
|
||||
|
||||
# Input file name
|
||||
my $input_file = undef;
|
||||
|
||||
# Where to create tmp files. See also function VG_(tmpdir) in m_libcfile.c.
|
||||
my $tmp_dir = $ENV{"TMPDIR"};
|
||||
$tmp_dir = "@VG_TMPDIR@" if (! $tmp_dir);
|
||||
$tmp_dir = "/tmp" if (! $tmp_dir);
|
||||
|
||||
# Tmp file name.
|
||||
my $tmp_file = "$tmp_dir/ms_print.tmp.$$";
|
||||
|
||||
# Version number.
|
||||
my $version = "@VERSION@";
|
||||
|
||||
# Args passed, for printing.
|
||||
my $ms_print_args;
|
||||
|
||||
# Usage message.
|
||||
my $usage = <<END
|
||||
usage: ms_print [options] massif-out-file
|
||||
|
||||
options for the user, with defaults in [ ], are:
|
||||
-h --help show this message
|
||||
--version show version
|
||||
--threshold=<m.n> significance threshold, in percent [$threshold]
|
||||
--x=<4..1000> graph width, in columns [72]
|
||||
--y=<4..1000> graph height, in rows [20]
|
||||
|
||||
ms_print is Copyright (C) 2007-2015 Nicholas Nethercote.
|
||||
and licensed under the GNU General Public License, version 2.
|
||||
Bug reports, feedback, admiration, abuse, etc, to: njn\@valgrind.org.
|
||||
|
||||
END
|
||||
;
|
||||
|
||||
# Used in various places of output.
|
||||
my $fancy = '-' x 80;
|
||||
my $fancy_nl = $fancy . "\n";
|
||||
|
||||
# Returns 0 if the denominator is 0.
|
||||
sub safe_div_0($$)
|
||||
{
|
||||
my ($x, $y) = @_;
|
||||
return ($y ? $x / $y : 0);
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Argument and option handling
|
||||
#-----------------------------------------------------------------------------
|
||||
sub process_cmd_line()
|
||||
{
|
||||
my @files;
|
||||
|
||||
# Grab a copy of the arguments, for printing later.
|
||||
for my $arg (@ARGV) {
|
||||
$ms_print_args .= " $arg"; # The arguments.
|
||||
}
|
||||
|
||||
for my $arg (@ARGV) {
|
||||
|
||||
# Option handling
|
||||
if ($arg =~ /^-/) {
|
||||
|
||||
# --version
|
||||
if ($arg =~ /^--version$/) {
|
||||
die("ms_print-$version\n");
|
||||
|
||||
# --threshold=X (tolerates a trailing '%')
|
||||
} elsif ($arg =~ /^--threshold=([\d\.]+)%?$/) {
|
||||
$threshold = $1;
|
||||
($1 >= 0 && $1 <= 100) or die($usage);
|
||||
|
||||
} elsif ($arg =~ /^--x=(\d+)$/) {
|
||||
$graph_x = $1;
|
||||
(4 <= $graph_x && $graph_x <= 1000) or die($usage);
|
||||
|
||||
} elsif ($arg =~ /^--y=(\d+)$/) {
|
||||
$graph_y = $1;
|
||||
(4 <= $graph_y && $graph_y <= 1000) or die($usage);
|
||||
|
||||
} else { # -h and --help fall under this case
|
||||
die($usage);
|
||||
}
|
||||
} else {
|
||||
# Not an option. Remember it as a filename.
|
||||
push(@files, $arg);
|
||||
}
|
||||
}
|
||||
|
||||
# Must have chosen exactly one input file.
|
||||
if (scalar @files) {
|
||||
$input_file = $files[0];
|
||||
} else {
|
||||
die($usage);
|
||||
}
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Reading the input file: auxiliary functions
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Gets the next line, stripping comments and skipping blanks.
|
||||
# Returns undef at EOF.
|
||||
sub get_line()
|
||||
{
|
||||
while (my $line = <INPUTFILE>) {
|
||||
$line =~ s/#.*$//; # remove comments
|
||||
if ($line !~ /^\s*$/) {
|
||||
return $line; # return $line if non-empty
|
||||
}
|
||||
}
|
||||
return undef; # EOF: return undef
|
||||
}
|
||||
|
||||
sub equals_num_line($$)
|
||||
{
|
||||
my ($line, $fieldname) = @_;
|
||||
defined($line)
|
||||
or die("Line $.: expected \"$fieldname\" line, got end of file\n");
|
||||
$line =~ s/^$fieldname=(.*)\s*$//
|
||||
or die("Line $.: expected \"$fieldname\" line, got:\n$line");
|
||||
return $1;
|
||||
}
|
||||
|
||||
sub is_significant_XPt($$$)
|
||||
{
|
||||
my ($is_top_node, $xpt_szB, $total_szB) = @_;
|
||||
($xpt_szB <= $total_szB) or die;
|
||||
# Nb: we always consider the alloc-XPt significant, even if the size is
|
||||
# zero.
|
||||
return $is_top_node || 0 == $threshold ||
|
||||
( $total_szB != 0 && $xpt_szB * 100 / $total_szB >= $threshold );
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Reading the input file: reading heap trees
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
# Forward declaration, because it's recursive.
|
||||
sub read_heap_tree($$$$$);
|
||||
|
||||
# Return pair: if the tree was significant, both are zero. If it was
|
||||
# insignificant, the first element is 1 and the second is the number of
|
||||
# bytes.
|
||||
sub read_heap_tree($$$$$)
|
||||
{
|
||||
# Read the line and determine if it is significant.
|
||||
my ($is_top_node, $this_prefix, $child_midfix, $arrow, $mem_total_B) = @_;
|
||||
my $line = get_line();
|
||||
(defined $line and $line =~ /^\s*n(\d+):\s*(\d+)(.*)$/)
|
||||
or die("Line $.: expected a tree node line, got:\n$line\n");
|
||||
my $n_children = $1;
|
||||
my $bytes = $2;
|
||||
my $details = $3;
|
||||
my $perc = safe_div_0(100 * $bytes, $mem_total_B);
|
||||
# Nb: we always print the alloc-XPt, even if its size is zero.
|
||||
my $is_significant = is_significant_XPt($is_top_node, $bytes, $mem_total_B);
|
||||
|
||||
# We precede this node's line with "$this_prefix.$arrow". We precede
|
||||
# any children of this node with "$this_prefix$child_midfix$arrow".
|
||||
if ($is_significant) {
|
||||
# Nb: $details might have '%' in it, so don't embed directly in the
|
||||
# format string.
|
||||
printf(TMPFILE
|
||||
"$this_prefix$arrow%05.2f%% (%sB)%s\n", $perc, commify($bytes),
|
||||
$details);
|
||||
}
|
||||
|
||||
# Now read all the children.
|
||||
my $n_insig_children = 0;
|
||||
my $total_insig_children_szB = 0;
|
||||
my $this_prefix2 = $this_prefix . $child_midfix;
|
||||
for (my $i = 0; $i < $n_children; $i++) {
|
||||
# If child is the last sibling, the midfix is empty.
|
||||
my $child_midfix2 = ( $i+1 == $n_children ? " " : "| " );
|
||||
my ($is_child_insignificant, $child_insig_bytes) =
|
||||
# '0' means it's not the top node of the tree.
|
||||
read_heap_tree(0, $this_prefix2, $child_midfix2, "->",
|
||||
$mem_total_B);
|
||||
$n_insig_children += $is_child_insignificant;
|
||||
$total_insig_children_szB += $child_insig_bytes;
|
||||
}
|
||||
|
||||
if ($is_significant) {
|
||||
# If this was significant but any children were insignificant, print
|
||||
# the "in N places" line for them.
|
||||
if ($n_insig_children > 0) {
|
||||
$perc = safe_div_0(100 * $total_insig_children_szB, $mem_total_B);
|
||||
printf(TMPFILE "%s->%05.2f%% (%sB) in %d+ places, all below "
|
||||
. "ms_print's threshold (%05.2f%%)\n",
|
||||
$this_prefix2, $perc, commify($total_insig_children_szB),
|
||||
$n_insig_children, $threshold);
|
||||
print(TMPFILE "$this_prefix2\n");
|
||||
}
|
||||
|
||||
# If this node has no children, print an extra (mostly) empty line.
|
||||
if (0 == $n_children) {
|
||||
print(TMPFILE "$this_prefix2\n");
|
||||
}
|
||||
return (0, 0);
|
||||
|
||||
} else {
|
||||
return (1, $bytes);
|
||||
}
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Reading the input file: main
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
sub max_label_2($$)
|
||||
{
|
||||
my ($szB, $szB_scaled) = @_;
|
||||
|
||||
# For the label, if $szB is 999B or below, we print it as an integer.
|
||||
# Otherwise, we print it as a float with 5 characters (including the '.').
|
||||
# Examples (for bytes):
|
||||
# 1 --> 1 B
|
||||
# 999 --> 999 B
|
||||
# 1000 --> 0.977 KB
|
||||
# 1024 --> 1.000 KB
|
||||
# 10240 --> 10.00 KB
|
||||
# 102400 --> 100.0 KB
|
||||
# 1024000 --> 0.977 MB
|
||||
# 1048576 --> 1.000 MB
|
||||
#
|
||||
if ($szB < 1000) { return sprintf("%5d", $szB); }
|
||||
elsif ($szB_scaled < 10) { return sprintf("%5.3f", $szB_scaled); }
|
||||
elsif ($szB_scaled < 100) { return sprintf("%5.2f", $szB_scaled); }
|
||||
else { return sprintf("%5.1f", $szB_scaled); }
|
||||
}
|
||||
|
||||
# Work out the units for the max value, measured in instructions.
|
||||
sub i_max_label($)
|
||||
{
|
||||
my ($nI) = @_;
|
||||
|
||||
# We repeat until the number is less than 1000.
|
||||
my $nI_scaled = $nI;
|
||||
my $unit = "i";
|
||||
# Nb: 'k' is the "kilo" (1000) prefix.
|
||||
if ($nI_scaled >= 1000) { $unit = "ki"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Mi"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Gi"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Ti"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Pi"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Ei"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Zi"; $nI_scaled /= 1024; }
|
||||
if ($nI_scaled >= 1000) { $unit = "Yi"; $nI_scaled /= 1024; }
|
||||
|
||||
return (max_label_2($nI, $nI_scaled), $unit);
|
||||
}
|
||||
|
||||
# Work out the units for the max value, measured in bytes.
|
||||
sub B_max_label($)
|
||||
{
|
||||
my ($szB) = @_;
|
||||
|
||||
# We repeat until the number is less than 1000, but we divide by 1024 on
|
||||
# each scaling.
|
||||
my $szB_scaled = $szB;
|
||||
my $unit = "B";
|
||||
# Nb: 'K' or 'k' are acceptable as the "binary kilo" (1024) prefix.
|
||||
# (Strictly speaking, should use "KiB" (kibibyte), "MiB" (mebibyte), etc,
|
||||
# but they're not in common use.)
|
||||
if ($szB_scaled >= 1000) { $unit = "KB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "MB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "GB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "TB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "PB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "EB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "ZB"; $szB_scaled /= 1024; }
|
||||
if ($szB_scaled >= 1000) { $unit = "YB"; $szB_scaled /= 1024; }
|
||||
|
||||
return (max_label_2($szB, $szB_scaled), $unit);
|
||||
}
|
||||
|
||||
# Work out the units for the max value, measured in ms/s/h.
|
||||
sub t_max_label($)
|
||||
{
|
||||
my ($szB) = @_;
|
||||
|
||||
# We scale from millisecond to seconds to hours.
|
||||
#
|
||||
# XXX: this allows a number with 6 chars, eg. "3599.0 s"
|
||||
my $szB_scaled = $szB;
|
||||
my $unit = "ms";
|
||||
if ($szB_scaled >= 1000) { $unit = "s"; $szB_scaled /= 1000; }
|
||||
if ($szB_scaled >= 3600) { $unit = "h"; $szB_scaled /= 3600; }
|
||||
|
||||
return (max_label_2($szB, $szB_scaled), $unit);
|
||||
}
|
||||
|
||||
# This prints four things:
|
||||
# - the output header
|
||||
# - the graph
|
||||
# - the snapshot summaries (number, list of detailed ones)
|
||||
# - the snapshots
|
||||
#
|
||||
# The first three parts can't be printed until we've read the whole input file;
|
||||
# but the fourth part is much easier to print while we're reading the file. So
|
||||
# we print the fourth part to a tmp file, and then dump the tmp file at the
|
||||
# end.
|
||||
#
|
||||
sub read_input_file()
|
||||
{
|
||||
my $desc = ""; # Concatenated description lines.
|
||||
my $peak_mem_total_szB = 0;
|
||||
|
||||
# Info about each snapshot.
|
||||
my @snapshot_nums = ();
|
||||
my @times = ();
|
||||
my @mem_total_Bs = ();
|
||||
my @is_detaileds = ();
|
||||
my $peak_num = -1; # An initial value that will be ok if no peak
|
||||
# entry is in the file.
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Read start of input file.
|
||||
#-------------------------------------------------------------------------
|
||||
open(INPUTFILE, "< $input_file")
|
||||
|| die "Cannot open $input_file for reading\n";
|
||||
|
||||
# Read "desc:" lines.
|
||||
my $line;
|
||||
while ($line = get_line()) {
|
||||
if ($line =~ s/^desc://) {
|
||||
$desc .= $line;
|
||||
} else {
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
# Read "cmd:" line (Nb: will already be in $line from "desc:" loop above).
|
||||
($line =~ /^cmd:\s*(.*)$/) or die("Line $.: missing 'cmd' line\n");
|
||||
$cmd = $1;
|
||||
|
||||
# Read "time_unit:" line.
|
||||
$line = get_line();
|
||||
($line =~ /^time_unit:\s*(.*)$/) or
|
||||
die("Line $.: missing 'time_unit' line\n");
|
||||
$time_unit = $1;
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Print snapshot list header to $tmp_file.
|
||||
#-------------------------------------------------------------------------
|
||||
open(TMPFILE, "> $tmp_file")
|
||||
|| die "Cannot open $tmp_file for writing\n";
|
||||
|
||||
my $time_column = sprintf("%14s", "time($time_unit)");
|
||||
my $column_format = "%3s %14s %16s %16s %13s %12s\n";
|
||||
my $header =
|
||||
$fancy_nl .
|
||||
sprintf($column_format
|
||||
, "n"
|
||||
, $time_column
|
||||
, "total(B)"
|
||||
, "useful-heap(B)"
|
||||
, "extra-heap(B)"
|
||||
, "stacks(B)"
|
||||
) .
|
||||
$fancy_nl;
|
||||
print(TMPFILE $header);
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Read body of input file.
|
||||
#-------------------------------------------------------------------------
|
||||
$line = get_line();
|
||||
while (defined $line) {
|
||||
my $snapshot_num = equals_num_line($line, "snapshot");
|
||||
my $time = equals_num_line(get_line(), "time");
|
||||
my $mem_heap_B = equals_num_line(get_line(), "mem_heap_B");
|
||||
my $mem_heap_extra_B = equals_num_line(get_line(), "mem_heap_extra_B");
|
||||
my $mem_stacks_B = equals_num_line(get_line(), "mem_stacks_B");
|
||||
my $mem_total_B = $mem_heap_B + $mem_heap_extra_B + $mem_stacks_B;
|
||||
my $heap_tree = equals_num_line(get_line(), "heap_tree");
|
||||
|
||||
# Print the snapshot data to $tmp_file.
|
||||
printf(TMPFILE $column_format,
|
||||
, $snapshot_num
|
||||
, commify($time)
|
||||
, commify($mem_total_B)
|
||||
, commify($mem_heap_B)
|
||||
, commify($mem_heap_extra_B)
|
||||
, commify($mem_stacks_B)
|
||||
);
|
||||
|
||||
# Remember the snapshot data.
|
||||
push(@snapshot_nums, $snapshot_num);
|
||||
push(@times, $time);
|
||||
push(@mem_total_Bs, $mem_total_B);
|
||||
push(@is_detaileds, ( $heap_tree eq "empty" ? 0 : 1 ));
|
||||
$peak_mem_total_szB = $mem_total_B
|
||||
if $mem_total_B > $peak_mem_total_szB;
|
||||
|
||||
# Read the heap tree, and if it's detailed, print it and a subsequent
|
||||
# snapshot list header to $tmp_file.
|
||||
if ($heap_tree eq "empty") {
|
||||
$line = get_line();
|
||||
} elsif ($heap_tree =~ "(detailed|peak)") {
|
||||
# If "peak", remember the number.
|
||||
if ($heap_tree eq "peak") {
|
||||
$peak_num = $snapshot_num;
|
||||
}
|
||||
# '1' means it's the top node of the tree.
|
||||
read_heap_tree(1, "", "", "", $mem_total_B);
|
||||
|
||||
# Print the header, unless there are no more snapshots.
|
||||
$line = get_line();
|
||||
if (defined $line) {
|
||||
print(TMPFILE $header);
|
||||
}
|
||||
} else {
|
||||
die("Line $.: expected 'empty' or '...' after 'heap_tree='\n");
|
||||
}
|
||||
}
|
||||
|
||||
close(INPUTFILE);
|
||||
close(TMPFILE);
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Print header.
|
||||
#-------------------------------------------------------------------------
|
||||
print($fancy_nl);
|
||||
print("Command: $cmd\n");
|
||||
print("Massif arguments: $desc");
|
||||
print("ms_print arguments:$ms_print_args\n");
|
||||
print($fancy_nl);
|
||||
print("\n\n");
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Setup for graph.
|
||||
#-------------------------------------------------------------------------
|
||||
# The ASCII graph.
|
||||
# Row 0 ([0..graph_x][0]) is the X-axis.
|
||||
# Column 0 ([0][0..graph_y]) is the Y-axis.
|
||||
# The rest ([1][1]..[graph_x][graph_y]) is the usable graph area.
|
||||
my @graph;
|
||||
my $x;
|
||||
my $y;
|
||||
|
||||
my $n_snapshots = scalar(@snapshot_nums);
|
||||
($n_snapshots > 0) or die;
|
||||
my $end_time = $times[$n_snapshots-1];
|
||||
($end_time >= 0) or die;
|
||||
|
||||
# Setup graph[][].
|
||||
$graph[0][0] = '+'; # axes join point
|
||||
for ($x = 1; $x <= $graph_x; $x++) { $graph[$x][0] = '-'; } # X-axis
|
||||
for ($y = 1; $y <= $graph_y; $y++) { $graph[0][$y] = '|'; } # Y-axis
|
||||
$graph[$graph_x][0] = '>'; # X-axis arrow
|
||||
$graph[0][$graph_y] = '^'; # Y-axis arrow
|
||||
for ($x = 1; $x <= $graph_x; $x++) { # usable area
|
||||
for ($y = 1; $y <= $graph_y; $y++) {
|
||||
$graph[$x][$y] = ' ';
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Write snapshot bars into graph[][].
|
||||
#-------------------------------------------------------------------------
|
||||
# Each row represents K bytes, which is 1/graph_y of the peak size
|
||||
# (and K can be non-integral). When drawing the column for a snapshot,
|
||||
# in order to fill the slot in row y (where the first row drawn on is
|
||||
# row 1) with a full-char (eg. ':'), it must be >= y*K. For example, if
|
||||
# K = 10 bytes, then the values 0, 4, 5, 9, 10, 14, 15, 19, 20, 24, 25,
|
||||
# 29, 30 would be drawn like this (showing one per column):
|
||||
#
|
||||
# y y * K
|
||||
# - -----------
|
||||
# 30 | : 3 3 * 10 = 30
|
||||
# 20 | ::::: 2 2 * 10 = 20
|
||||
# 10 | ::::::::: 1 1 * 10 = 10
|
||||
# 0 +-------------
|
||||
|
||||
my $peak_char = '#';
|
||||
my $detailed_char = '@';
|
||||
my $normal_char = ':';
|
||||
|
||||
# Work out how many bytes each row represents. If the peak size was 0,
|
||||
# make it 1 so that the Y-axis covers a non-zero range of values.
|
||||
# Likewise for end_time.
|
||||
if (0 == $peak_mem_total_szB) { $peak_mem_total_szB = 1; }
|
||||
if (0 == $end_time ) { $end_time = 1; }
|
||||
my $K = $peak_mem_total_szB / $graph_y;
|
||||
|
||||
$x = 0;
|
||||
my $prev_x = 0;
|
||||
my $prev_y_max = 0;
|
||||
my $prev_char = ':';
|
||||
|
||||
for (my $i = 0; $i < $n_snapshots; $i++) {
|
||||
|
||||
# Work out which column this snapshot belongs to.
|
||||
$prev_x = $x;
|
||||
my $x_pos_frac = ($times[$i] / ($end_time)) * $graph_x;
|
||||
$x = int($x_pos_frac) + 1; # +1 due to Y-axis
|
||||
# The final snapshot will spill over into the n+1th column, which
|
||||
# doesn't get shown. So we fudge that one and pull it back a
|
||||
# column, as if the end_time was actually end_time+epsilon.
|
||||
if ($times[$i] == $end_time) {
|
||||
($x == $graph_x+1) or die;
|
||||
$x = $graph_x;
|
||||
}
|
||||
|
||||
# If there was a gap between the previous snapshot's column and this
|
||||
# one, we draw a horizontal line in the gap (so long as it doesn't
|
||||
# trash the x-axis). Without this, graphs with a few sparse
|
||||
# snapshots look funny -- as if the memory usage is in temporary
|
||||
# spikes.
|
||||
if ($prev_y_max > 0) {
|
||||
for (my $x2 = $prev_x + 1; $x2 < $x; $x2++) {
|
||||
$graph[$x2][$prev_y_max] = $prev_char;
|
||||
}
|
||||
}
|
||||
|
||||
# Choose the column char.
|
||||
my $char;
|
||||
if ($i == $peak_num) { $char = $peak_char; }
|
||||
elsif ($is_detaileds[$i]) { $char = $detailed_char; }
|
||||
else { $char = $normal_char; }
|
||||
|
||||
# Grow this snapshot bar from bottom to top.
|
||||
my $y_max = 0;
|
||||
for ($y = 1; $y <= $graph_y; $y++) {
|
||||
if ($mem_total_Bs[$i] >= $y * $K) {
|
||||
# Priority order for chars: peak > detailed > normal
|
||||
my $should_draw_char =
|
||||
(($char eq $peak_char)
|
||||
or
|
||||
($char eq $detailed_char and
|
||||
$graph[$x][$y] ne $peak_char
|
||||
)
|
||||
or
|
||||
($char eq $normal_char and
|
||||
$graph[$x][$y] ne $peak_char and
|
||||
$graph[$x][$y] ne $detailed_char
|
||||
)
|
||||
);
|
||||
|
||||
if ($should_draw_char) {
|
||||
$graph[$x][$y] = $char;
|
||||
}
|
||||
$y_max = $y;
|
||||
}
|
||||
}
|
||||
$prev_y_max = $y_max;
|
||||
$prev_char = $char;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Print graph[][].
|
||||
#-------------------------------------------------------------------------
|
||||
my ($y_label, $y_unit) = B_max_label($peak_mem_total_szB);
|
||||
my ($x_label, $x_unit);
|
||||
if ($time_unit eq "i") { ($x_label, $x_unit) = i_max_label($end_time) }
|
||||
elsif ($time_unit eq "ms") { ($x_label, $x_unit) = t_max_label($end_time) }
|
||||
elsif ($time_unit eq "B") { ($x_label, $x_unit) = B_max_label($end_time) }
|
||||
else { die "bad time_unit: $time_unit\n"; }
|
||||
|
||||
printf(" %2s\n", $y_unit);
|
||||
for ($y = $graph_y; $y >= 0; $y--) {
|
||||
if ($graph_y == $y) { # top row
|
||||
print($y_label);
|
||||
} elsif (0 == $y) { # bottom row
|
||||
print(" 0 ");
|
||||
} else { # anywhere else
|
||||
print(" ");
|
||||
}
|
||||
|
||||
# Axis and data for the row.
|
||||
for ($x = 0; $x <= $graph_x; $x++) {
|
||||
printf("%s", $graph[$x][$y]);
|
||||
}
|
||||
if (0 == $y) {
|
||||
print("$x_unit\n");
|
||||
} else {
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
printf(" 0%s%5s\n", ' ' x ($graph_x-5), $x_label);
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Print snapshot numbers.
|
||||
#-------------------------------------------------------------------------
|
||||
print("\n");
|
||||
print("Number of snapshots: $n_snapshots\n");
|
||||
print(" Detailed snapshots: [");
|
||||
my $first_detailed = 1;
|
||||
for (my $i = 0; $i < $n_snapshots; $i++) {
|
||||
if ($is_detaileds[$i]) {
|
||||
if ($first_detailed) {
|
||||
printf("$i");
|
||||
$first_detailed = 0;
|
||||
} else {
|
||||
printf(", $i");
|
||||
}
|
||||
if ($i == $peak_num) {
|
||||
print(" (peak)");
|
||||
}
|
||||
}
|
||||
}
|
||||
print("]\n\n");
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
# Print snapshots, from $tmp_file.
|
||||
#-------------------------------------------------------------------------
|
||||
open(TMPFILE, "< $tmp_file")
|
||||
|| die "Cannot open $tmp_file for reading\n";
|
||||
|
||||
while (my $line = <TMPFILE>) {
|
||||
print($line);
|
||||
}
|
||||
unlink($tmp_file);
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Misc functions
|
||||
#-----------------------------------------------------------------------------
|
||||
sub commify ($) {
|
||||
my ($val) = @_;
|
||||
1 while ($val =~ s/^(\d+)(\d{3})/$1,$2/);
|
||||
return $val;
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# "main()"
|
||||
#----------------------------------------------------------------------------
|
||||
process_cmd_line();
|
||||
read_input_file();
|
||||
|
||||
##--------------------------------------------------------------------##
|
||||
##--- end ms_print.in ---##
|
||||
##--------------------------------------------------------------------##
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
@@ -0,0 +1 @@
|
||||
# dummy
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,81 @@
|
||||
|
||||
include $(top_srcdir)/Makefile.tool-tests.am
|
||||
|
||||
dist_noinst_SCRIPTS = filter_stderr filter_verbose
|
||||
|
||||
EXTRA_DIST = \
|
||||
alloc-fns-A.post.exp alloc-fns-A.stderr.exp alloc-fns-A.vgtest \
|
||||
alloc-fns-B.post.exp alloc-fns-B.stderr.exp alloc-fns-B.vgtest \
|
||||
basic.post.exp basic.stderr.exp basic.vgtest \
|
||||
basic2.post.exp basic2.stderr.exp basic2.vgtest \
|
||||
big-alloc.post.exp big-alloc.post.exp-64bit big-alloc.post.exp-ppc64 \
|
||||
big-alloc.stderr.exp big-alloc.vgtest \
|
||||
deep-A.post.exp deep-A.stderr.exp deep-A.vgtest \
|
||||
deep-B.post.exp deep-B.stderr.exp deep-B.vgtest \
|
||||
deep-C.post.exp deep-C.stderr.exp deep-C.vgtest \
|
||||
deep-D.post.exp deep-D.stderr.exp deep-D.vgtest \
|
||||
deep-D.post.exp-ppc64 \
|
||||
culling1.stderr.exp culling1.vgtest \
|
||||
culling2.stderr.exp culling2.vgtest \
|
||||
custom_alloc.post.exp custom_alloc.stderr.exp custom_alloc.vgtest \
|
||||
ignored.post.exp ignored.stderr.exp ignored.vgtest \
|
||||
ignoring.post.exp ignoring.stderr.exp ignoring.vgtest \
|
||||
insig.post.exp insig.stderr.exp insig.vgtest \
|
||||
long-names.post.exp long-names.stderr.exp long-names.vgtest \
|
||||
long-time.post.exp long-time.stderr.exp long-time.vgtest \
|
||||
malloc_usable.stderr.exp malloc_usable.vgtest \
|
||||
new-cpp.post.exp new-cpp.stderr.exp new-cpp.vgtest \
|
||||
no-stack-no-heap.post.exp no-stack-no-heap.stderr.exp no-stack-no-heap.vgtest \
|
||||
null.post.exp null.stderr.exp null.vgtest \
|
||||
one.post.exp one.post.exp2 one.stderr.exp one.vgtest \
|
||||
overloaded-new.post.exp overloaded-new.post.exp-mips32 \
|
||||
overloaded-new.stderr.exp overloaded-new.vgtest \
|
||||
pages_as_heap.stderr.exp pages_as_heap.vgtest \
|
||||
peak.post.exp peak.stderr.exp peak.vgtest \
|
||||
peak2.post.exp peak2.stderr.exp peak2.vgtest \
|
||||
realloc.post.exp realloc.stderr.exp realloc.vgtest \
|
||||
thresholds_0_0.post.exp \
|
||||
thresholds_0_0.stderr.exp thresholds_0_0.vgtest \
|
||||
thresholds_0_10.post.exp thresholds_0_10.stderr.exp \
|
||||
thresholds_0_10.vgtest \
|
||||
thresholds_10_0.post.exp \
|
||||
thresholds_10_0.stderr.exp thresholds_10_0.vgtest \
|
||||
thresholds_5_0.post.exp \
|
||||
thresholds_5_0.stderr.exp thresholds_5_0.vgtest \
|
||||
thresholds_5_10.post.exp \
|
||||
thresholds_5_10.stderr.exp thresholds_5_10.vgtest \
|
||||
thresholds_10_10.post.exp \
|
||||
thresholds_10_10.stderr.exp thresholds_10_10.vgtest \
|
||||
zero1.post.exp zero1.stderr.exp zero1.vgtest \
|
||||
zero2.post.exp zero2.stderr.exp zero2.vgtest
|
||||
|
||||
check_PROGRAMS = \
|
||||
alloc-fns \
|
||||
basic \
|
||||
big-alloc \
|
||||
culling1 culling2 \
|
||||
custom_alloc \
|
||||
deep \
|
||||
ignored \
|
||||
ignoring \
|
||||
insig \
|
||||
long-names \
|
||||
long-time \
|
||||
malloc_usable \
|
||||
new-cpp \
|
||||
null \
|
||||
one \
|
||||
overloaded-new \
|
||||
pages_as_heap \
|
||||
peak \
|
||||
realloc \
|
||||
thresholds \
|
||||
zero
|
||||
|
||||
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
|
||||
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
|
||||
|
||||
# C++ tests
|
||||
new_cpp_SOURCES = new-cpp.cpp
|
||||
overloaded_new_SOURCES = overloaded-new.cpp
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,82 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./alloc-fns
|
||||
Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
3.516^ @
|
||||
| @
|
||||
| @
|
||||
| :::::::@
|
||||
| : @
|
||||
| ::::::::: @
|
||||
| : : @
|
||||
| ::::::::: : @
|
||||
| : : : @
|
||||
| ::::::::: : : @
|
||||
| : : : : @
|
||||
| : : : : @
|
||||
| ::::::::: : : : @
|
||||
| : : : : : @
|
||||
| ::::::::: : : : : @
|
||||
| : : : : : : @
|
||||
| ::::::::: : : : : : @
|
||||
| : : : : : : : @
|
||||
| ::::::::: : : : : : : @
|
||||
| : : : : : : : : @
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 3.516
|
||||
|
||||
Number of snapshots: 10
|
||||
Detailed snapshots: [9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 400 400 400 0 0
|
||||
2 800 800 800 0 0
|
||||
3 1,200 1,200 1,200 0 0
|
||||
4 1,600 1,600 1,600 0 0
|
||||
5 2,000 2,000 2,000 0 0
|
||||
6 2,400 2,400 2,400 0 0
|
||||
7 2,800 2,800 2,800 0 0
|
||||
8 3,200 3,200 3,200 0 0
|
||||
9 3,600 3,600 3,600 0 0
|
||||
100.00% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->44.44% (1,600B) 0x........: d4 (alloc-fns.c:18)
|
||||
| ->33.33% (1,200B) 0x........: d3 (alloc-fns.c:19)
|
||||
| | ->22.22% (800B) 0x........: d2 (alloc-fns.c:20)
|
||||
| | | ->11.11% (400B) 0x........: d1 (alloc-fns.c:21)
|
||||
| | | | ->11.11% (400B) 0x........: main (alloc-fns.c:30)
|
||||
| | | |
|
||||
| | | ->11.11% (400B) 0x........: main (alloc-fns.c:31)
|
||||
| | |
|
||||
| | ->11.11% (400B) 0x........: main (alloc-fns.c:32)
|
||||
| |
|
||||
| ->11.11% (400B) 0x........: main (alloc-fns.c:33)
|
||||
|
|
||||
->33.33% (1,200B) 0x........: a4 (alloc-fns.c:3)
|
||||
| ->33.33% (1,200B) 0x........: a3 (alloc-fns.c:4)
|
||||
| ->33.33% (1,200B) 0x........: a2 (alloc-fns.c:5)
|
||||
| ->33.33% (1,200B) 0x........: a1 (alloc-fns.c:6)
|
||||
| ->11.11% (400B) 0x........: main (alloc-fns.c:25)
|
||||
| |
|
||||
| ->11.11% (400B) 0x........: main (alloc-fns.c:26)
|
||||
| |
|
||||
| ->11.11% (400B) 0x........: main (alloc-fns.c:27)
|
||||
|
|
||||
->11.11% (400B) 0x........: b4 (alloc-fns.c:8)
|
||||
| ->11.11% (400B) 0x........: b3 (alloc-fns.c:9)
|
||||
| ->11.11% (400B) 0x........: b2 (alloc-fns.c:10)
|
||||
| ->11.11% (400B) 0x........: b1 (alloc-fns.c:11)
|
||||
| ->11.11% (400B) 0x........: main (alloc-fns.c:28)
|
||||
|
|
||||
->11.11% (400B) 0x........: c4 (alloc-fns.c:13)
|
||||
->11.11% (400B) 0x........: c3 (alloc-fns.c:14)
|
||||
->11.11% (400B) 0x........: c2 (alloc-fns.c:15)
|
||||
->11.11% (400B) 0x........: c1 (alloc-fns.c:16)
|
||||
->11.11% (400B) 0x........: main (alloc-fns.c:29)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: alloc-fns
|
||||
vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,72 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./alloc-fns
|
||||
Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --alloc-fn=b3 --alloc-fn=c4 --alloc-fn=c3 --alloc-fn=c2 --alloc-fn=d4 --alloc-fn=d3 --alloc-fn=d2 --alloc-fn=d1 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
3.516^ @
|
||||
| @
|
||||
| @
|
||||
| :::::::@
|
||||
| : @
|
||||
| ::::::::: @
|
||||
| : : @
|
||||
| ::::::::: : @
|
||||
| : : : @
|
||||
| ::::::::: : : @
|
||||
| : : : : @
|
||||
| : : : : @
|
||||
| ::::::::: : : : @
|
||||
| : : : : : @
|
||||
| ::::::::: : : : : @
|
||||
| : : : : : : @
|
||||
| ::::::::: : : : : : @
|
||||
| : : : : : : : @
|
||||
| ::::::::: : : : : : : @
|
||||
| : : : : : : : : @
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 3.516
|
||||
|
||||
Number of snapshots: 10
|
||||
Detailed snapshots: [9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 400 400 400 0 0
|
||||
2 800 800 800 0 0
|
||||
3 1,200 1,200 1,200 0 0
|
||||
4 1,600 1,600 1,600 0 0
|
||||
5 2,000 2,000 2,000 0 0
|
||||
6 2,400 2,400 2,400 0 0
|
||||
7 2,800 2,800 2,800 0 0
|
||||
8 3,200 3,200 3,200 0 0
|
||||
9 3,600 3,600 3,600 0 0
|
||||
100.00% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->33.33% (1,200B) 0x........: a3 (alloc-fns.c:4)
|
||||
| ->33.33% (1,200B) 0x........: a2 (alloc-fns.c:5)
|
||||
| ->33.33% (1,200B) 0x........: a1 (alloc-fns.c:6)
|
||||
| ->11.11% (400B) 0x........: main (alloc-fns.c:25)
|
||||
| |
|
||||
| ->11.11% (400B) 0x........: main (alloc-fns.c:26)
|
||||
| |
|
||||
| ->11.11% (400B) 0x........: main (alloc-fns.c:27)
|
||||
|
|
||||
->11.11% (400B) 0x........: c1 (alloc-fns.c:16)
|
||||
| ->11.11% (400B) 0x........: main (alloc-fns.c:29)
|
||||
|
|
||||
->11.11% (400B) 0x........: main (alloc-fns.c:30)
|
||||
|
|
||||
->11.11% (400B) 0x........: main (alloc-fns.c:31)
|
||||
|
|
||||
->11.11% (400B) 0x........: main (alloc-fns.c:32)
|
||||
|
|
||||
->11.11% (400B) 0x........: main (alloc-fns.c:33)
|
||||
|
|
||||
->11.11% (400B) 0x........: b2 (alloc-fns.c:10)
|
||||
->11.11% (400B) 0x........: b1 (alloc-fns.c:11)
|
||||
->11.11% (400B) 0x........: main (alloc-fns.c:28)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: alloc-fns
|
||||
vgopts: --stacks=no --time-unit=B --heap-admin=0 --alloc-fn=a4 --alloc-fn=b4 --alloc-fn=b3 --alloc-fn=c4 --alloc-fn=c3 --alloc-fn=c2 --alloc-fn=d4 --alloc-fn=d3 --alloc-fn=d2 --alloc-fn=d1 --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,35 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
void a4(int n) { malloc(n); }
|
||||
void a3(int n) { a4(n); }
|
||||
void a2(int n) { a3(n); }
|
||||
void a1(int n) { a2(n); }
|
||||
|
||||
void b4(int n) { malloc(n); }
|
||||
void b3(int n) { b4(n); }
|
||||
void b2(int n) { b3(n); }
|
||||
void b1(int n) { b2(n); }
|
||||
|
||||
void c4(int n) { malloc(n); }
|
||||
void c3(int n) { c4(n); }
|
||||
void c2(int n) { c3(n); }
|
||||
void c1(int n) { c2(n); }
|
||||
|
||||
void d4(int n) { malloc(n); }
|
||||
void d3(int n) { d4(n); }
|
||||
void d2(int n) { d3(n); }
|
||||
void d1(int n) { d2(n); }
|
||||
|
||||
int main(void)
|
||||
{
|
||||
a1(400); // We use a number that's a multiple of 16, so there's no slop
|
||||
a1(400); // bytes.
|
||||
a1(400);
|
||||
b1(400);
|
||||
c1(400);
|
||||
d1(400);
|
||||
d2(400);
|
||||
d3(400);
|
||||
d4(400);
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
// Allocate some memory and then deallocate it, to get a nice up-then-down
|
||||
// graph.
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// N=36 gives us 72 snapshots, which fills the text graph nicely.
|
||||
#define N 36
|
||||
int i;
|
||||
int* a[N];
|
||||
|
||||
for (i = 0; i < N; i++) {
|
||||
a[i] = malloc(400); // 400 is divisible by 16 -- so no slop.
|
||||
}
|
||||
for (i = 0; i < N-1; i++) {
|
||||
free(a[i]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./basic
|
||||
Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
14.34^ #
|
||||
| :#:
|
||||
| :::#:::
|
||||
| :::::#:::::
|
||||
| @::::::#:::::::
|
||||
| ::@::::::#:::::::::
|
||||
| :::@::::::#:::::::::@
|
||||
| :::::@::::::#:::::::::@::
|
||||
| :::::::@::::::#:::::::::@::::
|
||||
| :::::::::@::::::#:::::::::@::::::
|
||||
| :@:::::::::@::::::#:::::::::@::::::::
|
||||
| ::@:::::::::@::::::#:::::::::@:::::::::
|
||||
| ::::@:::::::::@::::::#:::::::::@:::::::::@:
|
||||
| ::::::@:::::::::@::::::#:::::::::@:::::::::@:::
|
||||
| ::::::::@:::::::::@::::::#:::::::::@:::::::::@:::::
|
||||
| @:::::::::@:::::::::@::::::#:::::::::@:::::::::@:::::::
|
||||
| :@:::::::::@:::::::::@::::::#:::::::::@:::::::::@::::::::
|
||||
| :::@:::::::::@:::::::::@::::::#:::::::::@:::::::::@:::::::::@
|
||||
| :::::@:::::::::@:::::::::@::::::#:::::::::@:::::::::@:::::::::@::
|
||||
| :::::::@:::::::::@:::::::::@::::::#:::::::::@:::::::::@:::::::::@::::
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 28.29
|
||||
|
||||
Number of snapshots: 73
|
||||
Detailed snapshots: [9, 19, 29, 37 (peak), 47, 57, 67]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 408 408 400 8 0
|
||||
2 816 816 800 16 0
|
||||
3 1,224 1,224 1,200 24 0
|
||||
4 1,632 1,632 1,600 32 0
|
||||
5 2,040 2,040 2,000 40 0
|
||||
6 2,448 2,448 2,400 48 0
|
||||
7 2,856 2,856 2,800 56 0
|
||||
8 3,264 3,264 3,200 64 0
|
||||
9 3,672 3,672 3,600 72 0
|
||||
98.04% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (3,600B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 4,080 4,080 4,000 80 0
|
||||
11 4,488 4,488 4,400 88 0
|
||||
12 4,896 4,896 4,800 96 0
|
||||
13 5,304 5,304 5,200 104 0
|
||||
14 5,712 5,712 5,600 112 0
|
||||
15 6,120 6,120 6,000 120 0
|
||||
16 6,528 6,528 6,400 128 0
|
||||
17 6,936 6,936 6,800 136 0
|
||||
18 7,344 7,344 7,200 144 0
|
||||
19 7,752 7,752 7,600 152 0
|
||||
98.04% (7,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (7,600B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
20 8,160 8,160 8,000 160 0
|
||||
21 8,568 8,568 8,400 168 0
|
||||
22 8,976 8,976 8,800 176 0
|
||||
23 9,384 9,384 9,200 184 0
|
||||
24 9,792 9,792 9,600 192 0
|
||||
25 10,200 10,200 10,000 200 0
|
||||
26 10,608 10,608 10,400 208 0
|
||||
27 11,016 11,016 10,800 216 0
|
||||
28 11,424 11,424 11,200 224 0
|
||||
29 11,832 11,832 11,600 232 0
|
||||
98.04% (11,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (11,600B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
30 12,240 12,240 12,000 240 0
|
||||
31 12,648 12,648 12,400 248 0
|
||||
32 13,056 13,056 12,800 256 0
|
||||
33 13,464 13,464 13,200 264 0
|
||||
34 13,872 13,872 13,600 272 0
|
||||
35 14,280 14,280 14,000 280 0
|
||||
36 14,688 14,688 14,400 288 0
|
||||
37 14,688 14,688 14,400 288 0
|
||||
98.04% (14,400B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (14,400B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
38 15,096 14,280 14,000 280 0
|
||||
39 15,504 13,872 13,600 272 0
|
||||
40 15,912 13,464 13,200 264 0
|
||||
41 16,320 13,056 12,800 256 0
|
||||
42 16,728 12,648 12,400 248 0
|
||||
43 17,136 12,240 12,000 240 0
|
||||
44 17,544 11,832 11,600 232 0
|
||||
45 17,952 11,424 11,200 224 0
|
||||
46 18,360 11,016 10,800 216 0
|
||||
47 18,768 10,608 10,400 208 0
|
||||
98.04% (10,400B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (10,400B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
48 19,176 10,200 10,000 200 0
|
||||
49 19,584 9,792 9,600 192 0
|
||||
50 19,992 9,384 9,200 184 0
|
||||
51 20,400 8,976 8,800 176 0
|
||||
52 20,808 8,568 8,400 168 0
|
||||
53 21,216 8,160 8,000 160 0
|
||||
54 21,624 7,752 7,600 152 0
|
||||
55 22,032 7,344 7,200 144 0
|
||||
56 22,440 6,936 6,800 136 0
|
||||
57 22,848 6,528 6,400 128 0
|
||||
98.04% (6,400B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (6,400B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
58 23,256 6,120 6,000 120 0
|
||||
59 23,664 5,712 5,600 112 0
|
||||
60 24,072 5,304 5,200 104 0
|
||||
61 24,480 4,896 4,800 96 0
|
||||
62 24,888 4,488 4,400 88 0
|
||||
63 25,296 4,080 4,000 80 0
|
||||
64 25,704 3,672 3,600 72 0
|
||||
65 26,112 3,264 3,200 64 0
|
||||
66 26,520 2,856 2,800 56 0
|
||||
67 26,928 2,448 2,400 48 0
|
||||
98.04% (2,400B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (2,400B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
68 27,336 2,040 2,000 40 0
|
||||
69 27,744 1,632 1,600 32 0
|
||||
70 28,152 1,224 1,200 24 0
|
||||
71 28,560 816 800 16 0
|
||||
72 28,968 408 400 8 0
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: basic
|
||||
vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,96 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./basic
|
||||
Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --detailed-freq=1 --max-snapshots=10 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
14.34^ ########
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| @@@@@@@@@@# @@@@@@@@@
|
||||
| @ # @
|
||||
| @ # @
|
||||
| @ # @
|
||||
| @ # @ @@@@@@@@
|
||||
| @@@@@@@@@ # @ @
|
||||
| @ @ # @ @
|
||||
| @ @ # @ @
|
||||
| @ @ # @ @
|
||||
| @ @ # @ @ @@@@@@@@
|
||||
| @@@@@@@@@@@@ @ # @ @ @
|
||||
| @ @ @ # @ @ @
|
||||
| @ @ @ # @ @ @
|
||||
| @ @ @ # @ @ @ @
|
||||
| @ @ @ # @ @ @ @
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 27.09
|
||||
|
||||
Number of snapshots: 9
|
||||
Detailed snapshots: [0, 1, 2, 3, 4 (peak), 5, 6, 7, 8]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
00.00% (0B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
1 3,672 3,672 3,600 72 0
|
||||
98.04% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (3,600B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
2 7,752 7,752 7,600 152 0
|
||||
98.04% (7,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (7,600B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
3 11,016 11,016 10,800 216 0
|
||||
98.04% (10,800B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (10,800B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
4 14,688 14,688 14,400 288 0
|
||||
98.04% (14,400B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (14,400B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
5 17,952 11,424 11,200 224 0
|
||||
98.04% (11,200B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (11,200B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
6 21,216 8,160 8,000 160 0
|
||||
98.04% (8,000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (8,000B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
7 24,480 4,896 4,800 96 0
|
||||
98.04% (4,800B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (4,800B) 0x........: main (basic.c:14)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
8 27,744 1,632 1,600 32 0
|
||||
98.04% (1,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (1,600B) 0x........: main (basic.c:14)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: basic
|
||||
vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out --detailed-freq=1 --max-snapshots=10
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
// Do some big allocations. At one point, the threshold calculation was
|
||||
// multiplying the szB by 10000 without using a Long, which was causing the
|
||||
// threshold calculation to go wrong due to a 32-bit overflow.
|
||||
|
||||
int main(void)
|
||||
{
|
||||
// 100MB all up.
|
||||
int i;
|
||||
for (i = 0; i < 10; i++) {
|
||||
malloc(10 * 1024 * 1024);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./big-alloc
|
||||
Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
MB
|
||||
100.0^ :
|
||||
| :
|
||||
| @@@@@@@:
|
||||
| @ :
|
||||
| :::::::@ :
|
||||
| : @ :
|
||||
| :::::::: @ :
|
||||
| : : @ :
|
||||
| :::::::: : @ :
|
||||
| : : : @ :
|
||||
| :::::::: : : @ :
|
||||
| : : : : @ :
|
||||
| ::::::::: : : : @ :
|
||||
| : : : : : @ :
|
||||
| :::::::: : : : : @ :
|
||||
| : : : : : : @ :
|
||||
| :::::::: : : : : : @ :
|
||||
| : : : : : : : @ :
|
||||
| :::::::: : : : : : : @ :
|
||||
| : : : : : : : : @ :
|
||||
0 +----------------------------------------------------------------------->MB
|
||||
0 100.0
|
||||
|
||||
Number of snapshots: 11
|
||||
Detailed snapshots: [9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 10,489,832 10,489,832 10,485,760 4,072 0
|
||||
2 20,979,664 20,979,664 20,971,520 8,144 0
|
||||
3 31,469,496 31,469,496 31,457,280 12,216 0
|
||||
4 41,959,328 41,959,328 41,943,040 16,288 0
|
||||
5 52,449,160 52,449,160 52,428,800 20,360 0
|
||||
6 62,938,992 62,938,992 62,914,560 24,432 0
|
||||
7 73,428,824 73,428,824 73,400,320 28,504 0
|
||||
8 83,918,656 83,918,656 83,886,080 32,576 0
|
||||
9 94,408,488 94,408,488 94,371,840 36,648 0
|
||||
99.96% (94,371,840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->99.96% (94,371,840B) 0x........: main (big-alloc.c:12)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 104,898,320 104,898,320 104,857,600 40,720 0
|
||||
@@ -0,0 +1,54 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./big-alloc
|
||||
Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
MB
|
||||
100.0^ :
|
||||
| :
|
||||
| @@@@@@@:
|
||||
| @ :
|
||||
| :::::::@ :
|
||||
| : @ :
|
||||
| :::::::: @ :
|
||||
| : : @ :
|
||||
| :::::::: : @ :
|
||||
| : : : @ :
|
||||
| :::::::: : : @ :
|
||||
| : : : : @ :
|
||||
| ::::::::: : : : @ :
|
||||
| : : : : : @ :
|
||||
| :::::::: : : : : @ :
|
||||
| : : : : : : @ :
|
||||
| :::::::: : : : : : @ :
|
||||
| : : : : : : : @ :
|
||||
| :::::::: : : : : : : @ :
|
||||
| : : : : : : : : @ :
|
||||
0 +----------------------------------------------------------------------->MB
|
||||
0 100.0
|
||||
|
||||
Number of snapshots: 11
|
||||
Detailed snapshots: [9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 10,489,800 10,489,800 10,485,760 4,040 0
|
||||
2 20,979,600 20,979,600 20,971,520 8,080 0
|
||||
3 31,469,400 31,469,400 31,457,280 12,120 0
|
||||
4 41,959,200 41,959,200 41,943,040 16,160 0
|
||||
5 52,449,000 52,449,000 52,428,800 20,200 0
|
||||
6 62,938,800 62,938,800 62,914,560 24,240 0
|
||||
7 73,428,600 73,428,600 73,400,320 28,280 0
|
||||
8 83,918,400 83,918,400 83,886,080 32,320 0
|
||||
9 94,408,200 94,408,200 94,371,840 36,360 0
|
||||
99.96% (94,371,840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->99.96% (94,371,840B) 0x........: main (big-alloc.c:12)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 104,898,000 104,898,000 104,857,600 40,400 0
|
||||
@@ -0,0 +1,54 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./big-alloc
|
||||
Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
MB
|
||||
100.6^ :
|
||||
| :
|
||||
| @@@@@@@:
|
||||
| @ :
|
||||
| :::::::@ :
|
||||
| : @ :
|
||||
| :::::::: @ :
|
||||
| : : @ :
|
||||
| :::::::: : @ :
|
||||
| : : : @ :
|
||||
| :::::::: : : @ :
|
||||
| : : : : @ :
|
||||
| ::::::::: : : : @ :
|
||||
| : : : : : @ :
|
||||
| :::::::: : : : : @ :
|
||||
| : : : : : : @ :
|
||||
| :::::::: : : : : : @ :
|
||||
| : : : : : : : @ :
|
||||
| :::::::: : : : : : : @ :
|
||||
| : : : : : : : : @ :
|
||||
0 +----------------------------------------------------------------------->MB
|
||||
0 100.6
|
||||
|
||||
Number of snapshots: 11
|
||||
Detailed snapshots: [9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 10,551,240 10,551,240 10,485,760 65,480 0
|
||||
2 21,102,480 21,102,480 20,971,520 130,960 0
|
||||
3 31,653,720 31,653,720 31,457,280 196,440 0
|
||||
4 42,204,960 42,204,960 41,943,040 261,920 0
|
||||
5 52,756,200 52,756,200 52,428,800 327,400 0
|
||||
6 63,307,440 63,307,440 62,914,560 392,880 0
|
||||
7 73,858,680 73,858,680 73,400,320 458,360 0
|
||||
8 84,409,920 84,409,920 83,886,080 523,840 0
|
||||
9 94,961,160 94,961,160 94,371,840 589,320 0
|
||||
99.38% (94,371,840B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->99.38% (94,371,840B) 0x........: main (big-alloc.c:12)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 105,512,400 105,512,400 104,857,600 654,800 0
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: big-alloc
|
||||
vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 200; i++) {
|
||||
malloc(16); // divisible by 16 -- no slop
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,448 @@
|
||||
Massif: alloc-fns:
|
||||
Massif: malloc
|
||||
Massif: __builtin_new
|
||||
Massif: operator new(unsigned)
|
||||
Massif: operator new(unsigned long)
|
||||
Massif: __builtin_vec_new
|
||||
Massif: operator new[](unsigned)
|
||||
Massif: operator new[](unsigned long)
|
||||
Massif: calloc
|
||||
Massif: realloc
|
||||
Massif: memalign
|
||||
Massif: posix_memalign
|
||||
Massif: valloc
|
||||
Massif: operator new(unsigned, std::nothrow_t const&)
|
||||
Massif: operator new[](unsigned, std::nothrow_t const&)
|
||||
Massif: operator new(unsigned long, std::nothrow_t const&)
|
||||
Massif: operator new[](unsigned long, std::nothrow_t const&)
|
||||
Massif: ignore-fns:
|
||||
Massif: 0: __part_load_locale
|
||||
Massif: 1: __time_load_locale
|
||||
Massif: 2: dwarf2_unwind_dyld_add_image_hook
|
||||
Massif: 3: get_or_create_key_element
|
||||
Massif: startup S. 0 (t:0, hp:0, ex:0, st:0)
|
||||
Massif: alloc S. 1 (t:32, hp:16, ex:16, st:0)
|
||||
Massif: alloc S. 2 (t:64, hp:32, ex:32, st:0)
|
||||
Massif: alloc S. 3 (t:96, hp:48, ex:48, st:0)
|
||||
Massif: alloc S. 4 (t:128, hp:64, ex:64, st:0)
|
||||
Massif: alloc S. 5 (t:160, hp:80, ex:80, st:0)
|
||||
Massif: alloc S. 6 (t:192, hp:96, ex:96, st:0)
|
||||
Massif: alloc S. 7 (t:224, hp:112, ex:112, st:0)
|
||||
Massif: alloc S. 8 (t:256, hp:128, ex:128, st:0)
|
||||
Massif: alloc Sd 9 (t:288, hp:144, ex:144, st:0)
|
||||
Massif: alloc S. 10 (t:320, hp:160, ex:160, st:0)
|
||||
Massif: alloc S. 11 (t:352, hp:176, ex:176, st:0)
|
||||
Massif: alloc S. 12 (t:384, hp:192, ex:192, st:0)
|
||||
Massif: alloc S. 13 (t:416, hp:208, ex:208, st:0)
|
||||
Massif: alloc S. 14 (t:448, hp:224, ex:224, st:0)
|
||||
Massif: alloc S. 15 (t:480, hp:240, ex:240, st:0)
|
||||
Massif: alloc S. 16 (t:512, hp:256, ex:256, st:0)
|
||||
Massif: alloc S. 17 (t:544, hp:272, ex:272, st:0)
|
||||
Massif: alloc S. 18 (t:576, hp:288, ex:288, st:0)
|
||||
Massif: alloc Sd 19 (t:608, hp:304, ex:304, st:0)
|
||||
Massif: alloc S. 20 (t:640, hp:320, ex:320, st:0)
|
||||
Massif: alloc S. 21 (t:672, hp:336, ex:336, st:0)
|
||||
Massif: alloc S. 22 (t:704, hp:352, ex:352, st:0)
|
||||
Massif: alloc S. 23 (t:736, hp:368, ex:368, st:0)
|
||||
Massif: alloc S. 24 (t:768, hp:384, ex:384, st:0)
|
||||
Massif: alloc S. 25 (t:800, hp:400, ex:400, st:0)
|
||||
Massif: alloc S. 26 (t:832, hp:416, ex:416, st:0)
|
||||
Massif: alloc S. 27 (t:864, hp:432, ex:432, st:0)
|
||||
Massif: alloc S. 28 (t:896, hp:448, ex:448, st:0)
|
||||
Massif: alloc Sd 29 (t:928, hp:464, ex:464, st:0)
|
||||
Massif: alloc S. 30 (t:960, hp:480, ex:480, st:0)
|
||||
Massif: alloc S. 31 (t:992, hp:496, ex:496, st:0)
|
||||
Massif: alloc S. 32 (t:1024, hp:512, ex:512, st:0)
|
||||
Massif: alloc S. 33 (t:1056, hp:528, ex:528, st:0)
|
||||
Massif: alloc S. 34 (t:1088, hp:544, ex:544, st:0)
|
||||
Massif: alloc S. 35 (t:1120, hp:560, ex:560, st:0)
|
||||
Massif: alloc S. 36 (t:1152, hp:576, ex:576, st:0)
|
||||
Massif: alloc S. 37 (t:1184, hp:592, ex:592, st:0)
|
||||
Massif: alloc S. 38 (t:1216, hp:608, ex:608, st:0)
|
||||
Massif: alloc Sd 39 (t:1248, hp:624, ex:624, st:0)
|
||||
Massif: alloc S. 40 (t:1280, hp:640, ex:640, st:0)
|
||||
Massif: alloc S. 41 (t:1312, hp:656, ex:656, st:0)
|
||||
Massif: alloc S. 42 (t:1344, hp:672, ex:672, st:0)
|
||||
Massif: alloc S. 43 (t:1376, hp:688, ex:688, st:0)
|
||||
Massif: alloc S. 44 (t:1408, hp:704, ex:704, st:0)
|
||||
Massif: alloc S. 45 (t:1440, hp:720, ex:720, st:0)
|
||||
Massif: alloc S. 46 (t:1472, hp:736, ex:736, st:0)
|
||||
Massif: alloc S. 47 (t:1504, hp:752, ex:752, st:0)
|
||||
Massif: alloc S. 48 (t:1536, hp:768, ex:768, st:0)
|
||||
Massif: alloc Sd 49 (t:1568, hp:784, ex:784, st:0)
|
||||
Massif: alloc S. 50 (t:1600, hp:800, ex:800, st:0)
|
||||
Massif: alloc S. 51 (t:1632, hp:816, ex:816, st:0)
|
||||
Massif: alloc S. 52 (t:1664, hp:832, ex:832, st:0)
|
||||
Massif: alloc S. 53 (t:1696, hp:848, ex:848, st:0)
|
||||
Massif: alloc S. 54 (t:1728, hp:864, ex:864, st:0)
|
||||
Massif: alloc S. 55 (t:1760, hp:880, ex:880, st:0)
|
||||
Massif: alloc S. 56 (t:1792, hp:896, ex:896, st:0)
|
||||
Massif: alloc S. 57 (t:1824, hp:912, ex:912, st:0)
|
||||
Massif: alloc S. 58 (t:1856, hp:928, ex:928, st:0)
|
||||
Massif: alloc Sd 59 (t:1888, hp:944, ex:944, st:0)
|
||||
Massif: alloc S. 60 (t:1920, hp:960, ex:960, st:0)
|
||||
Massif: alloc S. 61 (t:1952, hp:976, ex:976, st:0)
|
||||
Massif: alloc S. 62 (t:1984, hp:992, ex:992, st:0)
|
||||
Massif: alloc S. 63 (t:2016, hp:1008, ex:1008, st:0)
|
||||
Massif: alloc S. 64 (t:2048, hp:1024, ex:1024, st:0)
|
||||
Massif: alloc S. 65 (t:2080, hp:1040, ex:1040, st:0)
|
||||
Massif: alloc S. 66 (t:2112, hp:1056, ex:1056, st:0)
|
||||
Massif: alloc S. 67 (t:2144, hp:1072, ex:1072, st:0)
|
||||
Massif: alloc S. 68 (t:2176, hp:1088, ex:1088, st:0)
|
||||
Massif: alloc Sd 69 (t:2208, hp:1104, ex:1104, st:0)
|
||||
Massif: alloc S. 70 (t:2240, hp:1120, ex:1120, st:0)
|
||||
Massif: alloc S. 71 (t:2272, hp:1136, ex:1136, st:0)
|
||||
Massif: alloc S. 72 (t:2304, hp:1152, ex:1152, st:0)
|
||||
Massif: alloc S. 73 (t:2336, hp:1168, ex:1168, st:0)
|
||||
Massif: alloc S. 74 (t:2368, hp:1184, ex:1184, st:0)
|
||||
Massif: alloc S. 75 (t:2400, hp:1200, ex:1200, st:0)
|
||||
Massif: alloc S. 76 (t:2432, hp:1216, ex:1216, st:0)
|
||||
Massif: alloc S. 77 (t:2464, hp:1232, ex:1232, st:0)
|
||||
Massif: alloc S. 78 (t:2496, hp:1248, ex:1248, st:0)
|
||||
Massif: alloc Sd 79 (t:2528, hp:1264, ex:1264, st:0)
|
||||
Massif: alloc S. 80 (t:2560, hp:1280, ex:1280, st:0)
|
||||
Massif: alloc S. 81 (t:2592, hp:1296, ex:1296, st:0)
|
||||
Massif: alloc S. 82 (t:2624, hp:1312, ex:1312, st:0)
|
||||
Massif: alloc S. 83 (t:2656, hp:1328, ex:1328, st:0)
|
||||
Massif: alloc S. 84 (t:2688, hp:1344, ex:1344, st:0)
|
||||
Massif: alloc S. 85 (t:2720, hp:1360, ex:1360, st:0)
|
||||
Massif: alloc S. 86 (t:2752, hp:1376, ex:1376, st:0)
|
||||
Massif: alloc S. 87 (t:2784, hp:1392, ex:1392, st:0)
|
||||
Massif: alloc S. 88 (t:2816, hp:1408, ex:1408, st:0)
|
||||
Massif: alloc Sd 89 (t:2848, hp:1424, ex:1424, st:0)
|
||||
Massif: alloc S. 90 (t:2880, hp:1440, ex:1440, st:0)
|
||||
Massif: alloc S. 91 (t:2912, hp:1456, ex:1456, st:0)
|
||||
Massif: alloc S. 92 (t:2944, hp:1472, ex:1472, st:0)
|
||||
Massif: alloc S. 93 (t:2976, hp:1488, ex:1488, st:0)
|
||||
Massif: alloc S. 94 (t:3008, hp:1504, ex:1504, st:0)
|
||||
Massif: alloc S. 95 (t:3040, hp:1520, ex:1520, st:0)
|
||||
Massif: alloc S. 96 (t:3072, hp:1536, ex:1536, st:0)
|
||||
Massif: alloc S. 97 (t:3104, hp:1552, ex:1552, st:0)
|
||||
Massif: alloc S. 98 (t:3136, hp:1568, ex:1568, st:0)
|
||||
Massif: alloc Sd 99 (t:3168, hp:1584, ex:1584, st:0)
|
||||
Massif: Culling...
|
||||
Massif: 0 (t-span = 64) S. 1 (t:32, hp:16, ex:16, st:0)
|
||||
Massif: 1 (t-span = 64) S. 3 (t:96, hp:48, ex:48, st:0)
|
||||
Massif: 2 (t-span = 64) S. 5 (t:160, hp:80, ex:80, st:0)
|
||||
Massif: 3 (t-span = 64) S. 7 (t:224, hp:112, ex:112, st:0)
|
||||
Massif: 4 (t-span = 64) Sd 9 (t:288, hp:144, ex:144, st:0)
|
||||
Massif: 5 (t-span = 64) S. 11 (t:352, hp:176, ex:176, st:0)
|
||||
Massif: 6 (t-span = 64) S. 13 (t:416, hp:208, ex:208, st:0)
|
||||
Massif: 7 (t-span = 64) S. 15 (t:480, hp:240, ex:240, st:0)
|
||||
Massif: 8 (t-span = 64) S. 17 (t:544, hp:272, ex:272, st:0)
|
||||
Massif: 9 (t-span = 64) Sd 19 (t:608, hp:304, ex:304, st:0)
|
||||
Massif: 10 (t-span = 64) S. 21 (t:672, hp:336, ex:336, st:0)
|
||||
Massif: 11 (t-span = 64) S. 23 (t:736, hp:368, ex:368, st:0)
|
||||
Massif: 12 (t-span = 64) S. 25 (t:800, hp:400, ex:400, st:0)
|
||||
Massif: 13 (t-span = 64) S. 27 (t:864, hp:432, ex:432, st:0)
|
||||
Massif: 14 (t-span = 64) Sd 29 (t:928, hp:464, ex:464, st:0)
|
||||
Massif: 15 (t-span = 64) S. 31 (t:992, hp:496, ex:496, st:0)
|
||||
Massif: 16 (t-span = 64) S. 33 (t:1056, hp:528, ex:528, st:0)
|
||||
Massif: 17 (t-span = 64) S. 35 (t:1120, hp:560, ex:560, st:0)
|
||||
Massif: 18 (t-span = 64) S. 37 (t:1184, hp:592, ex:592, st:0)
|
||||
Massif: 19 (t-span = 64) Sd 39 (t:1248, hp:624, ex:624, st:0)
|
||||
Massif: 20 (t-span = 64) S. 41 (t:1312, hp:656, ex:656, st:0)
|
||||
Massif: 21 (t-span = 64) S. 43 (t:1376, hp:688, ex:688, st:0)
|
||||
Massif: 22 (t-span = 64) S. 45 (t:1440, hp:720, ex:720, st:0)
|
||||
Massif: 23 (t-span = 64) S. 47 (t:1504, hp:752, ex:752, st:0)
|
||||
Massif: 24 (t-span = 64) Sd 49 (t:1568, hp:784, ex:784, st:0)
|
||||
Massif: 25 (t-span = 64) S. 51 (t:1632, hp:816, ex:816, st:0)
|
||||
Massif: 26 (t-span = 64) S. 53 (t:1696, hp:848, ex:848, st:0)
|
||||
Massif: 27 (t-span = 64) S. 55 (t:1760, hp:880, ex:880, st:0)
|
||||
Massif: 28 (t-span = 64) S. 57 (t:1824, hp:912, ex:912, st:0)
|
||||
Massif: 29 (t-span = 64) Sd 59 (t:1888, hp:944, ex:944, st:0)
|
||||
Massif: 30 (t-span = 64) S. 61 (t:1952, hp:976, ex:976, st:0)
|
||||
Massif: 31 (t-span = 64) S. 63 (t:2016, hp:1008, ex:1008, st:0)
|
||||
Massif: 32 (t-span = 64) S. 65 (t:2080, hp:1040, ex:1040, st:0)
|
||||
Massif: 33 (t-span = 64) S. 67 (t:2144, hp:1072, ex:1072, st:0)
|
||||
Massif: 34 (t-span = 64) Sd 69 (t:2208, hp:1104, ex:1104, st:0)
|
||||
Massif: 35 (t-span = 64) S. 71 (t:2272, hp:1136, ex:1136, st:0)
|
||||
Massif: 36 (t-span = 64) S. 73 (t:2336, hp:1168, ex:1168, st:0)
|
||||
Massif: 37 (t-span = 64) S. 75 (t:2400, hp:1200, ex:1200, st:0)
|
||||
Massif: 38 (t-span = 64) S. 77 (t:2464, hp:1232, ex:1232, st:0)
|
||||
Massif: 39 (t-span = 64) Sd 79 (t:2528, hp:1264, ex:1264, st:0)
|
||||
Massif: 40 (t-span = 64) S. 81 (t:2592, hp:1296, ex:1296, st:0)
|
||||
Massif: 41 (t-span = 64) S. 83 (t:2656, hp:1328, ex:1328, st:0)
|
||||
Massif: 42 (t-span = 64) S. 85 (t:2720, hp:1360, ex:1360, st:0)
|
||||
Massif: 43 (t-span = 64) S. 87 (t:2784, hp:1392, ex:1392, st:0)
|
||||
Massif: 44 (t-span = 64) Sd 89 (t:2848, hp:1424, ex:1424, st:0)
|
||||
Massif: 45 (t-span = 64) S. 91 (t:2912, hp:1456, ex:1456, st:0)
|
||||
Massif: 46 (t-span = 64) S. 93 (t:2976, hp:1488, ex:1488, st:0)
|
||||
Massif: 47 (t-span = 64) S. 95 (t:3040, hp:1520, ex:1520, st:0)
|
||||
Massif: 48 (t-span = 64) S. 97 (t:3104, hp:1552, ex:1552, st:0)
|
||||
Massif: 49 (t-span = 96) S. 98 (t:3136, hp:1568, ex:1568, st:0)
|
||||
Massif: Finished culling ( 50 of 100 deleted)
|
||||
Massif: post-cull S. 0 (t:0, hp:0, ex:0, st:0)
|
||||
Massif: post-cull S. 1 (t:64, hp:32, ex:32, st:0)
|
||||
Massif: post-cull S. 2 (t:128, hp:64, ex:64, st:0)
|
||||
Massif: post-cull S. 3 (t:192, hp:96, ex:96, st:0)
|
||||
Massif: post-cull S. 4 (t:256, hp:128, ex:128, st:0)
|
||||
Massif: post-cull S. 5 (t:320, hp:160, ex:160, st:0)
|
||||
Massif: post-cull S. 6 (t:384, hp:192, ex:192, st:0)
|
||||
Massif: post-cull S. 7 (t:448, hp:224, ex:224, st:0)
|
||||
Massif: post-cull S. 8 (t:512, hp:256, ex:256, st:0)
|
||||
Massif: post-cull S. 9 (t:576, hp:288, ex:288, st:0)
|
||||
Massif: post-cull S. 10 (t:640, hp:320, ex:320, st:0)
|
||||
Massif: post-cull S. 11 (t:704, hp:352, ex:352, st:0)
|
||||
Massif: post-cull S. 12 (t:768, hp:384, ex:384, st:0)
|
||||
Massif: post-cull S. 13 (t:832, hp:416, ex:416, st:0)
|
||||
Massif: post-cull S. 14 (t:896, hp:448, ex:448, st:0)
|
||||
Massif: post-cull S. 15 (t:960, hp:480, ex:480, st:0)
|
||||
Massif: post-cull S. 16 (t:1024, hp:512, ex:512, st:0)
|
||||
Massif: post-cull S. 17 (t:1088, hp:544, ex:544, st:0)
|
||||
Massif: post-cull S. 18 (t:1152, hp:576, ex:576, st:0)
|
||||
Massif: post-cull S. 19 (t:1216, hp:608, ex:608, st:0)
|
||||
Massif: post-cull S. 20 (t:1280, hp:640, ex:640, st:0)
|
||||
Massif: post-cull S. 21 (t:1344, hp:672, ex:672, st:0)
|
||||
Massif: post-cull S. 22 (t:1408, hp:704, ex:704, st:0)
|
||||
Massif: post-cull S. 23 (t:1472, hp:736, ex:736, st:0)
|
||||
Massif: post-cull S. 24 (t:1536, hp:768, ex:768, st:0)
|
||||
Massif: post-cull S. 25 (t:1600, hp:800, ex:800, st:0)
|
||||
Massif: post-cull S. 26 (t:1664, hp:832, ex:832, st:0)
|
||||
Massif: post-cull S. 27 (t:1728, hp:864, ex:864, st:0)
|
||||
Massif: post-cull S. 28 (t:1792, hp:896, ex:896, st:0)
|
||||
Massif: post-cull S. 29 (t:1856, hp:928, ex:928, st:0)
|
||||
Massif: post-cull S. 30 (t:1920, hp:960, ex:960, st:0)
|
||||
Massif: post-cull S. 31 (t:1984, hp:992, ex:992, st:0)
|
||||
Massif: post-cull S. 32 (t:2048, hp:1024, ex:1024, st:0)
|
||||
Massif: post-cull S. 33 (t:2112, hp:1056, ex:1056, st:0)
|
||||
Massif: post-cull S. 34 (t:2176, hp:1088, ex:1088, st:0)
|
||||
Massif: post-cull S. 35 (t:2240, hp:1120, ex:1120, st:0)
|
||||
Massif: post-cull S. 36 (t:2304, hp:1152, ex:1152, st:0)
|
||||
Massif: post-cull S. 37 (t:2368, hp:1184, ex:1184, st:0)
|
||||
Massif: post-cull S. 38 (t:2432, hp:1216, ex:1216, st:0)
|
||||
Massif: post-cull S. 39 (t:2496, hp:1248, ex:1248, st:0)
|
||||
Massif: post-cull S. 40 (t:2560, hp:1280, ex:1280, st:0)
|
||||
Massif: post-cull S. 41 (t:2624, hp:1312, ex:1312, st:0)
|
||||
Massif: post-cull S. 42 (t:2688, hp:1344, ex:1344, st:0)
|
||||
Massif: post-cull S. 43 (t:2752, hp:1376, ex:1376, st:0)
|
||||
Massif: post-cull S. 44 (t:2816, hp:1408, ex:1408, st:0)
|
||||
Massif: post-cull S. 45 (t:2880, hp:1440, ex:1440, st:0)
|
||||
Massif: post-cull S. 46 (t:2944, hp:1472, ex:1472, st:0)
|
||||
Massif: post-cull S. 47 (t:3008, hp:1504, ex:1504, st:0)
|
||||
Massif: post-cull S. 48 (t:3072, hp:1536, ex:1536, st:0)
|
||||
Massif: post-cull Sd 49 (t:3168, hp:1584, ex:1584, st:0)
|
||||
Massif: New time interval = 64 (between snapshots 0 and 1)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 50 (t:3232, hp:1616, ex:1616, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 51 (t:3296, hp:1648, ex:1648, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 52 (t:3360, hp:1680, ex:1680, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 53 (t:3424, hp:1712, ex:1712, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 54 (t:3488, hp:1744, ex:1744, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 55 (t:3552, hp:1776, ex:1776, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 56 (t:3616, hp:1808, ex:1808, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 57 (t:3680, hp:1840, ex:1840, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 58 (t:3744, hp:1872, ex:1872, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc Sd 59 (t:3808, hp:1904, ex:1904, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 60 (t:3872, hp:1936, ex:1936, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 61 (t:3936, hp:1968, ex:1968, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 62 (t:4000, hp:2000, ex:2000, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 63 (t:4064, hp:2032, ex:2032, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 64 (t:4128, hp:2064, ex:2064, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 65 (t:4192, hp:2096, ex:2096, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 66 (t:4256, hp:2128, ex:2128, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 67 (t:4320, hp:2160, ex:2160, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 68 (t:4384, hp:2192, ex:2192, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc Sd 69 (t:4448, hp:2224, ex:2224, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 70 (t:4512, hp:2256, ex:2256, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 71 (t:4576, hp:2288, ex:2288, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 72 (t:4640, hp:2320, ex:2320, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 73 (t:4704, hp:2352, ex:2352, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 74 (t:4768, hp:2384, ex:2384, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 75 (t:4832, hp:2416, ex:2416, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 76 (t:4896, hp:2448, ex:2448, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 77 (t:4960, hp:2480, ex:2480, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 78 (t:5024, hp:2512, ex:2512, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc Sd 79 (t:5088, hp:2544, ex:2544, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 80 (t:5152, hp:2576, ex:2576, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 81 (t:5216, hp:2608, ex:2608, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 82 (t:5280, hp:2640, ex:2640, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 83 (t:5344, hp:2672, ex:2672, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 84 (t:5408, hp:2704, ex:2704, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 85 (t:5472, hp:2736, ex:2736, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 86 (t:5536, hp:2768, ex:2768, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 87 (t:5600, hp:2800, ex:2800, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 88 (t:5664, hp:2832, ex:2832, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc Sd 89 (t:5728, hp:2864, ex:2864, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 90 (t:5792, hp:2896, ex:2896, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 91 (t:5856, hp:2928, ex:2928, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 92 (t:5920, hp:2960, ex:2960, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 93 (t:5984, hp:2992, ex:2992, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 94 (t:6048, hp:3024, ex:3024, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 95 (t:6112, hp:3056, ex:3056, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 96 (t:6176, hp:3088, ex:3088, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 97 (t:6240, hp:3120, ex:3120, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc S. 98 (t:6304, hp:3152, ex:3152, st:0)
|
||||
Massif: (skipped 1 snapshot)
|
||||
Massif: alloc Sd 99 (t:6368, hp:3184, ex:3184, st:0)
|
||||
Massif: Culling...
|
||||
Massif: 0 (t-span = 128) S. 1 (t:64, hp:32, ex:32, st:0)
|
||||
Massif: 1 (t-span = 128) S. 3 (t:192, hp:96, ex:96, st:0)
|
||||
Massif: 2 (t-span = 128) S. 5 (t:320, hp:160, ex:160, st:0)
|
||||
Massif: 3 (t-span = 128) S. 7 (t:448, hp:224, ex:224, st:0)
|
||||
Massif: 4 (t-span = 128) S. 9 (t:576, hp:288, ex:288, st:0)
|
||||
Massif: 5 (t-span = 128) S. 11 (t:704, hp:352, ex:352, st:0)
|
||||
Massif: 6 (t-span = 128) S. 13 (t:832, hp:416, ex:416, st:0)
|
||||
Massif: 7 (t-span = 128) S. 15 (t:960, hp:480, ex:480, st:0)
|
||||
Massif: 8 (t-span = 128) S. 17 (t:1088, hp:544, ex:544, st:0)
|
||||
Massif: 9 (t-span = 128) S. 19 (t:1216, hp:608, ex:608, st:0)
|
||||
Massif: 10 (t-span = 128) S. 21 (t:1344, hp:672, ex:672, st:0)
|
||||
Massif: 11 (t-span = 128) S. 23 (t:1472, hp:736, ex:736, st:0)
|
||||
Massif: 12 (t-span = 128) S. 25 (t:1600, hp:800, ex:800, st:0)
|
||||
Massif: 13 (t-span = 128) S. 27 (t:1728, hp:864, ex:864, st:0)
|
||||
Massif: 14 (t-span = 128) S. 29 (t:1856, hp:928, ex:928, st:0)
|
||||
Massif: 15 (t-span = 128) S. 31 (t:1984, hp:992, ex:992, st:0)
|
||||
Massif: 16 (t-span = 128) S. 33 (t:2112, hp:1056, ex:1056, st:0)
|
||||
Massif: 17 (t-span = 128) S. 35 (t:2240, hp:1120, ex:1120, st:0)
|
||||
Massif: 18 (t-span = 128) S. 37 (t:2368, hp:1184, ex:1184, st:0)
|
||||
Massif: 19 (t-span = 128) S. 39 (t:2496, hp:1248, ex:1248, st:0)
|
||||
Massif: 20 (t-span = 128) S. 41 (t:2624, hp:1312, ex:1312, st:0)
|
||||
Massif: 21 (t-span = 128) S. 43 (t:2752, hp:1376, ex:1376, st:0)
|
||||
Massif: 22 (t-span = 128) S. 45 (t:2880, hp:1440, ex:1440, st:0)
|
||||
Massif: 23 (t-span = 128) S. 47 (t:3008, hp:1504, ex:1504, st:0)
|
||||
Massif: 24 (t-span = 128) S. 50 (t:3232, hp:1616, ex:1616, st:0)
|
||||
Massif: 25 (t-span = 128) S. 52 (t:3360, hp:1680, ex:1680, st:0)
|
||||
Massif: 26 (t-span = 128) S. 54 (t:3488, hp:1744, ex:1744, st:0)
|
||||
Massif: 27 (t-span = 128) S. 56 (t:3616, hp:1808, ex:1808, st:0)
|
||||
Massif: 28 (t-span = 128) S. 58 (t:3744, hp:1872, ex:1872, st:0)
|
||||
Massif: 29 (t-span = 128) S. 60 (t:3872, hp:1936, ex:1936, st:0)
|
||||
Massif: 30 (t-span = 128) S. 62 (t:4000, hp:2000, ex:2000, st:0)
|
||||
Massif: 31 (t-span = 128) S. 64 (t:4128, hp:2064, ex:2064, st:0)
|
||||
Massif: 32 (t-span = 128) S. 66 (t:4256, hp:2128, ex:2128, st:0)
|
||||
Massif: 33 (t-span = 128) S. 68 (t:4384, hp:2192, ex:2192, st:0)
|
||||
Massif: 34 (t-span = 128) S. 70 (t:4512, hp:2256, ex:2256, st:0)
|
||||
Massif: 35 (t-span = 128) S. 72 (t:4640, hp:2320, ex:2320, st:0)
|
||||
Massif: 36 (t-span = 128) S. 74 (t:4768, hp:2384, ex:2384, st:0)
|
||||
Massif: 37 (t-span = 128) S. 76 (t:4896, hp:2448, ex:2448, st:0)
|
||||
Massif: 38 (t-span = 128) S. 78 (t:5024, hp:2512, ex:2512, st:0)
|
||||
Massif: 39 (t-span = 128) S. 80 (t:5152, hp:2576, ex:2576, st:0)
|
||||
Massif: 40 (t-span = 128) S. 82 (t:5280, hp:2640, ex:2640, st:0)
|
||||
Massif: 41 (t-span = 128) S. 84 (t:5408, hp:2704, ex:2704, st:0)
|
||||
Massif: 42 (t-span = 128) S. 86 (t:5536, hp:2768, ex:2768, st:0)
|
||||
Massif: 43 (t-span = 128) S. 88 (t:5664, hp:2832, ex:2832, st:0)
|
||||
Massif: 44 (t-span = 128) S. 90 (t:5792, hp:2896, ex:2896, st:0)
|
||||
Massif: 45 (t-span = 128) S. 92 (t:5920, hp:2960, ex:2960, st:0)
|
||||
Massif: 46 (t-span = 128) S. 94 (t:6048, hp:3024, ex:3024, st:0)
|
||||
Massif: 47 (t-span = 128) S. 96 (t:6176, hp:3088, ex:3088, st:0)
|
||||
Massif: 48 (t-span = 128) S. 98 (t:6304, hp:3152, ex:3152, st:0)
|
||||
Massif: 49 (t-span = 224) S. 48 (t:3072, hp:1536, ex:1536, st:0)
|
||||
Massif: Finished culling ( 50 of 100 deleted)
|
||||
Massif: post-cull S. 0 (t:0, hp:0, ex:0, st:0)
|
||||
Massif: post-cull S. 1 (t:128, hp:64, ex:64, st:0)
|
||||
Massif: post-cull S. 2 (t:256, hp:128, ex:128, st:0)
|
||||
Massif: post-cull S. 3 (t:384, hp:192, ex:192, st:0)
|
||||
Massif: post-cull S. 4 (t:512, hp:256, ex:256, st:0)
|
||||
Massif: post-cull S. 5 (t:640, hp:320, ex:320, st:0)
|
||||
Massif: post-cull S. 6 (t:768, hp:384, ex:384, st:0)
|
||||
Massif: post-cull S. 7 (t:896, hp:448, ex:448, st:0)
|
||||
Massif: post-cull S. 8 (t:1024, hp:512, ex:512, st:0)
|
||||
Massif: post-cull S. 9 (t:1152, hp:576, ex:576, st:0)
|
||||
Massif: post-cull S. 10 (t:1280, hp:640, ex:640, st:0)
|
||||
Massif: post-cull S. 11 (t:1408, hp:704, ex:704, st:0)
|
||||
Massif: post-cull S. 12 (t:1536, hp:768, ex:768, st:0)
|
||||
Massif: post-cull S. 13 (t:1664, hp:832, ex:832, st:0)
|
||||
Massif: post-cull S. 14 (t:1792, hp:896, ex:896, st:0)
|
||||
Massif: post-cull S. 15 (t:1920, hp:960, ex:960, st:0)
|
||||
Massif: post-cull S. 16 (t:2048, hp:1024, ex:1024, st:0)
|
||||
Massif: post-cull S. 17 (t:2176, hp:1088, ex:1088, st:0)
|
||||
Massif: post-cull S. 18 (t:2304, hp:1152, ex:1152, st:0)
|
||||
Massif: post-cull S. 19 (t:2432, hp:1216, ex:1216, st:0)
|
||||
Massif: post-cull S. 20 (t:2560, hp:1280, ex:1280, st:0)
|
||||
Massif: post-cull S. 21 (t:2688, hp:1344, ex:1344, st:0)
|
||||
Massif: post-cull S. 22 (t:2816, hp:1408, ex:1408, st:0)
|
||||
Massif: post-cull S. 23 (t:2944, hp:1472, ex:1472, st:0)
|
||||
Massif: post-cull Sd 24 (t:3168, hp:1584, ex:1584, st:0)
|
||||
Massif: post-cull S. 25 (t:3296, hp:1648, ex:1648, st:0)
|
||||
Massif: post-cull S. 26 (t:3424, hp:1712, ex:1712, st:0)
|
||||
Massif: post-cull S. 27 (t:3552, hp:1776, ex:1776, st:0)
|
||||
Massif: post-cull S. 28 (t:3680, hp:1840, ex:1840, st:0)
|
||||
Massif: post-cull Sd 29 (t:3808, hp:1904, ex:1904, st:0)
|
||||
Massif: post-cull S. 30 (t:3936, hp:1968, ex:1968, st:0)
|
||||
Massif: post-cull S. 31 (t:4064, hp:2032, ex:2032, st:0)
|
||||
Massif: post-cull S. 32 (t:4192, hp:2096, ex:2096, st:0)
|
||||
Massif: post-cull S. 33 (t:4320, hp:2160, ex:2160, st:0)
|
||||
Massif: post-cull Sd 34 (t:4448, hp:2224, ex:2224, st:0)
|
||||
Massif: post-cull S. 35 (t:4576, hp:2288, ex:2288, st:0)
|
||||
Massif: post-cull S. 36 (t:4704, hp:2352, ex:2352, st:0)
|
||||
Massif: post-cull S. 37 (t:4832, hp:2416, ex:2416, st:0)
|
||||
Massif: post-cull S. 38 (t:4960, hp:2480, ex:2480, st:0)
|
||||
Massif: post-cull Sd 39 (t:5088, hp:2544, ex:2544, st:0)
|
||||
Massif: post-cull S. 40 (t:5216, hp:2608, ex:2608, st:0)
|
||||
Massif: post-cull S. 41 (t:5344, hp:2672, ex:2672, st:0)
|
||||
Massif: post-cull S. 42 (t:5472, hp:2736, ex:2736, st:0)
|
||||
Massif: post-cull S. 43 (t:5600, hp:2800, ex:2800, st:0)
|
||||
Massif: post-cull Sd 44 (t:5728, hp:2864, ex:2864, st:0)
|
||||
Massif: post-cull S. 45 (t:5856, hp:2928, ex:2928, st:0)
|
||||
Massif: post-cull S. 46 (t:5984, hp:2992, ex:2992, st:0)
|
||||
Massif: post-cull S. 47 (t:6112, hp:3056, ex:3056, st:0)
|
||||
Massif: post-cull S. 48 (t:6240, hp:3120, ex:3120, st:0)
|
||||
Massif: post-cull Sd 49 (t:6368, hp:3184, ex:3184, st:0)
|
||||
Massif: New time interval = 128 (between snapshots 0 and 1)
|
||||
Massif: heap allocs: 200
|
||||
Massif: heap reallocs: 0
|
||||
Massif: heap frees: 0
|
||||
Massif: ignored heap allocs: ...
|
||||
Massif: ignored heap frees: ...
|
||||
Massif: ignored heap reallocs: ...
|
||||
Massif: stack allocs: 0
|
||||
Massif: stack frees: 0
|
||||
Massif: XPts: ...
|
||||
Massif: top-XPts: ...
|
||||
Massif: XPt init expansions: ...
|
||||
Massif: XPt later expansions: ...
|
||||
Massif: SXPt allocs: ...
|
||||
Massif: SXPt frees: ...
|
||||
Massif: skipped snapshots: 51
|
||||
Massif: real snapshots: 150
|
||||
Massif: detailed snapshots: 15
|
||||
Massif: peak snapshots: 0
|
||||
Massif: cullings: 2
|
||||
Massif: XCon redos: ...
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: culling1
|
||||
vgopts: -v -v --stats=yes --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
stderr_filter: filter_verbose
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,10 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 200; i++) {
|
||||
malloc(400*i); // Divisible by 16 -- no slop.
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,551 @@
|
||||
Massif: alloc-fns:
|
||||
Massif: malloc
|
||||
Massif: __builtin_new
|
||||
Massif: operator new(unsigned)
|
||||
Massif: operator new(unsigned long)
|
||||
Massif: __builtin_vec_new
|
||||
Massif: operator new[](unsigned)
|
||||
Massif: operator new[](unsigned long)
|
||||
Massif: calloc
|
||||
Massif: realloc
|
||||
Massif: memalign
|
||||
Massif: posix_memalign
|
||||
Massif: valloc
|
||||
Massif: operator new(unsigned, std::nothrow_t const&)
|
||||
Massif: operator new[](unsigned, std::nothrow_t const&)
|
||||
Massif: operator new(unsigned long, std::nothrow_t const&)
|
||||
Massif: operator new[](unsigned long, std::nothrow_t const&)
|
||||
Massif: ignore-fns:
|
||||
Massif: 0: __part_load_locale
|
||||
Massif: 1: __time_load_locale
|
||||
Massif: 2: dwarf2_unwind_dyld_add_image_hook
|
||||
Massif: 3: get_or_create_key_element
|
||||
Massif: startup S. 0 (t:0, hp:0, ex:0, st:0)
|
||||
Massif: alloc S. 1 (t:16, hp:0, ex:16, st:0)
|
||||
Massif: alloc S. 2 (t:432, hp:400, ex:32, st:0)
|
||||
Massif: alloc S. 3 (t:1248, hp:1200, ex:48, st:0)
|
||||
Massif: alloc S. 4 (t:2464, hp:2400, ex:64, st:0)
|
||||
Massif: alloc S. 5 (t:4080, hp:4000, ex:80, st:0)
|
||||
Massif: alloc S. 6 (t:6096, hp:6000, ex:96, st:0)
|
||||
Massif: alloc S. 7 (t:8512, hp:8400, ex:112, st:0)
|
||||
Massif: alloc S. 8 (t:11328, hp:11200, ex:128, st:0)
|
||||
Massif: alloc Sd 9 (t:14544, hp:14400, ex:144, st:0)
|
||||
Massif: alloc S. 10 (t:18160, hp:18000, ex:160, st:0)
|
||||
Massif: alloc S. 11 (t:22176, hp:22000, ex:176, st:0)
|
||||
Massif: alloc S. 12 (t:26592, hp:26400, ex:192, st:0)
|
||||
Massif: alloc S. 13 (t:31408, hp:31200, ex:208, st:0)
|
||||
Massif: alloc S. 14 (t:36624, hp:36400, ex:224, st:0)
|
||||
Massif: alloc S. 15 (t:42240, hp:42000, ex:240, st:0)
|
||||
Massif: alloc S. 16 (t:48256, hp:48000, ex:256, st:0)
|
||||
Massif: alloc S. 17 (t:54672, hp:54400, ex:272, st:0)
|
||||
Massif: alloc S. 18 (t:61488, hp:61200, ex:288, st:0)
|
||||
Massif: alloc Sd 19 (t:68704, hp:68400, ex:304, st:0)
|
||||
Massif: alloc S. 20 (t:76320, hp:76000, ex:320, st:0)
|
||||
Massif: alloc S. 21 (t:84336, hp:84000, ex:336, st:0)
|
||||
Massif: alloc S. 22 (t:92752, hp:92400, ex:352, st:0)
|
||||
Massif: alloc S. 23 (t:101568, hp:101200, ex:368, st:0)
|
||||
Massif: alloc S. 24 (t:110784, hp:110400, ex:384, st:0)
|
||||
Massif: alloc S. 25 (t:120400, hp:120000, ex:400, st:0)
|
||||
Massif: alloc S. 26 (t:130416, hp:130000, ex:416, st:0)
|
||||
Massif: alloc S. 27 (t:140832, hp:140400, ex:432, st:0)
|
||||
Massif: alloc S. 28 (t:151648, hp:151200, ex:448, st:0)
|
||||
Massif: alloc Sd 29 (t:162864, hp:162400, ex:464, st:0)
|
||||
Massif: alloc S. 30 (t:174480, hp:174000, ex:480, st:0)
|
||||
Massif: alloc S. 31 (t:186496, hp:186000, ex:496, st:0)
|
||||
Massif: alloc S. 32 (t:198912, hp:198400, ex:512, st:0)
|
||||
Massif: alloc S. 33 (t:211728, hp:211200, ex:528, st:0)
|
||||
Massif: alloc S. 34 (t:224944, hp:224400, ex:544, st:0)
|
||||
Massif: alloc S. 35 (t:238560, hp:238000, ex:560, st:0)
|
||||
Massif: alloc S. 36 (t:252576, hp:252000, ex:576, st:0)
|
||||
Massif: alloc S. 37 (t:266992, hp:266400, ex:592, st:0)
|
||||
Massif: alloc S. 38 (t:281808, hp:281200, ex:608, st:0)
|
||||
Massif: alloc Sd 39 (t:297024, hp:296400, ex:624, st:0)
|
||||
Massif: alloc S. 40 (t:312640, hp:312000, ex:640, st:0)
|
||||
Massif: alloc S. 41 (t:328656, hp:328000, ex:656, st:0)
|
||||
Massif: alloc S. 42 (t:345072, hp:344400, ex:672, st:0)
|
||||
Massif: alloc S. 43 (t:361888, hp:361200, ex:688, st:0)
|
||||
Massif: alloc S. 44 (t:379104, hp:378400, ex:704, st:0)
|
||||
Massif: alloc S. 45 (t:396720, hp:396000, ex:720, st:0)
|
||||
Massif: alloc S. 46 (t:414736, hp:414000, ex:736, st:0)
|
||||
Massif: alloc S. 47 (t:433152, hp:432400, ex:752, st:0)
|
||||
Massif: alloc S. 48 (t:451968, hp:451200, ex:768, st:0)
|
||||
Massif: alloc Sd 49 (t:471184, hp:470400, ex:784, st:0)
|
||||
Massif: alloc S. 50 (t:490800, hp:490000, ex:800, st:0)
|
||||
Massif: alloc S. 51 (t:510816, hp:510000, ex:816, st:0)
|
||||
Massif: alloc S. 52 (t:531232, hp:530400, ex:832, st:0)
|
||||
Massif: alloc S. 53 (t:552048, hp:551200, ex:848, st:0)
|
||||
Massif: alloc S. 54 (t:573264, hp:572400, ex:864, st:0)
|
||||
Massif: alloc S. 55 (t:594880, hp:594000, ex:880, st:0)
|
||||
Massif: alloc S. 56 (t:616896, hp:616000, ex:896, st:0)
|
||||
Massif: alloc S. 57 (t:639312, hp:638400, ex:912, st:0)
|
||||
Massif: alloc S. 58 (t:662128, hp:661200, ex:928, st:0)
|
||||
Massif: alloc Sd 59 (t:685344, hp:684400, ex:944, st:0)
|
||||
Massif: alloc S. 60 (t:708960, hp:708000, ex:960, st:0)
|
||||
Massif: alloc S. 61 (t:732976, hp:732000, ex:976, st:0)
|
||||
Massif: alloc S. 62 (t:757392, hp:756400, ex:992, st:0)
|
||||
Massif: alloc S. 63 (t:782208, hp:781200, ex:1008, st:0)
|
||||
Massif: alloc S. 64 (t:807424, hp:806400, ex:1024, st:0)
|
||||
Massif: alloc S. 65 (t:833040, hp:832000, ex:1040, st:0)
|
||||
Massif: alloc S. 66 (t:859056, hp:858000, ex:1056, st:0)
|
||||
Massif: alloc S. 67 (t:885472, hp:884400, ex:1072, st:0)
|
||||
Massif: alloc S. 68 (t:912288, hp:911200, ex:1088, st:0)
|
||||
Massif: alloc Sd 69 (t:939504, hp:938400, ex:1104, st:0)
|
||||
Massif: alloc S. 70 (t:967120, hp:966000, ex:1120, st:0)
|
||||
Massif: alloc S. 71 (t:995136, hp:994000, ex:1136, st:0)
|
||||
Massif: alloc S. 72 (t:1023552, hp:1022400, ex:1152, st:0)
|
||||
Massif: alloc S. 73 (t:1052368, hp:1051200, ex:1168, st:0)
|
||||
Massif: alloc S. 74 (t:1081584, hp:1080400, ex:1184, st:0)
|
||||
Massif: alloc S. 75 (t:1111200, hp:1110000, ex:1200, st:0)
|
||||
Massif: alloc S. 76 (t:1141216, hp:1140000, ex:1216, st:0)
|
||||
Massif: alloc S. 77 (t:1171632, hp:1170400, ex:1232, st:0)
|
||||
Massif: alloc S. 78 (t:1202448, hp:1201200, ex:1248, st:0)
|
||||
Massif: alloc Sd 79 (t:1233664, hp:1232400, ex:1264, st:0)
|
||||
Massif: alloc S. 80 (t:1265280, hp:1264000, ex:1280, st:0)
|
||||
Massif: alloc S. 81 (t:1297296, hp:1296000, ex:1296, st:0)
|
||||
Massif: alloc S. 82 (t:1329712, hp:1328400, ex:1312, st:0)
|
||||
Massif: alloc S. 83 (t:1362528, hp:1361200, ex:1328, st:0)
|
||||
Massif: alloc S. 84 (t:1395744, hp:1394400, ex:1344, st:0)
|
||||
Massif: alloc S. 85 (t:1429360, hp:1428000, ex:1360, st:0)
|
||||
Massif: alloc S. 86 (t:1463376, hp:1462000, ex:1376, st:0)
|
||||
Massif: alloc S. 87 (t:1497792, hp:1496400, ex:1392, st:0)
|
||||
Massif: alloc S. 88 (t:1532608, hp:1531200, ex:1408, st:0)
|
||||
Massif: alloc Sd 89 (t:1567824, hp:1566400, ex:1424, st:0)
|
||||
Massif: alloc S. 90 (t:1603440, hp:1602000, ex:1440, st:0)
|
||||
Massif: alloc S. 91 (t:1639456, hp:1638000, ex:1456, st:0)
|
||||
Massif: alloc S. 92 (t:1675872, hp:1674400, ex:1472, st:0)
|
||||
Massif: alloc S. 93 (t:1712688, hp:1711200, ex:1488, st:0)
|
||||
Massif: alloc S. 94 (t:1749904, hp:1748400, ex:1504, st:0)
|
||||
Massif: alloc S. 95 (t:1787520, hp:1786000, ex:1520, st:0)
|
||||
Massif: alloc S. 96 (t:1825536, hp:1824000, ex:1536, st:0)
|
||||
Massif: alloc S. 97 (t:1863952, hp:1862400, ex:1552, st:0)
|
||||
Massif: alloc S. 98 (t:1902768, hp:1901200, ex:1568, st:0)
|
||||
Massif: alloc Sd 99 (t:1941984, hp:1940400, ex:1584, st:0)
|
||||
Massif: Culling...
|
||||
Massif: 0 (t-span = 432) S. 1 (t:16, hp:0, ex:16, st:0)
|
||||
Massif: 1 (t-span = 1248) S. 2 (t:432, hp:400, ex:32, st:0)
|
||||
Massif: 2 (t-span = 2464) S. 3 (t:1248, hp:1200, ex:48, st:0)
|
||||
Massif: 3 (t-span = 3632) S. 5 (t:4080, hp:4000, ex:80, st:0)
|
||||
Massif: 4 (t-span = 5232) S. 7 (t:8512, hp:8400, ex:112, st:0)
|
||||
Massif: 5 (t-span = 6096) S. 4 (t:2464, hp:2400, ex:64, st:0)
|
||||
Massif: 6 (t-span = 6832) Sd 9 (t:14544, hp:14400, ex:144, st:0)
|
||||
Massif: 7 (t-span = 8432) S. 11 (t:22176, hp:22000, ex:176, st:0)
|
||||
Massif: 8 (t-span = 10032) S. 13 (t:31408, hp:31200, ex:208, st:0)
|
||||
Massif: 9 (t-span = 11328) S. 6 (t:6096, hp:6000, ex:96, st:0)
|
||||
Massif: 10 (t-span = 11632) S. 15 (t:42240, hp:42000, ex:240, st:0)
|
||||
Massif: 11 (t-span = 13232) S. 17 (t:54672, hp:54400, ex:272, st:0)
|
||||
Massif: 12 (t-span = 14832) Sd 19 (t:68704, hp:68400, ex:304, st:0)
|
||||
Massif: 13 (t-span = 15264) S. 10 (t:18160, hp:18000, ex:160, st:0)
|
||||
Massif: 14 (t-span = 16432) S. 21 (t:84336, hp:84000, ex:336, st:0)
|
||||
Massif: 15 (t-span = 18032) S. 23 (t:101568, hp:101200, ex:368, st:0)
|
||||
Massif: 16 (t-span = 19632) S. 25 (t:120400, hp:120000, ex:400, st:0)
|
||||
Massif: 17 (t-span = 21232) S. 27 (t:140832, hp:140400, ex:432, st:0)
|
||||
Massif: 18 (t-span = 21664) S. 14 (t:36624, hp:36400, ex:224, st:0)
|
||||
Massif: 19 (t-span = 22832) Sd 29 (t:162864, hp:162400, ex:464, st:0)
|
||||
Massif: 20 (t-span = 24432) S. 31 (t:186496, hp:186000, ex:496, st:0)
|
||||
Massif: 21 (t-span = 26032) S. 33 (t:211728, hp:211200, ex:528, st:0)
|
||||
Massif: 22 (t-span = 26592) S. 8 (t:11328, hp:11200, ex:128, st:0)
|
||||
Massif: 23 (t-span = 27632) S. 35 (t:238560, hp:238000, ex:560, st:0)
|
||||
Massif: 24 (t-span = 28064) S. 18 (t:61488, hp:61200, ex:288, st:0)
|
||||
Massif: 25 (t-span = 29232) S. 37 (t:266992, hp:266400, ex:592, st:0)
|
||||
Massif: 26 (t-span = 30832) Sd 39 (t:297024, hp:296400, ex:624, st:0)
|
||||
Massif: 27 (t-span = 32432) S. 41 (t:328656, hp:328000, ex:656, st:0)
|
||||
Massif: 28 (t-span = 34032) S. 43 (t:361888, hp:361200, ex:688, st:0)
|
||||
Massif: 29 (t-span = 34464) S. 22 (t:92752, hp:92400, ex:352, st:0)
|
||||
Massif: 30 (t-span = 35632) S. 45 (t:396720, hp:396000, ex:720, st:0)
|
||||
Massif: 31 (t-span = 37232) S. 47 (t:433152, hp:432400, ex:752, st:0)
|
||||
Massif: 32 (t-span = 38832) Sd 49 (t:471184, hp:470400, ex:784, st:0)
|
||||
Massif: 33 (t-span = 40432) S. 51 (t:510816, hp:510000, ex:816, st:0)
|
||||
Massif: 34 (t-span = 40864) S. 26 (t:130416, hp:130000, ex:416, st:0)
|
||||
Massif: 35 (t-span = 42032) S. 53 (t:552048, hp:551200, ex:848, st:0)
|
||||
Massif: 36 (t-span = 43632) S. 55 (t:594880, hp:594000, ex:880, st:0)
|
||||
Massif: 37 (t-span = 45232) S. 57 (t:639312, hp:638400, ex:912, st:0)
|
||||
Massif: 38 (t-span = 46832) Sd 59 (t:685344, hp:684400, ex:944, st:0)
|
||||
Massif: 39 (t-span = 47264) S. 30 (t:174480, hp:174000, ex:480, st:0)
|
||||
Massif: 40 (t-span = 48256) S. 12 (t:26592, hp:26400, ex:192, st:0)
|
||||
Massif: 41 (t-span = 48432) S. 61 (t:732976, hp:732000, ex:976, st:0)
|
||||
Massif: 42 (t-span = 50032) S. 63 (t:782208, hp:781200, ex:1008, st:0)
|
||||
Massif: 43 (t-span = 51632) S. 65 (t:833040, hp:832000, ex:1040, st:0)
|
||||
Massif: 44 (t-span = 53232) S. 67 (t:885472, hp:884400, ex:1072, st:0)
|
||||
Massif: 45 (t-span = 53664) S. 34 (t:224944, hp:224400, ex:544, st:0)
|
||||
Massif: 46 (t-span = 54832) Sd 69 (t:939504, hp:938400, ex:1104, st:0)
|
||||
Massif: 47 (t-span = 56432) S. 71 (t:995136, hp:994000, ex:1136, st:0)
|
||||
Massif: 48 (t-span = 58032) S. 73 (t:1052368, hp:1051200, ex:1168, st:0)
|
||||
Massif: 49 (t-span = 59632) S. 75 (t:1111200, hp:1110000, ex:1200, st:0)
|
||||
Massif: Finished culling ( 50 of 100 deleted)
|
||||
Massif: post-cull S. 0 (t:0, hp:0, ex:0, st:0)
|
||||
Massif: post-cull S. 1 (t:48256, hp:48000, ex:256, st:0)
|
||||
Massif: post-cull S. 2 (t:76320, hp:76000, ex:320, st:0)
|
||||
Massif: post-cull S. 3 (t:110784, hp:110400, ex:384, st:0)
|
||||
Massif: post-cull S. 4 (t:151648, hp:151200, ex:448, st:0)
|
||||
Massif: post-cull S. 5 (t:198912, hp:198400, ex:512, st:0)
|
||||
Massif: post-cull S. 6 (t:252576, hp:252000, ex:576, st:0)
|
||||
Massif: post-cull S. 7 (t:281808, hp:281200, ex:608, st:0)
|
||||
Massif: post-cull S. 8 (t:312640, hp:312000, ex:640, st:0)
|
||||
Massif: post-cull S. 9 (t:345072, hp:344400, ex:672, st:0)
|
||||
Massif: post-cull S. 10 (t:379104, hp:378400, ex:704, st:0)
|
||||
Massif: post-cull S. 11 (t:414736, hp:414000, ex:736, st:0)
|
||||
Massif: post-cull S. 12 (t:451968, hp:451200, ex:768, st:0)
|
||||
Massif: post-cull S. 13 (t:490800, hp:490000, ex:800, st:0)
|
||||
Massif: post-cull S. 14 (t:531232, hp:530400, ex:832, st:0)
|
||||
Massif: post-cull S. 15 (t:573264, hp:572400, ex:864, st:0)
|
||||
Massif: post-cull S. 16 (t:616896, hp:616000, ex:896, st:0)
|
||||
Massif: post-cull S. 17 (t:662128, hp:661200, ex:928, st:0)
|
||||
Massif: post-cull S. 18 (t:708960, hp:708000, ex:960, st:0)
|
||||
Massif: post-cull S. 19 (t:757392, hp:756400, ex:992, st:0)
|
||||
Massif: post-cull S. 20 (t:807424, hp:806400, ex:1024, st:0)
|
||||
Massif: post-cull S. 21 (t:859056, hp:858000, ex:1056, st:0)
|
||||
Massif: post-cull S. 22 (t:912288, hp:911200, ex:1088, st:0)
|
||||
Massif: post-cull S. 23 (t:967120, hp:966000, ex:1120, st:0)
|
||||
Massif: post-cull S. 24 (t:1023552, hp:1022400, ex:1152, st:0)
|
||||
Massif: post-cull S. 25 (t:1081584, hp:1080400, ex:1184, st:0)
|
||||
Massif: post-cull S. 26 (t:1141216, hp:1140000, ex:1216, st:0)
|
||||
Massif: post-cull S. 27 (t:1171632, hp:1170400, ex:1232, st:0)
|
||||
Massif: post-cull S. 28 (t:1202448, hp:1201200, ex:1248, st:0)
|
||||
Massif: post-cull Sd 29 (t:1233664, hp:1232400, ex:1264, st:0)
|
||||
Massif: post-cull S. 30 (t:1265280, hp:1264000, ex:1280, st:0)
|
||||
Massif: post-cull S. 31 (t:1297296, hp:1296000, ex:1296, st:0)
|
||||
Massif: post-cull S. 32 (t:1329712, hp:1328400, ex:1312, st:0)
|
||||
Massif: post-cull S. 33 (t:1362528, hp:1361200, ex:1328, st:0)
|
||||
Massif: post-cull S. 34 (t:1395744, hp:1394400, ex:1344, st:0)
|
||||
Massif: post-cull S. 35 (t:1429360, hp:1428000, ex:1360, st:0)
|
||||
Massif: post-cull S. 36 (t:1463376, hp:1462000, ex:1376, st:0)
|
||||
Massif: post-cull S. 37 (t:1497792, hp:1496400, ex:1392, st:0)
|
||||
Massif: post-cull S. 38 (t:1532608, hp:1531200, ex:1408, st:0)
|
||||
Massif: post-cull Sd 39 (t:1567824, hp:1566400, ex:1424, st:0)
|
||||
Massif: post-cull S. 40 (t:1603440, hp:1602000, ex:1440, st:0)
|
||||
Massif: post-cull S. 41 (t:1639456, hp:1638000, ex:1456, st:0)
|
||||
Massif: post-cull S. 42 (t:1675872, hp:1674400, ex:1472, st:0)
|
||||
Massif: post-cull S. 43 (t:1712688, hp:1711200, ex:1488, st:0)
|
||||
Massif: post-cull S. 44 (t:1749904, hp:1748400, ex:1504, st:0)
|
||||
Massif: post-cull S. 45 (t:1787520, hp:1786000, ex:1520, st:0)
|
||||
Massif: post-cull S. 46 (t:1825536, hp:1824000, ex:1536, st:0)
|
||||
Massif: post-cull S. 47 (t:1863952, hp:1862400, ex:1552, st:0)
|
||||
Massif: post-cull S. 48 (t:1902768, hp:1901200, ex:1568, st:0)
|
||||
Massif: post-cull Sd 49 (t:1941984, hp:1940400, ex:1584, st:0)
|
||||
Massif: New time interval = 28064 (between snapshots 1 and 2)
|
||||
Massif: alloc S. 50 (t:1981600, hp:1980000, ex:1600, st:0)
|
||||
Massif: alloc S. 51 (t:2021616, hp:2020000, ex:1616, st:0)
|
||||
Massif: alloc S. 52 (t:2062032, hp:2060400, ex:1632, st:0)
|
||||
Massif: alloc S. 53 (t:2102848, hp:2101200, ex:1648, st:0)
|
||||
Massif: alloc S. 54 (t:2144064, hp:2142400, ex:1664, st:0)
|
||||
Massif: alloc S. 55 (t:2185680, hp:2184000, ex:1680, st:0)
|
||||
Massif: alloc S. 56 (t:2227696, hp:2226000, ex:1696, st:0)
|
||||
Massif: alloc S. 57 (t:2270112, hp:2268400, ex:1712, st:0)
|
||||
Massif: alloc S. 58 (t:2312928, hp:2311200, ex:1728, st:0)
|
||||
Massif: alloc Sd 59 (t:2356144, hp:2354400, ex:1744, st:0)
|
||||
Massif: alloc S. 60 (t:2399760, hp:2398000, ex:1760, st:0)
|
||||
Massif: alloc S. 61 (t:2443776, hp:2442000, ex:1776, st:0)
|
||||
Massif: alloc S. 62 (t:2488192, hp:2486400, ex:1792, st:0)
|
||||
Massif: alloc S. 63 (t:2533008, hp:2531200, ex:1808, st:0)
|
||||
Massif: alloc S. 64 (t:2578224, hp:2576400, ex:1824, st:0)
|
||||
Massif: alloc S. 65 (t:2623840, hp:2622000, ex:1840, st:0)
|
||||
Massif: alloc S. 66 (t:2669856, hp:2668000, ex:1856, st:0)
|
||||
Massif: alloc S. 67 (t:2716272, hp:2714400, ex:1872, st:0)
|
||||
Massif: alloc S. 68 (t:2763088, hp:2761200, ex:1888, st:0)
|
||||
Massif: alloc Sd 69 (t:2810304, hp:2808400, ex:1904, st:0)
|
||||
Massif: alloc S. 70 (t:2857920, hp:2856000, ex:1920, st:0)
|
||||
Massif: alloc S. 71 (t:2905936, hp:2904000, ex:1936, st:0)
|
||||
Massif: alloc S. 72 (t:2954352, hp:2952400, ex:1952, st:0)
|
||||
Massif: alloc S. 73 (t:3003168, hp:3001200, ex:1968, st:0)
|
||||
Massif: alloc S. 74 (t:3052384, hp:3050400, ex:1984, st:0)
|
||||
Massif: alloc S. 75 (t:3102000, hp:3100000, ex:2000, st:0)
|
||||
Massif: alloc S. 76 (t:3152016, hp:3150000, ex:2016, st:0)
|
||||
Massif: alloc S. 77 (t:3202432, hp:3200400, ex:2032, st:0)
|
||||
Massif: alloc S. 78 (t:3253248, hp:3251200, ex:2048, st:0)
|
||||
Massif: alloc Sd 79 (t:3304464, hp:3302400, ex:2064, st:0)
|
||||
Massif: alloc S. 80 (t:3356080, hp:3354000, ex:2080, st:0)
|
||||
Massif: alloc S. 81 (t:3408096, hp:3406000, ex:2096, st:0)
|
||||
Massif: alloc S. 82 (t:3460512, hp:3458400, ex:2112, st:0)
|
||||
Massif: alloc S. 83 (t:3513328, hp:3511200, ex:2128, st:0)
|
||||
Massif: alloc S. 84 (t:3566544, hp:3564400, ex:2144, st:0)
|
||||
Massif: alloc S. 85 (t:3620160, hp:3618000, ex:2160, st:0)
|
||||
Massif: alloc S. 86 (t:3674176, hp:3672000, ex:2176, st:0)
|
||||
Massif: alloc S. 87 (t:3728592, hp:3726400, ex:2192, st:0)
|
||||
Massif: alloc S. 88 (t:3783408, hp:3781200, ex:2208, st:0)
|
||||
Massif: alloc Sd 89 (t:3838624, hp:3836400, ex:2224, st:0)
|
||||
Massif: alloc S. 90 (t:3894240, hp:3892000, ex:2240, st:0)
|
||||
Massif: alloc S. 91 (t:3950256, hp:3948000, ex:2256, st:0)
|
||||
Massif: alloc S. 92 (t:4006672, hp:4004400, ex:2272, st:0)
|
||||
Massif: alloc S. 93 (t:4063488, hp:4061200, ex:2288, st:0)
|
||||
Massif: alloc S. 94 (t:4120704, hp:4118400, ex:2304, st:0)
|
||||
Massif: alloc S. 95 (t:4178320, hp:4176000, ex:2320, st:0)
|
||||
Massif: alloc S. 96 (t:4236336, hp:4234000, ex:2336, st:0)
|
||||
Massif: alloc S. 97 (t:4294752, hp:4292400, ex:2352, st:0)
|
||||
Massif: alloc S. 98 (t:4353568, hp:4351200, ex:2368, st:0)
|
||||
Massif: alloc Sd 99 (t:4412784, hp:4410400, ex:2384, st:0)
|
||||
Massif: Culling...
|
||||
Massif: 0 (t-span = 60064) S. 7 (t:281808, hp:281200, ex:608, st:0)
|
||||
Massif: 1 (t-span = 61232) S. 27 (t:1171632, hp:1170400, ex:1232, st:0)
|
||||
Massif: 2 (t-span = 62528) S. 2 (t:76320, hp:76000, ex:320, st:0)
|
||||
Massif: 3 (t-span = 62832) Sd 29 (t:1233664, hp:1232400, ex:1264, st:0)
|
||||
Massif: 4 (t-span = 64432) S. 31 (t:1297296, hp:1296000, ex:1296, st:0)
|
||||
Massif: 5 (t-span = 66032) S. 33 (t:1362528, hp:1361200, ex:1328, st:0)
|
||||
Massif: 6 (t-span = 66464) S. 9 (t:345072, hp:344400, ex:672, st:0)
|
||||
Massif: 7 (t-span = 67632) S. 35 (t:1429360, hp:1428000, ex:1360, st:0)
|
||||
Massif: 8 (t-span = 69232) S. 37 (t:1497792, hp:1496400, ex:1392, st:0)
|
||||
Massif: 9 (t-span = 70832) Sd 39 (t:1567824, hp:1566400, ex:1424, st:0)
|
||||
Massif: 10 (t-span = 72432) S. 41 (t:1639456, hp:1638000, ex:1456, st:0)
|
||||
Massif: 11 (t-span = 72864) S. 11 (t:414736, hp:414000, ex:736, st:0)
|
||||
Massif: 12 (t-span = 74032) S. 43 (t:1712688, hp:1711200, ex:1488, st:0)
|
||||
Massif: 13 (t-span = 75632) S. 45 (t:1787520, hp:1786000, ex:1520, st:0)
|
||||
Massif: 14 (t-span = 77232) S. 47 (t:1863952, hp:1862400, ex:1552, st:0)
|
||||
Massif: 15 (t-span = 78832) Sd 49 (t:1941984, hp:1940400, ex:1584, st:0)
|
||||
Massif: 16 (t-span = 79264) S. 13 (t:490800, hp:490000, ex:800, st:0)
|
||||
Massif: 17 (t-span = 80432) S. 51 (t:2021616, hp:2020000, ex:1616, st:0)
|
||||
Massif: 18 (t-span = 82032) S. 53 (t:2102848, hp:2101200, ex:1648, st:0)
|
||||
Massif: 19 (t-span = 83632) S. 55 (t:2185680, hp:2184000, ex:1680, st:0)
|
||||
Massif: 20 (t-span = 85232) S. 57 (t:2270112, hp:2268400, ex:1712, st:0)
|
||||
Massif: 21 (t-span = 85664) S. 15 (t:573264, hp:572400, ex:864, st:0)
|
||||
Massif: 22 (t-span = 86832) Sd 59 (t:2356144, hp:2354400, ex:1744, st:0)
|
||||
Massif: 23 (t-span = 88128) S. 4 (t:151648, hp:151200, ex:448, st:0)
|
||||
Massif: 24 (t-span = 88432) S. 61 (t:2443776, hp:2442000, ex:1776, st:0)
|
||||
Massif: 25 (t-span = 90032) S. 63 (t:2533008, hp:2531200, ex:1808, st:0)
|
||||
Massif: 26 (t-span = 91632) S. 65 (t:2623840, hp:2622000, ex:1840, st:0)
|
||||
Massif: 27 (t-span = 92064) S. 17 (t:662128, hp:661200, ex:928, st:0)
|
||||
Massif: 28 (t-span = 93232) S. 67 (t:2716272, hp:2714400, ex:1872, st:0)
|
||||
Massif: 29 (t-span = 94832) Sd 69 (t:2810304, hp:2808400, ex:1904, st:0)
|
||||
Massif: 30 (t-span = 96432) S. 71 (t:2905936, hp:2904000, ex:1936, st:0)
|
||||
Massif: 31 (t-span = 98032) S. 73 (t:3003168, hp:3001200, ex:1968, st:0)
|
||||
Massif: 32 (t-span = 98464) S. 19 (t:757392, hp:756400, ex:992, st:0)
|
||||
Massif: 33 (t-span = 99632) S. 75 (t:3102000, hp:3100000, ex:2000, st:0)
|
||||
Massif: 34 (t-span = 101232) S. 77 (t:3202432, hp:3200400, ex:2032, st:0)
|
||||
Massif: 35 (t-span = 102832) Sd 79 (t:3304464, hp:3302400, ex:2064, st:0)
|
||||
Massif: 36 (t-span = 104432) S. 81 (t:3408096, hp:3406000, ex:2096, st:0)
|
||||
Massif: 37 (t-span = 104864) S. 21 (t:859056, hp:858000, ex:1056, st:0)
|
||||
Massif: 38 (t-span = 106032) S. 83 (t:3513328, hp:3511200, ex:2128, st:0)
|
||||
Massif: 39 (t-span = 107632) S. 85 (t:3620160, hp:3618000, ex:2160, st:0)
|
||||
Massif: 40 (t-span = 109232) S. 87 (t:3728592, hp:3726400, ex:2192, st:0)
|
||||
Massif: 41 (t-span = 110784) S. 1 (t:48256, hp:48000, ex:256, st:0)
|
||||
Massif: 42 (t-span = 110832) Sd 89 (t:3838624, hp:3836400, ex:2224, st:0)
|
||||
Massif: 43 (t-span = 111264) S. 23 (t:967120, hp:966000, ex:1120, st:0)
|
||||
Massif: 44 (t-span = 112432) S. 91 (t:3950256, hp:3948000, ex:2256, st:0)
|
||||
Massif: 45 (t-span = 113728) S. 6 (t:252576, hp:252000, ex:576, st:0)
|
||||
Massif: 46 (t-span = 114032) S. 93 (t:4063488, hp:4061200, ex:2288, st:0)
|
||||
Massif: 47 (t-span = 115632) S. 95 (t:4178320, hp:4176000, ex:2320, st:0)
|
||||
Massif: 48 (t-span = 117232) S. 97 (t:4294752, hp:4292400, ex:2352, st:0)
|
||||
Massif: 49 (t-span = 117664) S. 25 (t:1081584, hp:1080400, ex:1184, st:0)
|
||||
Massif: Finished culling ( 50 of 100 deleted)
|
||||
Massif: post-cull S. 0 (t:0, hp:0, ex:0, st:0)
|
||||
Massif: post-cull S. 1 (t:110784, hp:110400, ex:384, st:0)
|
||||
Massif: post-cull S. 2 (t:198912, hp:198400, ex:512, st:0)
|
||||
Massif: post-cull S. 3 (t:312640, hp:312000, ex:640, st:0)
|
||||
Massif: post-cull S. 4 (t:379104, hp:378400, ex:704, st:0)
|
||||
Massif: post-cull S. 5 (t:451968, hp:451200, ex:768, st:0)
|
||||
Massif: post-cull S. 6 (t:531232, hp:530400, ex:832, st:0)
|
||||
Massif: post-cull S. 7 (t:616896, hp:616000, ex:896, st:0)
|
||||
Massif: post-cull S. 8 (t:708960, hp:708000, ex:960, st:0)
|
||||
Massif: post-cull S. 9 (t:807424, hp:806400, ex:1024, st:0)
|
||||
Massif: post-cull S. 10 (t:912288, hp:911200, ex:1088, st:0)
|
||||
Massif: post-cull S. 11 (t:1023552, hp:1022400, ex:1152, st:0)
|
||||
Massif: post-cull S. 12 (t:1141216, hp:1140000, ex:1216, st:0)
|
||||
Massif: post-cull S. 13 (t:1202448, hp:1201200, ex:1248, st:0)
|
||||
Massif: post-cull S. 14 (t:1265280, hp:1264000, ex:1280, st:0)
|
||||
Massif: post-cull S. 15 (t:1329712, hp:1328400, ex:1312, st:0)
|
||||
Massif: post-cull S. 16 (t:1395744, hp:1394400, ex:1344, st:0)
|
||||
Massif: post-cull S. 17 (t:1463376, hp:1462000, ex:1376, st:0)
|
||||
Massif: post-cull S. 18 (t:1532608, hp:1531200, ex:1408, st:0)
|
||||
Massif: post-cull S. 19 (t:1603440, hp:1602000, ex:1440, st:0)
|
||||
Massif: post-cull S. 20 (t:1675872, hp:1674400, ex:1472, st:0)
|
||||
Massif: post-cull S. 21 (t:1749904, hp:1748400, ex:1504, st:0)
|
||||
Massif: post-cull S. 22 (t:1825536, hp:1824000, ex:1536, st:0)
|
||||
Massif: post-cull S. 23 (t:1902768, hp:1901200, ex:1568, st:0)
|
||||
Massif: post-cull S. 24 (t:1981600, hp:1980000, ex:1600, st:0)
|
||||
Massif: post-cull S. 25 (t:2062032, hp:2060400, ex:1632, st:0)
|
||||
Massif: post-cull S. 26 (t:2144064, hp:2142400, ex:1664, st:0)
|
||||
Massif: post-cull S. 27 (t:2227696, hp:2226000, ex:1696, st:0)
|
||||
Massif: post-cull S. 28 (t:2312928, hp:2311200, ex:1728, st:0)
|
||||
Massif: post-cull S. 29 (t:2399760, hp:2398000, ex:1760, st:0)
|
||||
Massif: post-cull S. 30 (t:2488192, hp:2486400, ex:1792, st:0)
|
||||
Massif: post-cull S. 31 (t:2578224, hp:2576400, ex:1824, st:0)
|
||||
Massif: post-cull S. 32 (t:2669856, hp:2668000, ex:1856, st:0)
|
||||
Massif: post-cull S. 33 (t:2763088, hp:2761200, ex:1888, st:0)
|
||||
Massif: post-cull S. 34 (t:2857920, hp:2856000, ex:1920, st:0)
|
||||
Massif: post-cull S. 35 (t:2954352, hp:2952400, ex:1952, st:0)
|
||||
Massif: post-cull S. 36 (t:3052384, hp:3050400, ex:1984, st:0)
|
||||
Massif: post-cull S. 37 (t:3152016, hp:3150000, ex:2016, st:0)
|
||||
Massif: post-cull S. 38 (t:3253248, hp:3251200, ex:2048, st:0)
|
||||
Massif: post-cull S. 39 (t:3356080, hp:3354000, ex:2080, st:0)
|
||||
Massif: post-cull S. 40 (t:3460512, hp:3458400, ex:2112, st:0)
|
||||
Massif: post-cull S. 41 (t:3566544, hp:3564400, ex:2144, st:0)
|
||||
Massif: post-cull S. 42 (t:3674176, hp:3672000, ex:2176, st:0)
|
||||
Massif: post-cull S. 43 (t:3783408, hp:3781200, ex:2208, st:0)
|
||||
Massif: post-cull S. 44 (t:3894240, hp:3892000, ex:2240, st:0)
|
||||
Massif: post-cull S. 45 (t:4006672, hp:4004400, ex:2272, st:0)
|
||||
Massif: post-cull S. 46 (t:4120704, hp:4118400, ex:2304, st:0)
|
||||
Massif: post-cull S. 47 (t:4236336, hp:4234000, ex:2336, st:0)
|
||||
Massif: post-cull S. 48 (t:4353568, hp:4351200, ex:2368, st:0)
|
||||
Massif: post-cull Sd 49 (t:4412784, hp:4410400, ex:2384, st:0)
|
||||
Massif: New time interval = 59216 (between snapshots 48 and 49)
|
||||
Massif: alloc S. 50 (t:4472400, hp:4470000, ex:2400, st:0)
|
||||
Massif: alloc S. 51 (t:4532416, hp:4530000, ex:2416, st:0)
|
||||
Massif: alloc S. 52 (t:4592832, hp:4590400, ex:2432, st:0)
|
||||
Massif: alloc S. 53 (t:4653648, hp:4651200, ex:2448, st:0)
|
||||
Massif: alloc S. 54 (t:4714864, hp:4712400, ex:2464, st:0)
|
||||
Massif: alloc S. 55 (t:4776480, hp:4774000, ex:2480, st:0)
|
||||
Massif: alloc S. 56 (t:4838496, hp:4836000, ex:2496, st:0)
|
||||
Massif: alloc S. 57 (t:4900912, hp:4898400, ex:2512, st:0)
|
||||
Massif: alloc S. 58 (t:4963728, hp:4961200, ex:2528, st:0)
|
||||
Massif: alloc Sd 59 (t:5026944, hp:5024400, ex:2544, st:0)
|
||||
Massif: alloc S. 60 (t:5090560, hp:5088000, ex:2560, st:0)
|
||||
Massif: alloc S. 61 (t:5154576, hp:5152000, ex:2576, st:0)
|
||||
Massif: alloc S. 62 (t:5218992, hp:5216400, ex:2592, st:0)
|
||||
Massif: alloc S. 63 (t:5283808, hp:5281200, ex:2608, st:0)
|
||||
Massif: alloc S. 64 (t:5349024, hp:5346400, ex:2624, st:0)
|
||||
Massif: alloc S. 65 (t:5414640, hp:5412000, ex:2640, st:0)
|
||||
Massif: alloc S. 66 (t:5480656, hp:5478000, ex:2656, st:0)
|
||||
Massif: alloc S. 67 (t:5547072, hp:5544400, ex:2672, st:0)
|
||||
Massif: alloc S. 68 (t:5613888, hp:5611200, ex:2688, st:0)
|
||||
Massif: alloc Sd 69 (t:5681104, hp:5678400, ex:2704, st:0)
|
||||
Massif: alloc S. 70 (t:5748720, hp:5746000, ex:2720, st:0)
|
||||
Massif: alloc S. 71 (t:5816736, hp:5814000, ex:2736, st:0)
|
||||
Massif: alloc S. 72 (t:5885152, hp:5882400, ex:2752, st:0)
|
||||
Massif: alloc S. 73 (t:5953968, hp:5951200, ex:2768, st:0)
|
||||
Massif: alloc S. 74 (t:6023184, hp:6020400, ex:2784, st:0)
|
||||
Massif: alloc S. 75 (t:6092800, hp:6090000, ex:2800, st:0)
|
||||
Massif: alloc S. 76 (t:6162816, hp:6160000, ex:2816, st:0)
|
||||
Massif: alloc S. 77 (t:6233232, hp:6230400, ex:2832, st:0)
|
||||
Massif: alloc S. 78 (t:6304048, hp:6301200, ex:2848, st:0)
|
||||
Massif: alloc Sd 79 (t:6375264, hp:6372400, ex:2864, st:0)
|
||||
Massif: alloc S. 80 (t:6446880, hp:6444000, ex:2880, st:0)
|
||||
Massif: alloc S. 81 (t:6518896, hp:6516000, ex:2896, st:0)
|
||||
Massif: alloc S. 82 (t:6591312, hp:6588400, ex:2912, st:0)
|
||||
Massif: alloc S. 83 (t:6664128, hp:6661200, ex:2928, st:0)
|
||||
Massif: alloc S. 84 (t:6737344, hp:6734400, ex:2944, st:0)
|
||||
Massif: alloc S. 85 (t:6810960, hp:6808000, ex:2960, st:0)
|
||||
Massif: alloc S. 86 (t:6884976, hp:6882000, ex:2976, st:0)
|
||||
Massif: alloc S. 87 (t:6959392, hp:6956400, ex:2992, st:0)
|
||||
Massif: alloc S. 88 (t:7034208, hp:7031200, ex:3008, st:0)
|
||||
Massif: alloc Sd 89 (t:7109424, hp:7106400, ex:3024, st:0)
|
||||
Massif: alloc S. 90 (t:7185040, hp:7182000, ex:3040, st:0)
|
||||
Massif: alloc S. 91 (t:7261056, hp:7258000, ex:3056, st:0)
|
||||
Massif: alloc S. 92 (t:7337472, hp:7334400, ex:3072, st:0)
|
||||
Massif: alloc S. 93 (t:7414288, hp:7411200, ex:3088, st:0)
|
||||
Massif: alloc S. 94 (t:7491504, hp:7488400, ex:3104, st:0)
|
||||
Massif: alloc S. 95 (t:7569120, hp:7566000, ex:3120, st:0)
|
||||
Massif: alloc S. 96 (t:7647136, hp:7644000, ex:3136, st:0)
|
||||
Massif: alloc S. 97 (t:7725552, hp:7722400, ex:3152, st:0)
|
||||
Massif: alloc S. 98 (t:7804368, hp:7801200, ex:3168, st:0)
|
||||
Massif: alloc Sd 99 (t:7883584, hp:7880400, ex:3184, st:0)
|
||||
Massif: Culling...
|
||||
Massif: 0 (t-span = 118832) Sd 49 (t:4412784, hp:4410400, ex:2384, st:0)
|
||||
Massif: 1 (t-span = 120432) S. 51 (t:4532416, hp:4530000, ex:2416, st:0)
|
||||
Massif: 2 (t-span = 122032) S. 53 (t:4653648, hp:4651200, ex:2448, st:0)
|
||||
Massif: 3 (t-span = 123632) S. 55 (t:4776480, hp:4774000, ex:2480, st:0)
|
||||
Massif: 4 (t-span = 124064) S. 13 (t:1202448, hp:1201200, ex:1248, st:0)
|
||||
Massif: 5 (t-span = 125232) S. 57 (t:4900912, hp:4898400, ex:2512, st:0)
|
||||
Massif: 6 (t-span = 126832) Sd 59 (t:5026944, hp:5024400, ex:2544, st:0)
|
||||
Massif: 7 (t-span = 128432) S. 61 (t:5154576, hp:5152000, ex:2576, st:0)
|
||||
Massif: 8 (t-span = 130032) S. 63 (t:5283808, hp:5281200, ex:2608, st:0)
|
||||
Massif: 9 (t-span = 130464) S. 15 (t:1329712, hp:1328400, ex:1312, st:0)
|
||||
Massif: 10 (t-span = 131632) S. 65 (t:5414640, hp:5412000, ex:2640, st:0)
|
||||
Massif: 11 (t-span = 133232) S. 67 (t:5547072, hp:5544400, ex:2672, st:0)
|
||||
Massif: 12 (t-span = 134832) Sd 69 (t:5681104, hp:5678400, ex:2704, st:0)
|
||||
Massif: 13 (t-span = 136432) S. 71 (t:5816736, hp:5814000, ex:2736, st:0)
|
||||
Massif: 14 (t-span = 136864) S. 17 (t:1463376, hp:1462000, ex:1376, st:0)
|
||||
Massif: 15 (t-span = 138032) S. 73 (t:5953968, hp:5951200, ex:2768, st:0)
|
||||
Massif: 16 (t-span = 139328) S. 4 (t:379104, hp:378400, ex:704, st:0)
|
||||
Massif: 17 (t-span = 139632) S. 75 (t:6092800, hp:6090000, ex:2800, st:0)
|
||||
Massif: 18 (t-span = 141232) S. 77 (t:6233232, hp:6230400, ex:2832, st:0)
|
||||
Massif: 19 (t-span = 142832) Sd 79 (t:6375264, hp:6372400, ex:2864, st:0)
|
||||
Massif: 20 (t-span = 143264) S. 19 (t:1603440, hp:1602000, ex:1440, st:0)
|
||||
Massif: 21 (t-span = 144432) S. 81 (t:6518896, hp:6516000, ex:2896, st:0)
|
||||
Massif: 22 (t-span = 146032) S. 83 (t:6664128, hp:6661200, ex:2928, st:0)
|
||||
Massif: 23 (t-span = 147632) S. 85 (t:6810960, hp:6808000, ex:2960, st:0)
|
||||
Massif: 24 (t-span = 149232) S. 87 (t:6959392, hp:6956400, ex:2992, st:0)
|
||||
Massif: 25 (t-span = 149664) S. 21 (t:1749904, hp:1748400, ex:1504, st:0)
|
||||
Massif: 26 (t-span = 150832) Sd 89 (t:7109424, hp:7106400, ex:3024, st:0)
|
||||
Massif: 27 (t-span = 152432) S. 91 (t:7261056, hp:7258000, ex:3056, st:0)
|
||||
Massif: 28 (t-span = 154032) S. 93 (t:7414288, hp:7411200, ex:3088, st:0)
|
||||
Massif: 29 (t-span = 155632) S. 95 (t:7569120, hp:7566000, ex:3120, st:0)
|
||||
Massif: 30 (t-span = 156064) S. 23 (t:1902768, hp:1901200, ex:1568, st:0)
|
||||
Massif: 31 (t-span = 157232) S. 97 (t:7725552, hp:7722400, ex:3152, st:0)
|
||||
Massif: 32 (t-span = 162464) S. 25 (t:2062032, hp:2060400, ex:1632, st:0)
|
||||
Massif: 33 (t-span = 164928) S. 6 (t:531232, hp:530400, ex:832, st:0)
|
||||
Massif: 34 (t-span = 168864) S. 27 (t:2227696, hp:2226000, ex:1696, st:0)
|
||||
Massif: 35 (t-span = 175264) S. 29 (t:2399760, hp:2398000, ex:1760, st:0)
|
||||
Massif: 36 (t-span = 181664) S. 31 (t:2578224, hp:2576400, ex:1824, st:0)
|
||||
Massif: 37 (t-span = 188064) S. 33 (t:2763088, hp:2761200, ex:1888, st:0)
|
||||
Massif: 38 (t-span = 190528) S. 8 (t:708960, hp:708000, ex:960, st:0)
|
||||
Massif: 39 (t-span = 194464) S. 35 (t:2954352, hp:2952400, ex:1952, st:0)
|
||||
Massif: 40 (t-span = 198912) S. 1 (t:110784, hp:110400, ex:384, st:0)
|
||||
Massif: 41 (t-span = 200864) S. 37 (t:3152016, hp:3150000, ex:2016, st:0)
|
||||
Massif: 42 (t-span = 207264) S. 39 (t:3356080, hp:3354000, ex:2080, st:0)
|
||||
Massif: 43 (t-span = 213664) S. 41 (t:3566544, hp:3564400, ex:2144, st:0)
|
||||
Massif: 44 (t-span = 216128) S. 10 (t:912288, hp:911200, ex:1088, st:0)
|
||||
Massif: 45 (t-span = 220064) S. 43 (t:3783408, hp:3781200, ex:2208, st:0)
|
||||
Massif: 46 (t-span = 226464) S. 45 (t:4006672, hp:4004400, ex:2272, st:0)
|
||||
Massif: 47 (t-span = 232864) S. 47 (t:4236336, hp:4234000, ex:2336, st:0)
|
||||
Massif: 48 (t-span = 236448) S. 98 (t:7804368, hp:7801200, ex:3168, st:0)
|
||||
Massif: 49 (t-span = 239264) S. 50 (t:4472400, hp:4470000, ex:2400, st:0)
|
||||
Massif: Finished culling ( 50 of 100 deleted)
|
||||
Massif: post-cull S. 0 (t:0, hp:0, ex:0, st:0)
|
||||
Massif: post-cull S. 1 (t:198912, hp:198400, ex:512, st:0)
|
||||
Massif: post-cull S. 2 (t:312640, hp:312000, ex:640, st:0)
|
||||
Massif: post-cull S. 3 (t:451968, hp:451200, ex:768, st:0)
|
||||
Massif: post-cull S. 4 (t:616896, hp:616000, ex:896, st:0)
|
||||
Massif: post-cull S. 5 (t:807424, hp:806400, ex:1024, st:0)
|
||||
Massif: post-cull S. 6 (t:1023552, hp:1022400, ex:1152, st:0)
|
||||
Massif: post-cull S. 7 (t:1141216, hp:1140000, ex:1216, st:0)
|
||||
Massif: post-cull S. 8 (t:1265280, hp:1264000, ex:1280, st:0)
|
||||
Massif: post-cull S. 9 (t:1395744, hp:1394400, ex:1344, st:0)
|
||||
Massif: post-cull S. 10 (t:1532608, hp:1531200, ex:1408, st:0)
|
||||
Massif: post-cull S. 11 (t:1675872, hp:1674400, ex:1472, st:0)
|
||||
Massif: post-cull S. 12 (t:1825536, hp:1824000, ex:1536, st:0)
|
||||
Massif: post-cull S. 13 (t:1981600, hp:1980000, ex:1600, st:0)
|
||||
Massif: post-cull S. 14 (t:2144064, hp:2142400, ex:1664, st:0)
|
||||
Massif: post-cull S. 15 (t:2312928, hp:2311200, ex:1728, st:0)
|
||||
Massif: post-cull S. 16 (t:2488192, hp:2486400, ex:1792, st:0)
|
||||
Massif: post-cull S. 17 (t:2669856, hp:2668000, ex:1856, st:0)
|
||||
Massif: post-cull S. 18 (t:2857920, hp:2856000, ex:1920, st:0)
|
||||
Massif: post-cull S. 19 (t:3052384, hp:3050400, ex:1984, st:0)
|
||||
Massif: post-cull S. 20 (t:3253248, hp:3251200, ex:2048, st:0)
|
||||
Massif: post-cull S. 21 (t:3460512, hp:3458400, ex:2112, st:0)
|
||||
Massif: post-cull S. 22 (t:3674176, hp:3672000, ex:2176, st:0)
|
||||
Massif: post-cull S. 23 (t:3894240, hp:3892000, ex:2240, st:0)
|
||||
Massif: post-cull S. 24 (t:4120704, hp:4118400, ex:2304, st:0)
|
||||
Massif: post-cull S. 25 (t:4353568, hp:4351200, ex:2368, st:0)
|
||||
Massif: post-cull S. 26 (t:4592832, hp:4590400, ex:2432, st:0)
|
||||
Massif: post-cull S. 27 (t:4714864, hp:4712400, ex:2464, st:0)
|
||||
Massif: post-cull S. 28 (t:4838496, hp:4836000, ex:2496, st:0)
|
||||
Massif: post-cull S. 29 (t:4963728, hp:4961200, ex:2528, st:0)
|
||||
Massif: post-cull S. 30 (t:5090560, hp:5088000, ex:2560, st:0)
|
||||
Massif: post-cull S. 31 (t:5218992, hp:5216400, ex:2592, st:0)
|
||||
Massif: post-cull S. 32 (t:5349024, hp:5346400, ex:2624, st:0)
|
||||
Massif: post-cull S. 33 (t:5480656, hp:5478000, ex:2656, st:0)
|
||||
Massif: post-cull S. 34 (t:5613888, hp:5611200, ex:2688, st:0)
|
||||
Massif: post-cull S. 35 (t:5748720, hp:5746000, ex:2720, st:0)
|
||||
Massif: post-cull S. 36 (t:5885152, hp:5882400, ex:2752, st:0)
|
||||
Massif: post-cull S. 37 (t:6023184, hp:6020400, ex:2784, st:0)
|
||||
Massif: post-cull S. 38 (t:6162816, hp:6160000, ex:2816, st:0)
|
||||
Massif: post-cull S. 39 (t:6304048, hp:6301200, ex:2848, st:0)
|
||||
Massif: post-cull S. 40 (t:6446880, hp:6444000, ex:2880, st:0)
|
||||
Massif: post-cull S. 41 (t:6591312, hp:6588400, ex:2912, st:0)
|
||||
Massif: post-cull S. 42 (t:6737344, hp:6734400, ex:2944, st:0)
|
||||
Massif: post-cull S. 43 (t:6884976, hp:6882000, ex:2976, st:0)
|
||||
Massif: post-cull S. 44 (t:7034208, hp:7031200, ex:3008, st:0)
|
||||
Massif: post-cull S. 45 (t:7185040, hp:7182000, ex:3040, st:0)
|
||||
Massif: post-cull S. 46 (t:7337472, hp:7334400, ex:3072, st:0)
|
||||
Massif: post-cull S. 47 (t:7491504, hp:7488400, ex:3104, st:0)
|
||||
Massif: post-cull S. 48 (t:7647136, hp:7644000, ex:3136, st:0)
|
||||
Massif: post-cull Sd 49 (t:7883584, hp:7880400, ex:3184, st:0)
|
||||
Massif: New time interval = 113728 (between snapshots 1 and 2)
|
||||
Massif: heap allocs: 200
|
||||
Massif: heap reallocs: 0
|
||||
Massif: heap frees: 0
|
||||
Massif: ignored heap allocs: ...
|
||||
Massif: ignored heap frees: ...
|
||||
Massif: ignored heap reallocs: ...
|
||||
Massif: stack allocs: 0
|
||||
Massif: stack frees: 0
|
||||
Massif: XPts: ...
|
||||
Massif: top-XPts: ...
|
||||
Massif: XPt init expansions: ...
|
||||
Massif: XPt later expansions: ...
|
||||
Massif: SXPt allocs: ...
|
||||
Massif: SXPt frees: ...
|
||||
Massif: skipped snapshots: 1
|
||||
Massif: real snapshots: 200
|
||||
Massif: detailed snapshots: 20
|
||||
Massif: peak snapshots: 0
|
||||
Massif: cullings: 3
|
||||
Massif: XCon redos: ...
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: culling2
|
||||
vgopts: -v -v --stats=yes --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
stderr_filter: filter_verbose
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,73 @@
|
||||
#include <unistd.h>
|
||||
#include "tests/sys_mman.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "valgrind.h"
|
||||
|
||||
#define SUPERBLOCK_SIZE 100000
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Allocator
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
void* get_superblock(void)
|
||||
{
|
||||
void* p = mmap( 0, SUPERBLOCK_SIZE, PROT_READ|PROT_WRITE|PROT_EXEC,
|
||||
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 );
|
||||
|
||||
assert(p != ((void*)(-1)));
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
// has a redzone
|
||||
static void* custom_alloc(int size)
|
||||
{
|
||||
#define RZ 8
|
||||
static void* hp = 0; // current heap pointer
|
||||
static void* hp_lim = 0; // maximum usable byte in current block
|
||||
int size2 = size + RZ*2;
|
||||
void* p;
|
||||
|
||||
if (hp + size2 > hp_lim) {
|
||||
hp = get_superblock();
|
||||
hp_lim = hp + SUPERBLOCK_SIZE - 1;
|
||||
}
|
||||
|
||||
p = hp + RZ;
|
||||
hp += size2;
|
||||
|
||||
VALGRIND_MALLOCLIKE_BLOCK( p, size, RZ, /*is_zeroed*/1 );
|
||||
return (void*)p;
|
||||
}
|
||||
|
||||
static void custom_free(void* p)
|
||||
{
|
||||
// don't actually free any memory... but mark it as freed
|
||||
VALGRIND_FREELIKE_BLOCK( p, RZ );
|
||||
}
|
||||
#undef RZ
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Rest
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int* a = custom_alloc(400); // All sizes are divisible by 16 -- no slop.
|
||||
custom_free(a);
|
||||
|
||||
a = custom_alloc(800);
|
||||
custom_free(a);
|
||||
|
||||
a = malloc(400);
|
||||
free(a);
|
||||
|
||||
a = malloc(800);
|
||||
free(a);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./custom_alloc
|
||||
Massif arguments: --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
B
|
||||
816^ ############ :::::::::::
|
||||
| # :
|
||||
| # :
|
||||
| # :
|
||||
| # :
|
||||
| # :
|
||||
| # :
|
||||
| # :
|
||||
| # :
|
||||
| # :
|
||||
| @@@@@@ # :::::: :
|
||||
| @ # : :
|
||||
| @ # : :
|
||||
| @ # : :
|
||||
| @ # : :
|
||||
| @ # : :
|
||||
| @ # : :
|
||||
| @ # : :
|
||||
| @ # : :
|
||||
| @ # : :
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 4.812
|
||||
|
||||
Number of snapshots: 11
|
||||
Detailed snapshots: [2, 5 (peak)]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 416 416 400 16 0
|
||||
2 416 416 400 16 0
|
||||
96.15% (400B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->96.15% (400B) 0x........: custom_alloc (custom_alloc.c:41)
|
||||
->96.15% (400B) 0x........: main (custom_alloc.c:60)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
3 832 0 0 0 0
|
||||
4 1,648 816 800 16 0
|
||||
5 1,648 816 800 16 0
|
||||
98.04% (800B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (800B) 0x........: custom_alloc (custom_alloc.c:41)
|
||||
->98.04% (800B) 0x........: main (custom_alloc.c:63)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
6 2,464 0 0 0 0
|
||||
7 2,880 416 400 16 0
|
||||
8 3,296 0 0 0 0
|
||||
9 4,112 816 800 16 0
|
||||
10 4,928 0 0 0 0
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: custom_alloc
|
||||
vgopts: --stacks=no --time-unit=B --heap-admin=16 --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,61 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./deep
|
||||
Massif arguments: --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
3.984^ :
|
||||
| :
|
||||
| @@@@@@@:
|
||||
| @ :
|
||||
| :::::::@ :
|
||||
| : @ :
|
||||
| :::::::: @ :
|
||||
| : : @ :
|
||||
| :::::::: : @ :
|
||||
| : : : @ :
|
||||
| :::::::: : : @ :
|
||||
| : : : : @ :
|
||||
| ::::::::: : : : @ :
|
||||
| : : : : : @ :
|
||||
| :::::::: : : : : @ :
|
||||
| : : : : : : @ :
|
||||
| :::::::: : : : : : @ :
|
||||
| : : : : : : : @ :
|
||||
| :::::::: : : : : : : @ :
|
||||
| : : : : : : : : @ :
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 3.984
|
||||
|
||||
Number of snapshots: 11
|
||||
Detailed snapshots: [9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 408 408 400 8 0
|
||||
2 816 816 800 16 0
|
||||
3 1,224 1,224 1,200 24 0
|
||||
4 1,632 1,632 1,600 32 0
|
||||
5 2,040 2,040 2,000 40 0
|
||||
6 2,448 2,448 2,400 48 0
|
||||
7 2,856 2,856 2,800 56 0
|
||||
8 3,264 3,264 3,200 64 0
|
||||
9 3,672 3,672 3,600 72 0
|
||||
98.04% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (3,600B) 0x........: a12 (deep.c:16)
|
||||
->98.04% (3,600B) 0x........: a11 (deep.c:17)
|
||||
->98.04% (3,600B) 0x........: a10 (deep.c:18)
|
||||
->98.04% (3,600B) 0x........: a9 (deep.c:19)
|
||||
->98.04% (3,600B) 0x........: a8 (deep.c:20)
|
||||
->98.04% (3,600B) 0x........: a7 (deep.c:21)
|
||||
->98.04% (3,600B) 0x........: a6 (deep.c:22)
|
||||
->98.04% (3,600B) 0x........: a5 (deep.c:23)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 4,080 4,080 4,000 80 0
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: deep
|
||||
vgopts: --stacks=no --time-unit=B --depth=8 --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,59 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./deep
|
||||
Massif arguments: --stacks=no --time-unit=B --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
3.984^ :
|
||||
| :
|
||||
| @@@@@@@:
|
||||
| @ :
|
||||
| :::::::@ :
|
||||
| : @ :
|
||||
| :::::::: @ :
|
||||
| : : @ :
|
||||
| :::::::: : @ :
|
||||
| : : : @ :
|
||||
| :::::::: : : @ :
|
||||
| : : : : @ :
|
||||
| ::::::::: : : : @ :
|
||||
| : : : : : @ :
|
||||
| :::::::: : : : : @ :
|
||||
| : : : : : : @ :
|
||||
| :::::::: : : : : : @ :
|
||||
| : : : : : : : @ :
|
||||
| :::::::: : : : : : : @ :
|
||||
| : : : : : : : : @ :
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 3.984
|
||||
|
||||
Number of snapshots: 11
|
||||
Detailed snapshots: [9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 408 408 400 8 0
|
||||
2 816 816 800 16 0
|
||||
3 1,224 1,224 1,200 24 0
|
||||
4 1,632 1,632 1,600 32 0
|
||||
5 2,040 2,040 2,000 40 0
|
||||
6 2,448 2,448 2,400 48 0
|
||||
7 2,856 2,856 2,800 56 0
|
||||
8 3,264 3,264 3,200 64 0
|
||||
9 3,672 3,672 3,600 72 0
|
||||
98.04% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (3,600B) 0x........: a5 (deep.c:23)
|
||||
->98.04% (3,600B) 0x........: a4 (deep.c:24)
|
||||
->98.04% (3,600B) 0x........: a3 (deep.c:25)
|
||||
->98.04% (3,600B) 0x........: a2 (deep.c:26)
|
||||
->98.04% (3,600B) 0x........: a1 (deep.c:27)
|
||||
->98.04% (3,600B) 0x........: main (deep.c:35)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 4,080 4,080 4,000 80 0
|
||||
@@ -0,0 +1,60 @@
|
||||
Massif: alloc-fns:
|
||||
Massif: malloc
|
||||
Massif: __builtin_new
|
||||
Massif: operator new(unsigned)
|
||||
Massif: operator new(unsigned long)
|
||||
Massif: __builtin_vec_new
|
||||
Massif: operator new[](unsigned)
|
||||
Massif: operator new[](unsigned long)
|
||||
Massif: calloc
|
||||
Massif: realloc
|
||||
Massif: memalign
|
||||
Massif: posix_memalign
|
||||
Massif: valloc
|
||||
Massif: operator new(unsigned, std::nothrow_t const&)
|
||||
Massif: operator new[](unsigned, std::nothrow_t const&)
|
||||
Massif: operator new(unsigned long, std::nothrow_t const&)
|
||||
Massif: operator new[](unsigned long, std::nothrow_t const&)
|
||||
Massif: a6
|
||||
Massif: a7
|
||||
Massif: a8
|
||||
Massif: a9
|
||||
Massif: a10
|
||||
Massif: a11
|
||||
Massif: a12
|
||||
Massif: ignore-fns:
|
||||
Massif: 0: __part_load_locale
|
||||
Massif: 1: __time_load_locale
|
||||
Massif: 2: dwarf2_unwind_dyld_add_image_hook
|
||||
Massif: 3: get_or_create_key_element
|
||||
Massif: startup S. 0 (t:0, hp:0, ex:0, st:0)
|
||||
Massif: alloc S. 1 (t:408, hp:400, ex:8, st:0)
|
||||
Massif: alloc S. 2 (t:816, hp:800, ex:16, st:0)
|
||||
Massif: alloc S. 3 (t:1224, hp:1200, ex:24, st:0)
|
||||
Massif: alloc S. 4 (t:1632, hp:1600, ex:32, st:0)
|
||||
Massif: alloc S. 5 (t:2040, hp:2000, ex:40, st:0)
|
||||
Massif: alloc S. 6 (t:2448, hp:2400, ex:48, st:0)
|
||||
Massif: alloc S. 7 (t:2856, hp:2800, ex:56, st:0)
|
||||
Massif: alloc S. 8 (t:3264, hp:3200, ex:64, st:0)
|
||||
Massif: alloc Sd 9 (t:3672, hp:3600, ex:72, st:0)
|
||||
Massif: alloc S. 10 (t:4080, hp:4000, ex:80, st:0)
|
||||
Massif: heap allocs: 10
|
||||
Massif: heap reallocs: 0
|
||||
Massif: heap frees: 0
|
||||
Massif: ignored heap allocs: ...
|
||||
Massif: ignored heap frees: ...
|
||||
Massif: ignored heap reallocs: ...
|
||||
Massif: stack allocs: 0
|
||||
Massif: stack frees: 0
|
||||
Massif: XPts: ...
|
||||
Massif: top-XPts: ...
|
||||
Massif: XPt init expansions: ...
|
||||
Massif: XPt later expansions: ...
|
||||
Massif: SXPt allocs: ...
|
||||
Massif: SXPt frees: ...
|
||||
Massif: skipped snapshots: 0
|
||||
Massif: real snapshots: 11
|
||||
Massif: detailed snapshots: 1
|
||||
Massif: peak snapshots: 0
|
||||
Massif: cullings: 0
|
||||
Massif: XCon redos: ...
|
||||
@@ -0,0 +1,6 @@
|
||||
prog: deep
|
||||
vgopts: --stats=yes --stacks=no --time-unit=B --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 -v -v --depth=8 --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
stderr_filter: filter_verbose
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,56 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./deep
|
||||
Massif arguments: --stacks=no --time-unit=B --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --depth=8 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
3.984^ :
|
||||
| :
|
||||
| @@@@@@@:
|
||||
| @ :
|
||||
| :::::::@ :
|
||||
| : @ :
|
||||
| :::::::: @ :
|
||||
| : : @ :
|
||||
| :::::::: : @ :
|
||||
| : : : @ :
|
||||
| :::::::: : : @ :
|
||||
| : : : : @ :
|
||||
| ::::::::: : : : @ :
|
||||
| : : : : : @ :
|
||||
| :::::::: : : : : @ :
|
||||
| : : : : : : @ :
|
||||
| :::::::: : : : : : @ :
|
||||
| : : : : : : : @ :
|
||||
| :::::::: : : : : : : @ :
|
||||
| : : : : : : : : @ :
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 3.984
|
||||
|
||||
Number of snapshots: 11
|
||||
Detailed snapshots: [9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 408 408 400 8 0
|
||||
2 816 816 800 16 0
|
||||
3 1,224 1,224 1,200 24 0
|
||||
4 1,632 1,632 1,600 32 0
|
||||
5 2,040 2,040 2,000 40 0
|
||||
6 2,448 2,448 2,400 48 0
|
||||
7 2,856 2,856 2,800 56 0
|
||||
8 3,264 3,264 3,200 64 0
|
||||
9 3,672 3,672 3,600 72 0
|
||||
98.04% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (3,600B) 0x........: a2 (deep.c:26)
|
||||
->98.04% (3,600B) 0x........: a1 (deep.c:27)
|
||||
->98.04% (3,600B) 0x........: main (deep.c:35)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 4,080 4,080 4,000 80 0
|
||||
@@ -0,0 +1,63 @@
|
||||
Massif: alloc-fns:
|
||||
Massif: malloc
|
||||
Massif: __builtin_new
|
||||
Massif: operator new(unsigned)
|
||||
Massif: operator new(unsigned long)
|
||||
Massif: __builtin_vec_new
|
||||
Massif: operator new[](unsigned)
|
||||
Massif: operator new[](unsigned long)
|
||||
Massif: calloc
|
||||
Massif: realloc
|
||||
Massif: memalign
|
||||
Massif: posix_memalign
|
||||
Massif: valloc
|
||||
Massif: operator new(unsigned, std::nothrow_t const&)
|
||||
Massif: operator new[](unsigned, std::nothrow_t const&)
|
||||
Massif: operator new(unsigned long, std::nothrow_t const&)
|
||||
Massif: operator new[](unsigned long, std::nothrow_t const&)
|
||||
Massif: a3
|
||||
Massif: a4
|
||||
Massif: a5
|
||||
Massif: a6
|
||||
Massif: a7
|
||||
Massif: a8
|
||||
Massif: a9
|
||||
Massif: a10
|
||||
Massif: a11
|
||||
Massif: a12
|
||||
Massif: ignore-fns:
|
||||
Massif: 0: __part_load_locale
|
||||
Massif: 1: __time_load_locale
|
||||
Massif: 2: dwarf2_unwind_dyld_add_image_hook
|
||||
Massif: 3: get_or_create_key_element
|
||||
Massif: startup S. 0 (t:0, hp:0, ex:0, st:0)
|
||||
Massif: alloc S. 1 (t:408, hp:400, ex:8, st:0)
|
||||
Massif: alloc S. 2 (t:816, hp:800, ex:16, st:0)
|
||||
Massif: alloc S. 3 (t:1224, hp:1200, ex:24, st:0)
|
||||
Massif: alloc S. 4 (t:1632, hp:1600, ex:32, st:0)
|
||||
Massif: alloc S. 5 (t:2040, hp:2000, ex:40, st:0)
|
||||
Massif: alloc S. 6 (t:2448, hp:2400, ex:48, st:0)
|
||||
Massif: alloc S. 7 (t:2856, hp:2800, ex:56, st:0)
|
||||
Massif: alloc S. 8 (t:3264, hp:3200, ex:64, st:0)
|
||||
Massif: alloc Sd 9 (t:3672, hp:3600, ex:72, st:0)
|
||||
Massif: alloc S. 10 (t:4080, hp:4000, ex:80, st:0)
|
||||
Massif: heap allocs: 10
|
||||
Massif: heap reallocs: 0
|
||||
Massif: heap frees: 0
|
||||
Massif: ignored heap allocs: ...
|
||||
Massif: ignored heap frees: ...
|
||||
Massif: ignored heap reallocs: ...
|
||||
Massif: stack allocs: 0
|
||||
Massif: stack frees: 0
|
||||
Massif: XPts: ...
|
||||
Massif: top-XPts: ...
|
||||
Massif: XPt init expansions: ...
|
||||
Massif: XPt later expansions: ...
|
||||
Massif: SXPt allocs: ...
|
||||
Massif: SXPt frees: ...
|
||||
Massif: skipped snapshots: 0
|
||||
Massif: real snapshots: 11
|
||||
Massif: detailed snapshots: 1
|
||||
Massif: peak snapshots: 0
|
||||
Massif: cullings: 0
|
||||
Massif: XCon redos: ...
|
||||
@@ -0,0 +1,6 @@
|
||||
prog: deep
|
||||
vgopts: --stacks=no --time-unit=B --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 -v -v --stats=yes --depth=8 --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
stderr_filter: filter_verbose
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,54 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./deep
|
||||
Massif arguments: --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
3.984^ :
|
||||
| :
|
||||
| @@@@@@@:
|
||||
| @ :
|
||||
| :::::::@ :
|
||||
| : @ :
|
||||
| :::::::: @ :
|
||||
| : : @ :
|
||||
| :::::::: : @ :
|
||||
| : : : @ :
|
||||
| :::::::: : : @ :
|
||||
| : : : : @ :
|
||||
| ::::::::: : : : @ :
|
||||
| : : : : : @ :
|
||||
| :::::::: : : : : @ :
|
||||
| : : : : : : @ :
|
||||
| :::::::: : : : : : @ :
|
||||
| : : : : : : : @ :
|
||||
| :::::::: : : : : : : @ :
|
||||
| : : : : : : : : @ :
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 3.984
|
||||
|
||||
Number of snapshots: 11
|
||||
Detailed snapshots: [9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 408 408 400 8 0
|
||||
2 816 816 800 16 0
|
||||
3 1,224 1,224 1,200 24 0
|
||||
4 1,632 1,632 1,600 32 0
|
||||
5 2,040 2,040 2,000 40 0
|
||||
6 2,448 2,448 2,400 48 0
|
||||
7 2,856 2,856 2,800 56 0
|
||||
8 3,264 3,264 3,200 64 0
|
||||
9 3,672 3,672 3,600 72 0
|
||||
98.04% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (3,600B) 0x........: (below main)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 4,080 4,080 4,000 80 0
|
||||
@@ -0,0 +1,55 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./deep
|
||||
Massif arguments: --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
3.984^ :
|
||||
| :
|
||||
| @@@@@@@:
|
||||
| @ :
|
||||
| :::::::@ :
|
||||
| : @ :
|
||||
| :::::::: @ :
|
||||
| : : @ :
|
||||
| :::::::: : @ :
|
||||
| : : : @ :
|
||||
| :::::::: : : @ :
|
||||
| : : : : @ :
|
||||
| ::::::::: : : : @ :
|
||||
| : : : : : @ :
|
||||
| :::::::: : : : : @ :
|
||||
| : : : : : : @ :
|
||||
| :::::::: : : : : : @ :
|
||||
| : : : : : : : @ :
|
||||
| :::::::: : : : : : : @ :
|
||||
| : : : : : : : : @ :
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 3.984
|
||||
|
||||
Number of snapshots: 11
|
||||
Detailed snapshots: [9]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 408 408 400 8 0
|
||||
2 816 816 800 16 0
|
||||
3 1,224 1,224 1,200 24 0
|
||||
4 1,632 1,632 1,600 32 0
|
||||
5 2,040 2,040 2,000 40 0
|
||||
6 2,448 2,448 2,400 48 0
|
||||
7 2,856 2,856 2,800 56 0
|
||||
8 3,264 3,264 3,200 64 0
|
||||
9 3,672 3,672 3,600 72 0
|
||||
98.04% (3,600B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.04% (3,600B) 0x........: generic_start_main.isra.0 (in /...libc...)
|
||||
->98.04% (3,600B) 0x........: (below main)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 4,080 4,080 4,000 80 0
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: deep
|
||||
vgopts: --stacks=no --time-unit=B --alloc-fn=a1 --alloc-fn=a2 --alloc-fn=a3 --alloc-fn=a4 --alloc-fn=a5 --alloc-fn=a6 --alloc-fn=a7 --alloc-fn=a8 --alloc-fn=a9 --alloc-fn=a10 --alloc-fn=a11 --alloc-fn=a12 --alloc-fn=main --depth=20 --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses | ../../tests/filter_libc
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,38 @@
|
||||
// This is a test for complicated stack traces.
|
||||
//
|
||||
// - In deep-A.vgtest, the stack trace is larger than the asked-for depth
|
||||
// (12 vs. 8) so not all of the trace is shown.
|
||||
// - In deep-B.vgtest, we have --alloc-fn=a6..a12, which means that get_XCon
|
||||
// needs to redo the IP getting, because 7 functions get removed from the
|
||||
// trace, which is more than the initial overestimate of 3.
|
||||
// - In deep-C.vgtest, we have --alloc-fn=a3..a12, which means that get_XCon
|
||||
// ends up with an empty stack trace after removing all the alloc-fns.
|
||||
// It then redoes it.
|
||||
// - In deep-D.vgtest, we have --alloc-fn=main..a12, which means we have a
|
||||
// stack trace with a single "(below main)" entry.
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
void a12(int n) { malloc(n); }
|
||||
void a11(int n) { a12(n); }
|
||||
void a10(int n) { a11(n); }
|
||||
void a9 (int n) { a10(n); }
|
||||
void a8 (int n) { a9 (n); }
|
||||
void a7 (int n) { a8 (n); }
|
||||
void a6 (int n) { a7 (n); }
|
||||
void a5 (int n) { a6 (n); }
|
||||
void a4 (int n) { a5 (n); }
|
||||
void a3 (int n) { a4 (n); }
|
||||
void a2 (int n) { a3 (n); }
|
||||
void a1 (int n) { a2 (n); }
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
// This one exceeds the default --depth.
|
||||
for (i = 0; i < 10; i++)
|
||||
a1(400); // divisible by 16 -- no slop
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#! /bin/sh
|
||||
|
||||
dir=`dirname $0`
|
||||
|
||||
$dir/../../tests/filter_stderr_basic |
|
||||
|
||||
# Remove "Massif, ..." line and the following copyright line.
|
||||
sed "/^Massif, a heap profiler/ , /./ d" |
|
||||
|
||||
# Remove AIX-only alloc-fns
|
||||
perl -n -e 'print if !/^Massif: (malloc|calloc|realloc|memalign)_common$/' |
|
||||
|
||||
# Remove Darwin-only alloc-fns
|
||||
perl -n -e 'print if !/^Massif: malloc_zone_(malloc|calloc|realloc|memalign|valloc)$/'
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#! /bin/sh
|
||||
|
||||
# This filters out all the lines that don't have "Massif:" in them. For
|
||||
# testing the -v option.
|
||||
|
||||
dir=`dirname $0`
|
||||
|
||||
$dir/filter_stderr |
|
||||
|
||||
# Remove any --pid:0: strings (debuglog level zero output)
|
||||
sed "/^--[0-9]\{1,7\}:0:*/d" |
|
||||
|
||||
# Only print lines that contain "Massif:". The -n means don't print any
|
||||
# lines by default, and the 'p' means do print those that match the pattern.
|
||||
sed -n "/Massif:/p" |
|
||||
|
||||
# These ignored heap counts could vary from machine to machine.
|
||||
sed "s/\(Massif: ignored heap allocs:\).*/\1 .../" |
|
||||
sed "s/\(Massif: ignored heap frees:\).*/\1 .../" |
|
||||
sed "s/\(Massif: ignored heap reallocs:\).*/\1 .../" |
|
||||
|
||||
# These XPt counts vary from machine to machine, because the size of the
|
||||
# stack trace can vary -- eg. some machines have more stack frames below
|
||||
# zero than other machines. So filter them out.
|
||||
sed "s/\(Massif: XPts:\).*/\1 .../" |
|
||||
sed "s/\(Massif: top-XPts:\).*/\1 .../" |
|
||||
sed "s/\(Massif: XPt init expansions:\).*/\1 .../" |
|
||||
sed "s/\(Massif: XPt later expansions:\).*/\1 .../" |
|
||||
sed "s/\(Massif: SXPt allocs:\).*/\1 .../" |
|
||||
sed "s/\(Massif: SXPt frees:\).*/\1 .../" |
|
||||
sed "s/\(Massif: XCon redos:\).*/\1 .../"
|
||||
@@ -0,0 +1,51 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
// All sizes are divisible by 16 -- no slop.
|
||||
|
||||
int* ignore1(void)
|
||||
{
|
||||
// Allocating/freeing in an ignored function: ignored.
|
||||
int* ignored_x1 = malloc(400);
|
||||
int* ignored_x2 = malloc(400);
|
||||
free(ignored_x2);
|
||||
return ignored_x1;
|
||||
}
|
||||
|
||||
void ignore2(int* x, int* ignored_x)
|
||||
{
|
||||
// Growing/shrinking a non-ignored block in an ignored function: ignored.
|
||||
x = realloc(x, 800);
|
||||
x = realloc(x, 400);
|
||||
|
||||
// Growing/shrinking an ignored block in an ignored function: ignored.
|
||||
ignored_x = realloc(ignored_x, 800);
|
||||
ignored_x = realloc(ignored_x, 400);
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int* x;
|
||||
int* ignored_x;
|
||||
|
||||
// Not ignored.
|
||||
x = malloc(400);
|
||||
|
||||
// Get an ignored block.
|
||||
ignored_x = ignore1();
|
||||
|
||||
// Growing/shrinking a non-ignored block in a non-ignored function:
|
||||
// not ignored.
|
||||
x = realloc(x, 800);
|
||||
x = realloc(x, 400);
|
||||
|
||||
// Growing/shrinking an ignored block in a non-ignored function: ignored.
|
||||
ignored_x = realloc(ignored_x, 800);
|
||||
ignored_x = realloc(ignored_x, 400);
|
||||
|
||||
ignore2(x, ignored_x);
|
||||
|
||||
x = realloc(ignored_x, 0); // equivalent to 'free(ignored_x)'.
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./ignored
|
||||
Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --ignore-fn=ignore1 --ignore-fn=ignore2 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
B
|
||||
800^ #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| #
|
||||
| :::::::::::::::::::::::::::::::::::#
|
||||
| : #
|
||||
| : #
|
||||
| : #
|
||||
| : #
|
||||
| : #
|
||||
| : #
|
||||
| : #
|
||||
| : #
|
||||
| : #
|
||||
0 +----------------------------------------------------------------------->B
|
||||
0 800
|
||||
|
||||
Number of snapshots: 5
|
||||
Detailed snapshots: [3 (peak)]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 400 400 400 0 0
|
||||
2 800 800 800 0 0
|
||||
3 800 800 800 0 0
|
||||
100.00% (800B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->100.00% (800B) 0x........: main (ignored.c:38)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
4 800 800 400 400 0
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
prog: ignored
|
||||
vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=ignore1 --ignore-fn=ignore2
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,31 @@
|
||||
// When we cull and compute the new minimum time between snapshots, we want
|
||||
// to ignore any gap between two uncullable snapshots, because it is not
|
||||
// representative. This program tests that.
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
// The peak is from the first allocation.
|
||||
int* x = malloc(1024);
|
||||
free(x);
|
||||
|
||||
// Now do an allocation to provide the post-peak baseline.
|
||||
malloc(512);
|
||||
|
||||
// Now we do lots of allocations below the peak. With the proper
|
||||
// handling, the allocations should still be smoothly distributed.
|
||||
// Without it, the snapshots in the second half of the graph would be
|
||||
// clustered much more closely than those in the first half.
|
||||
//
|
||||
|
||||
for (i = 0; i < 350; i++) {
|
||||
int* y = malloc(256);
|
||||
free(y);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,237 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./ignoring
|
||||
Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
1.008^##
|
||||
|#
|
||||
|#
|
||||
|#
|
||||
|#
|
||||
|# ::::::::::::@:::@:::@:::@:::@::::@:::::::@:::::::@:::::::@::::
|
||||
|# ::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# ::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# ::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# ::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# @:::@:::::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# @:::@:::::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# @:::@:::::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# @:::@:::::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# @:::@:::::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# @:::@:::::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# @:::@:::::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# @:::@:::::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# @:::@:::::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
|# @:::@:::::::::::::::@:::@:::@:::@:::@: ::@:::::::@:::::::@:::::::@::::
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 182.7
|
||||
|
||||
Number of snapshots: 88
|
||||
Detailed snapshots: [1 (peak), 3, 8, 26, 31, 36, 41, 46, 52, 62, 72, 82]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 1,032 1,032 1,024 8 0
|
||||
99.22% (1,024B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->99.22% (1,024B) 0x........: main (ignoring.c:13)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
2 5,224 520 512 8 0
|
||||
3 7,336 520 512 8 0
|
||||
98.46% (512B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.46% (512B) 0x........: main (ignoring.c:17)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
4 9,448 520 512 8 0
|
||||
5 11,560 520 512 8 0
|
||||
6 13,672 520 512 8 0
|
||||
7 15,784 520 512 8 0
|
||||
8 17,896 520 512 8 0
|
||||
98.46% (512B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->98.46% (512B) 0x........: main (ignoring.c:17)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
9 20,008 520 512 8 0
|
||||
10 22,120 520 512 8 0
|
||||
11 24,232 520 512 8 0
|
||||
12 27,664 784 768 16 0
|
||||
13 29,776 784 768 16 0
|
||||
14 31,888 784 768 16 0
|
||||
15 34,000 784 768 16 0
|
||||
16 36,112 784 768 16 0
|
||||
17 38,224 784 768 16 0
|
||||
18 40,336 784 768 16 0
|
||||
19 42,448 784 768 16 0
|
||||
20 44,560 784 768 16 0
|
||||
21 46,672 784 768 16 0
|
||||
22 48,784 784 768 16 0
|
||||
23 50,896 784 768 16 0
|
||||
24 53,008 784 768 16 0
|
||||
25 55,120 784 768 16 0
|
||||
26 57,232 784 768 16 0
|
||||
97.96% (768B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->65.31% (512B) 0x........: main (ignoring.c:17)
|
||||
|
|
||||
->32.65% (256B) 0x........: main (ignoring.c:26)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
27 59,344 784 768 16 0
|
||||
28 61,456 784 768 16 0
|
||||
29 63,568 784 768 16 0
|
||||
30 65,680 784 768 16 0
|
||||
31 67,792 784 768 16 0
|
||||
97.96% (768B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->65.31% (512B) 0x........: main (ignoring.c:17)
|
||||
|
|
||||
->32.65% (256B) 0x........: main (ignoring.c:26)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
32 69,904 784 768 16 0
|
||||
33 72,016 784 768 16 0
|
||||
34 74,128 784 768 16 0
|
||||
35 76,240 784 768 16 0
|
||||
36 78,352 784 768 16 0
|
||||
97.96% (768B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->65.31% (512B) 0x........: main (ignoring.c:17)
|
||||
|
|
||||
->32.65% (256B) 0x........: main (ignoring.c:26)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
37 80,464 784 768 16 0
|
||||
38 82,576 784 768 16 0
|
||||
39 84,688 784 768 16 0
|
||||
40 86,800 784 768 16 0
|
||||
41 88,912 784 768 16 0
|
||||
97.96% (768B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->65.31% (512B) 0x........: main (ignoring.c:17)
|
||||
|
|
||||
->32.65% (256B) 0x........: main (ignoring.c:26)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
42 91,024 784 768 16 0
|
||||
43 93,136 784 768 16 0
|
||||
44 95,248 784 768 16 0
|
||||
45 97,360 784 768 16 0
|
||||
46 99,472 784 768 16 0
|
||||
97.96% (768B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->65.31% (512B) 0x........: main (ignoring.c:17)
|
||||
|
|
||||
->32.65% (256B) 0x........: main (ignoring.c:26)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
47 101,584 784 768 16 0
|
||||
48 103,696 784 768 16 0
|
||||
49 106,864 784 768 16 0
|
||||
50 108,976 784 768 16 0
|
||||
51 111,088 784 768 16 0
|
||||
52 113,200 784 768 16 0
|
||||
97.96% (768B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->65.31% (512B) 0x........: main (ignoring.c:17)
|
||||
|
|
||||
->32.65% (256B) 0x........: main (ignoring.c:26)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
53 115,312 784 768 16 0
|
||||
54 117,424 784 768 16 0
|
||||
55 119,536 784 768 16 0
|
||||
56 121,648 784 768 16 0
|
||||
57 123,760 784 768 16 0
|
||||
58 125,872 784 768 16 0
|
||||
59 127,984 784 768 16 0
|
||||
60 130,096 784 768 16 0
|
||||
61 132,208 784 768 16 0
|
||||
62 134,320 784 768 16 0
|
||||
97.96% (768B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->65.31% (512B) 0x........: main (ignoring.c:17)
|
||||
|
|
||||
->32.65% (256B) 0x........: main (ignoring.c:26)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
63 136,432 784 768 16 0
|
||||
64 138,544 784 768 16 0
|
||||
65 140,656 784 768 16 0
|
||||
66 142,768 784 768 16 0
|
||||
67 144,880 784 768 16 0
|
||||
68 146,992 784 768 16 0
|
||||
69 149,104 784 768 16 0
|
||||
70 151,216 784 768 16 0
|
||||
71 153,328 784 768 16 0
|
||||
72 155,440 784 768 16 0
|
||||
97.96% (768B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->65.31% (512B) 0x........: main (ignoring.c:17)
|
||||
|
|
||||
->32.65% (256B) 0x........: main (ignoring.c:26)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
73 157,552 784 768 16 0
|
||||
74 159,664 784 768 16 0
|
||||
75 161,776 784 768 16 0
|
||||
76 163,888 784 768 16 0
|
||||
77 166,000 784 768 16 0
|
||||
78 168,112 784 768 16 0
|
||||
79 170,224 784 768 16 0
|
||||
80 172,336 784 768 16 0
|
||||
81 174,448 784 768 16 0
|
||||
82 176,560 784 768 16 0
|
||||
97.96% (768B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->65.31% (512B) 0x........: main (ignoring.c:17)
|
||||
|
|
||||
->32.65% (256B) 0x........: main (ignoring.c:26)
|
||||
|
|
||||
->00.00% (0B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
83 178,672 784 768 16 0
|
||||
84 180,784 784 768 16 0
|
||||
85 182,896 784 768 16 0
|
||||
86 185,008 784 768 16 0
|
||||
87 187,120 784 768 16 0
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: ignoring
|
||||
vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,34 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
// In this test, the size of the insignificant nodes is greater than the
|
||||
// size of two of the significant nodes. This is quite common in big
|
||||
// programs, but not so common in small tests, so we test for it here.
|
||||
int main(void)
|
||||
{
|
||||
malloc(16000); // all sizes are divisible by 16 -- no slop
|
||||
malloc(240);
|
||||
malloc(192);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
malloc(16);
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./insig
|
||||
Massif arguments: --stacks=no --time-unit=B --heap-admin=128 --massif-out-file=massif.out --threshold=0.99 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
19.23^ :
|
||||
| :@::
|
||||
| ::::@::
|
||||
| :::@::::@::
|
||||
| ::::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
| : ::::@::::@::
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 19.23
|
||||
|
||||
Number of snapshots: 24
|
||||
Detailed snapshots: [9, 19]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 16,128 16,128 16,000 128 0
|
||||
2 16,496 16,496 16,240 256 0
|
||||
3 16,816 16,816 16,432 384 0
|
||||
4 16,960 16,960 16,448 512 0
|
||||
5 17,104 17,104 16,464 640 0
|
||||
6 17,248 17,248 16,480 768 0
|
||||
7 17,392 17,392 16,496 896 0
|
||||
8 17,536 17,536 16,512 1,024 0
|
||||
9 17,680 17,680 16,528 1,152 0
|
||||
93.48% (16,528B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->90.50% (16,000B) 0x........: main (insig.c:8)
|
||||
|
|
||||
->01.36% (240B) 0x........: main (insig.c:9)
|
||||
|
|
||||
->01.09% (192B) 0x........: main (insig.c:10)
|
||||
|
|
||||
->00.54% (96B) in 1+ places, all below ms_print's threshold (01.00%)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
10 17,824 17,824 16,544 1,280 0
|
||||
11 17,968 17,968 16,560 1,408 0
|
||||
12 18,112 18,112 16,576 1,536 0
|
||||
13 18,256 18,256 16,592 1,664 0
|
||||
14 18,400 18,400 16,608 1,792 0
|
||||
15 18,544 18,544 16,624 1,920 0
|
||||
16 18,688 18,688 16,640 2,048 0
|
||||
17 18,832 18,832 16,656 2,176 0
|
||||
18 18,976 18,976 16,672 2,304 0
|
||||
19 19,120 19,120 16,688 2,432 0
|
||||
87.28% (16,688B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->83.68% (16,000B) 0x........: main (insig.c:8)
|
||||
|
|
||||
->01.34% (256B) in 16 places, all below massif's threshold (0.99%)
|
||||
|
|
||||
->01.26% (240B) 0x........: main (insig.c:9)
|
||||
|
|
||||
->01.00% (192B) 0x........: main (insig.c:10)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
20 19,264 19,264 16,704 2,560 0
|
||||
21 19,408 19,408 16,720 2,688 0
|
||||
22 19,552 19,552 16,736 2,816 0
|
||||
23 19,696 19,696 16,752 2,944 0
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# At one point, thresholds less than 1.0% were misprinted as 00.00%, so test that here.
|
||||
prog: insig
|
||||
vgopts: --stacks=no --time-unit=B --heap-admin=128 --massif-out-file=massif.out --threshold=0.99
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,71 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
// Long function name. Make sure it is not truncated.
|
||||
|
||||
|
||||
#define A2500 \
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij\
|
||||
abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij
|
||||
|
||||
void A2500(int n)
|
||||
{
|
||||
if (n > 0) {
|
||||
malloc(2000); // Divisible by 16 -- no slop.
|
||||
A2500(n-1);
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
A2500(3);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
--------------------------------------------------------------------------------
|
||||
Command: ./long-names
|
||||
Massif arguments: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --detailed-freq=3 --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
ms_print arguments: massif.out
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
KB
|
||||
5.859^ :
|
||||
| :
|
||||
| :
|
||||
| :
|
||||
| :
|
||||
| :
|
||||
| :
|
||||
| @@@@@@@@@@@@@@@@@@@@@@@:
|
||||
| @ :
|
||||
| @ :
|
||||
| @ :
|
||||
| @ :
|
||||
| @ :
|
||||
| @ :
|
||||
| ::::::::::::::::::::::::@ :
|
||||
| : @ :
|
||||
| : @ :
|
||||
| : @ :
|
||||
| : @ :
|
||||
| : @ :
|
||||
0 +----------------------------------------------------------------------->KB
|
||||
0 5.859
|
||||
|
||||
Number of snapshots: 4
|
||||
Detailed snapshots: [2]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
0 0 0 0 0 0
|
||||
1 2,000 2,000 2,000 0 0
|
||||
2 4,000 4,000 4,000 0 0
|
||||
100.00% (4,000B) (heap allocation functions) malloc/new/new[], --alloc-fns, etc.
|
||||
->100.00% (4,000B) 0x........: abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij (long-names.c:61)
|
||||
->50.00% (2,000B) 0x........: main (long-names.c:68)
|
||||
|
|
||||
->50.00% (2,000B) 0x........: abcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghijabcdefghijABCDEFGHIJabcdefghijABCDEFGHIJabcdefghij (long-names.c:62)
|
||||
->50.00% (2,000B) 0x........: main (long-names.c:68)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
n time(B) total(B) useful-heap(B) extra-heap(B) stacks(B)
|
||||
--------------------------------------------------------------------------------
|
||||
3 6,000 6,000 6,000 0 0
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
prog: long-names
|
||||
vgopts: --stacks=no --time-unit=B --heap-admin=0 --massif-out-file=massif.out --detailed-freq=3
|
||||
vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element
|
||||
post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses
|
||||
cleanup: rm massif.out
|
||||
@@ -0,0 +1,22 @@
|
||||
// This test does enough allocation and deallocation that the time-unit,
|
||||
// when measured in bytes -- 6,000,000,000 -- exceeds 32-bits. It also does
|
||||
// it in a slightly uneven fashion so we get a range of different totals
|
||||
// for the snapshots, including a zero-sized detailed snapshot.
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i, *x1, *x2, *x3, *x4;
|
||||
for (i = 0; i < 1500; i++) {
|
||||
x1 = malloc( 800 * 1000);
|
||||
x2 = malloc(1100 * 1000);
|
||||
free(x1);
|
||||
x3 = malloc(1200 * 1000);
|
||||
free(x2);
|
||||
free(x3);
|
||||
x4 = malloc( 900 * 1000);
|
||||
free(x4);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user