Add the "thread.[de]allocatedp" mallctl's.
This commit is contained in:
parent
cfdc8cfbd6
commit
ecf229a39f
@ -1172,7 +1172,7 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
||||
calling this interface.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<varlistentry id="thread.allocated">
|
||||
<term>
|
||||
<mallctl>thread.allocated</mallctl>
|
||||
(<type>uint64_t</type>)
|
||||
@ -1186,6 +1186,20 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<mallctl>thread.allocatedp</mallctl>
|
||||
(<type>uint64_t *</type>)
|
||||
<literal>r-</literal>
|
||||
[<option>--enable-stats</option>]
|
||||
</term>
|
||||
<listitem><para>Get a pointer to the the value that is returned by the
|
||||
<link
|
||||
linkend="thread.allocated"><mallctl>thread.allocated</mallctl></link>
|
||||
mallctl. This is useful for avoiding the overhead of repeated
|
||||
<function>mallctl*<parameter/></function> calls.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="thread.deallocated">
|
||||
<term>
|
||||
<mallctl>thread.deallocated</mallctl>
|
||||
(<type>uint64_t</type>)
|
||||
@ -1198,6 +1212,20 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
||||
cases.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>
|
||||
<mallctl>thread.deallocatedp</mallctl>
|
||||
(<type>uint64_t *</type>)
|
||||
<literal>r-</literal>
|
||||
[<option>--enable-stats</option>]
|
||||
</term>
|
||||
<listitem><para>Get a pointer to the the value that is returned by the
|
||||
<link
|
||||
linkend="thread.deallocated"><mallctl>thread.deallocated</mallctl></link>
|
||||
mallctl. This is useful for avoiding the overhead of repeated
|
||||
<function>mallctl*<parameter/></function> calls.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="arenas.narenas">
|
||||
<term>
|
||||
<mallctl>arenas.narenas</mallctl>
|
||||
|
@ -51,7 +51,9 @@ CTL_PROTO(tcache_flush)
|
||||
CTL_PROTO(thread_arena)
|
||||
#ifdef JEMALLOC_STATS
|
||||
CTL_PROTO(thread_allocated)
|
||||
CTL_PROTO(thread_allocatedp)
|
||||
CTL_PROTO(thread_deallocated)
|
||||
CTL_PROTO(thread_deallocatedp)
|
||||
#endif
|
||||
CTL_PROTO(config_debug)
|
||||
CTL_PROTO(config_dss)
|
||||
@ -230,7 +232,9 @@ static const ctl_node_t thread_node[] = {
|
||||
#ifdef JEMALLOC_STATS
|
||||
,
|
||||
{NAME("allocated"), CTL(thread_allocated)},
|
||||
{NAME("deallocated"), CTL(thread_deallocated)}
|
||||
{NAME("allocatedp"), CTL(thread_allocatedp)},
|
||||
{NAME("deallocated"), CTL(thread_deallocated)},
|
||||
{NAME("deallocatedp"), CTL(thread_deallocatedp)}
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -1142,7 +1146,9 @@ RETURN:
|
||||
|
||||
#ifdef JEMALLOC_STATS
|
||||
CTL_RO_NL_GEN(thread_allocated, ALLOCATED_GET(), uint64_t);
|
||||
CTL_RO_NL_GEN(thread_allocatedp, &ALLOCATED_GET(), uint64_t *);
|
||||
CTL_RO_NL_GEN(thread_deallocated, DEALLOCATED_GET(), uint64_t);
|
||||
CTL_RO_NL_GEN(thread_deallocatedp, &DEALLOCATED_GET(), uint64_t *);
|
||||
#endif
|
||||
|
||||
/******************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user