mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
Implement metadata statistics.
There are three categories of metadata: - Base allocations are used for bootstrap-sensitive internal allocator data structures. - Arena chunk headers comprise pages which track the states of the non-metadata pages. - Internal allocations differ from application-originated allocations in that they are for internal use, and that they are omitted from heap profiles. The metadata statistics comprise the metadata categories as follows: - stats.metadata: All metadata -- base + arena chunk headers + internal allocations. - stats.arenas.<i>.metadata.mapped: Arena chunk headers. - stats.arenas.<i>.metadata.allocated: Internal allocations. This is reported separately from the other metadata statistics because it overlaps with the allocated and active statistics, whereas the other metadata statistics do not. Base allocations are not reported separately, though their magnitude can be computed by subtracting the arena-specific metadata. This resolves #163.
This commit is contained in:
parent
ec98a44662
commit
4581b97809
18 changed files with 393 additions and 204 deletions
|
|
@ -1773,6 +1773,21 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
|||
entirely devoted to allocator metadata.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="stats.metadata">
|
||||
<term>
|
||||
<mallctl>stats.metadata</mallctl>
|
||||
(<type>size_t</type>)
|
||||
<literal>r-</literal>
|
||||
[<option>--enable-stats</option>]
|
||||
</term>
|
||||
<listitem><para>Total number of bytes dedicated to metadata, which
|
||||
comprise base allocations used for bootstrap-sensitive internal
|
||||
allocator data structures, arena chunk headers (see <link
|
||||
linkend="stats.arenas.i.metadata.mapped"><mallctl>stats.arenas.<i>.metadata.mapped</mallctl></link>),
|
||||
and internal allocations (see <link
|
||||
linkend="stats.arenas.i.metadata.allocated"><mallctl>stats.arenas.<i>.metadata.allocated</mallctl></link>).</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="stats.mapped">
|
||||
<term>
|
||||
<mallctl>stats.mapped</mallctl>
|
||||
|
|
@ -1875,6 +1890,38 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
|||
<listitem><para>Number of mapped bytes.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="stats.arenas.i.metadata.mapped">
|
||||
<term>
|
||||
<mallctl>stats.arenas.<i>.metadata.mapped</mallctl>
|
||||
(<type>size_t</type>)
|
||||
<literal>r-</literal>
|
||||
[<option>--enable-stats</option>]
|
||||
</term>
|
||||
<listitem><para>Number of mapped bytes in arena chunk headers, which
|
||||
track the states of the non-metadata pages.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="stats.arenas.i.metadata.allocated">
|
||||
<term>
|
||||
<mallctl>stats.arenas.<i>.metadata.allocated</mallctl>
|
||||
(<type>size_t</type>)
|
||||
<literal>r-</literal>
|
||||
[<option>--enable-stats</option>]
|
||||
</term>
|
||||
<listitem><para>Number of bytes dedicated to internal allocations.
|
||||
Internal allocations differ from application-originated allocations in
|
||||
that they are for internal use, and that they are omitted from heap
|
||||
profiles. This statistic is reported separately from <link
|
||||
linkend="stats.metadata"><mallctl>stats.metadata</mallctl></link> and
|
||||
<link
|
||||
linkend="stats.arenas.i.metadata.mapped"><mallctl>stats.arenas.<i>.metadata.mapped</mallctl></link>
|
||||
because it overlaps with e.g. the <link
|
||||
linkend="stats.allocated"><mallctl>stats.allocated</mallctl></link> and
|
||||
<link linkend="stats.active"><mallctl>stats.active</mallctl></link>
|
||||
statistics, whereas the other metadata statistics do
|
||||
not.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="stats.arenas.i.npurge">
|
||||
<term>
|
||||
<mallctl>stats.arenas.<i>.npurge</mallctl>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue