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>
|
calling this interface.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry id="thread.allocated">
|
||||||
<term>
|
<term>
|
||||||
<mallctl>thread.allocated</mallctl>
|
<mallctl>thread.allocated</mallctl>
|
||||||
(<type>uint64_t</type>)
|
(<type>uint64_t</type>)
|
||||||
@ -1186,6 +1186,20 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<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>
|
<term>
|
||||||
<mallctl>thread.deallocated</mallctl>
|
<mallctl>thread.deallocated</mallctl>
|
||||||
(<type>uint64_t</type>)
|
(<type>uint64_t</type>)
|
||||||
@ -1198,6 +1212,20 @@ malloc_conf = "xmalloc:true";]]></programlisting>
|
|||||||
cases.</para></listitem>
|
cases.</para></listitem>
|
||||||
</varlistentry>
|
</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">
|
<varlistentry id="arenas.narenas">
|
||||||
<term>
|
<term>
|
||||||
<mallctl>arenas.narenas</mallctl>
|
<mallctl>arenas.narenas</mallctl>
|
||||||
|
@ -51,7 +51,9 @@ CTL_PROTO(tcache_flush)
|
|||||||
CTL_PROTO(thread_arena)
|
CTL_PROTO(thread_arena)
|
||||||
#ifdef JEMALLOC_STATS
|
#ifdef JEMALLOC_STATS
|
||||||
CTL_PROTO(thread_allocated)
|
CTL_PROTO(thread_allocated)
|
||||||
|
CTL_PROTO(thread_allocatedp)
|
||||||
CTL_PROTO(thread_deallocated)
|
CTL_PROTO(thread_deallocated)
|
||||||
|
CTL_PROTO(thread_deallocatedp)
|
||||||
#endif
|
#endif
|
||||||
CTL_PROTO(config_debug)
|
CTL_PROTO(config_debug)
|
||||||
CTL_PROTO(config_dss)
|
CTL_PROTO(config_dss)
|
||||||
@ -230,7 +232,9 @@ static const ctl_node_t thread_node[] = {
|
|||||||
#ifdef JEMALLOC_STATS
|
#ifdef JEMALLOC_STATS
|
||||||
,
|
,
|
||||||
{NAME("allocated"), CTL(thread_allocated)},
|
{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
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1142,7 +1146,9 @@ RETURN:
|
|||||||
|
|
||||||
#ifdef JEMALLOC_STATS
|
#ifdef JEMALLOC_STATS
|
||||||
CTL_RO_NL_GEN(thread_allocated, ALLOCATED_GET(), uint64_t);
|
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_deallocated, DEALLOCATED_GET(), uint64_t);
|
||||||
|
CTL_RO_NL_GEN(thread_deallocatedp, &DEALLOCATED_GET(), uint64_t *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
Loading…
Reference in New Issue
Block a user