mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-03 05:59:31 +03:00
add arena_purges stat
This commit is contained in:
parent
c910750bbe
commit
4f1edad4fe
5 changed files with 10 additions and 4 deletions
|
@ -427,6 +427,7 @@
|
||||||
<ClInclude Include="..\..\include\mimalloc-etw.h" />
|
<ClInclude Include="..\..\include\mimalloc-etw.h" />
|
||||||
<ClInclude Include="..\..\include\mimalloc-new-delete.h" />
|
<ClInclude Include="..\..\include\mimalloc-new-delete.h" />
|
||||||
<ClInclude Include="..\..\include\mimalloc-override.h" />
|
<ClInclude Include="..\..\include\mimalloc-override.h" />
|
||||||
|
<ClInclude Include="..\..\include\mimalloc-stats.h" />
|
||||||
<ClInclude Include="..\..\include\mimalloc\atomic.h" />
|
<ClInclude Include="..\..\include\mimalloc\atomic.h" />
|
||||||
<ClInclude Include="..\..\include\mimalloc\internal.h" />
|
<ClInclude Include="..\..\include\mimalloc\internal.h" />
|
||||||
<ClInclude Include="..\..\include\mimalloc\prim.h" />
|
<ClInclude Include="..\..\include\mimalloc\prim.h" />
|
||||||
|
|
|
@ -96,6 +96,9 @@
|
||||||
<ClInclude Include="..\..\include\mimalloc\prim.h">
|
<ClInclude Include="..\..\include\mimalloc\prim.h">
|
||||||
<Filter>Headers</Filter>
|
<Filter>Headers</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\include\mimalloc-stats.h">
|
||||||
|
<Filter>Headers</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Headers">
|
<Filter Include="Headers">
|
||||||
|
|
|
@ -49,6 +49,7 @@ typedef struct mi_stat_counter_s {
|
||||||
\
|
\
|
||||||
/* internal statistics */ \
|
/* internal statistics */ \
|
||||||
MI_STAT_COUNTER(arena_rollback_count) \
|
MI_STAT_COUNTER(arena_rollback_count) \
|
||||||
|
MI_STAT_COUNTER(arena_purges) \
|
||||||
MI_STAT_COUNTER(pages_extended) /* number of page extensions */ \
|
MI_STAT_COUNTER(pages_extended) /* number of page extensions */ \
|
||||||
MI_STAT_COUNTER(pages_retire) /* number of pages that are retired */ \
|
MI_STAT_COUNTER(pages_retire) /* number of pages that are retired */ \
|
||||||
MI_STAT_COUNTER(page_searches) /* searches for a fresh page */ \
|
MI_STAT_COUNTER(page_searches) /* searches for a fresh page */ \
|
||||||
|
|
|
@ -550,7 +550,8 @@ static bool mi_arena_try_purge(mi_arena_t* arena, mi_msecs_t now, bool force)
|
||||||
|
|
||||||
// reset expire (if not already set concurrently)
|
// reset expire (if not already set concurrently)
|
||||||
mi_atomic_casi64_strong_acq_rel(&arena->purge_expire, &expire, (mi_msecs_t)0);
|
mi_atomic_casi64_strong_acq_rel(&arena->purge_expire, &expire, (mi_msecs_t)0);
|
||||||
|
_mi_stat_counter_increase(&_mi_stats_main.arena_purges, 1);
|
||||||
|
|
||||||
// potential purges scheduled, walk through the bitmap
|
// potential purges scheduled, walk through the bitmap
|
||||||
bool any_purged = false;
|
bool any_purged = false;
|
||||||
bool full_purge = true;
|
bool full_purge = true;
|
||||||
|
|
|
@ -76,9 +76,9 @@ const mi_page_t _mi_page_empty = {
|
||||||
{ 0 }, { 0 }, { 0 }, { 0 }, \
|
{ 0 }, { 0 }, { 0 }, { 0 }, \
|
||||||
{ 0 }, { 0 }, { 0 }, { 0 }, \
|
{ 0 }, { 0 }, { 0 }, { 0 }, \
|
||||||
\
|
\
|
||||||
{ 0 }, { 0 }, { 0 }, { 0 }, \
|
{ 0 }, { 0 }, { 0 }, { 0 }, { 0 }, \
|
||||||
MI_STAT_COUNT_NULL(), MI_STAT_COUNT_NULL(), MI_STAT_COUNT_NULL(), MI_STAT_COUNT_NULL(), \
|
MI_INIT4(MI_STAT_COUNT_NULL), \
|
||||||
{ 0 }, { 0 }, { 0 }, { 0 }, \
|
{ 0 }, { 0 }, { 0 }, { 0 }, \
|
||||||
\
|
\
|
||||||
{ MI_INIT4(MI_STAT_COUNT_NULL) }, \
|
{ MI_INIT4(MI_STAT_COUNT_NULL) }, \
|
||||||
{ { 0 }, { 0 }, { 0 }, { 0 } }, \
|
{ { 0 }, { 0 }, { 0 }, { 0 } }, \
|
||||||
|
|
Loading…
Add table
Reference in a new issue