diff options
author | Jason Evans <jasone@canonware.com> | 2014-08-18 23:22:13 (GMT) |
---|---|---|
committer | Jason Evans <jasone@canonware.com> | 2014-08-20 04:31:16 (GMT) |
commit | 602c8e0971160e4b85b08b16cf8a2375aa24bc04 (patch) | |
tree | 86ba47333cd7a09e2038501044d8f88762cd5159 /doc | |
parent | 1628e8615ed6c82ded14d6013ac775274eb426e6 (diff) | |
download | jemalloc-602c8e0971160e4b85b08b16cf8a2375aa24bc04.zip jemalloc-602c8e0971160e4b85b08b16cf8a2375aa24bc04.tar.gz jemalloc-602c8e0971160e4b85b08b16cf8a2375aa24bc04.tar.bz2 |
Implement per thread heap profiling.
Rename data structures (prof_thr_cnt_t-->prof_tctx_t,
prof_ctx_t-->prof_gctx_t), and convert to storing a prof_tctx_t for
sampled objects.
Convert PROF_ALLOC_PREP() to prof_alloc_prep(), since precise backtrace
depth within jemalloc functions is no longer an issue (pprof prunes
irrelevant frames).
Implement mallctl's:
- prof.reset implements full sample data reset, and optional change of
sample interval.
- prof.lg_sample reads the current sample interval (opt.lg_prof_sample
was the permanent source of truth prior to prof.reset).
- thread.prof.name provides naming capability for threads within heap
profile dumps.
- thread.prof.active makes it possible to activate/deactivate heap
profiling for individual threads.
Modify the heap dump files to contain per thread heap profile data.
This change is incompatible with the existing pprof, which will require
enhancements to read and process the enriched data.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/jemalloc.xml.in | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in index 308d0c6..8f4327f 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in @@ -1047,7 +1047,7 @@ malloc_conf = "xmalloc:true";]]></programlisting> <varlistentry id="opt.lg_prof_sample"> <term> <mallctl>opt.lg_prof_sample</mallctl> - (<type>ssize_t</type>) + (<type>size_t</type>) <literal>r-</literal> [<option>--enable-prof</option>] </term> @@ -1243,6 +1243,35 @@ malloc_conf = "xmalloc:true";]]></programlisting> the developer may find manual flushing useful.</para></listitem> </varlistentry> + <varlistentry id="thread.prof.name"> + <term> + <mallctl>thread.prof.name</mallctl> + (<type>const char *</type>) + <literal>rw</literal> + [<option>--enable-prof</option>] + </term> + <listitem><para>Get/set the descriptive name associated with the calling + thread in memory profile dumps. An internal copy of the name string is + created, so the input string need not be maintained after this interface + completes execution. The output string of this interface should be + copied for non-ephemeral uses, because multiple implementation details + can cause asynchronous string deallocation.</para></listitem> + </varlistentry> + + <varlistentry id="thread.prof.active"> + <term> + <mallctl>thread.prof.active</mallctl> + (<type>bool</type>) + <literal>rw</literal> + [<option>--enable-prof</option>] + </term> + <listitem><para>Control whether sampling is currently active for the + calling thread. This is a deactivation mechanism in addition to <link + linkend="prof.active"><mallctl>prof.active</mallctl></link>; both must + be active for the calling thread to sample. This flag is enabled by + default.</para></listitem> + </varlistentry> + <varlistentry id="arena.i.purge"> <term> <mallctl>arena.<i>.purge</mallctl> @@ -1492,6 +1521,31 @@ malloc_conf = "xmalloc:true";]]></programlisting> option.</para></listitem> </varlistentry> + <varlistentry id="prof.reset"> + <term> + <mallctl>prof.reset</mallctl> + (<type>size_t</type>) + <literal>-w</literal> + [<option>--enable-prof</option>] + </term> + <listitem><para>Reset all memory profile statistics, and optionally + update the sample rate (see <link + linkend="opt.lg_prof_sample"><mallctl>opt.lg_prof_sample</mallctl></link>). + </para></listitem> + </varlistentry> + + <varlistentry id="prof.lg_sample"> + <term> + <mallctl>prof.lg_sample</mallctl> + (<type>size_t</type>) + <literal>r-</literal> + [<option>--enable-prof</option>] + </term> + <listitem><para>Get the sample rate (see <link + linkend="opt.lg_prof_sample"><mallctl>opt.lg_prof_sample</mallctl></link>). + </para></listitem> + </varlistentry> + <varlistentry id="prof.interval"> <term> <mallctl>prof.interval</mallctl> |