Collect thread local stats

This commit is contained in:
liunyl 2024-01-31 02:34:52 +00:00
parent 84f48a2715
commit e47379461e
5 changed files with 22 additions and 3 deletions

View file

@ -154,6 +154,8 @@ mi_decl_export void mi_stats_reset(void) mi_attr_noexcept;
mi_decl_export void mi_stats_merge(void) mi_attr_noexcept;
mi_decl_export void mi_stats_print(void* out) mi_attr_noexcept; // backward compatibility: `out` is ignored and should be NULL
mi_decl_export void mi_stats_print_out(mi_output_fun* out, void* arg) mi_attr_noexcept;
mi_decl_export void mi_thread_stats(int64_t *allocated, int64_t *committed,
int64_t *reserved) mi_attr_noexcept;
mi_decl_export void mi_process_init(void) mi_attr_noexcept;
mi_decl_export void mi_thread_init(void) mi_attr_noexcept;

View file

@ -46,7 +46,7 @@ terms of the MIT license. A copy of the license can be found in the file
// #define MI_TRACK_ETW 1
// Define MI_STAT as 1 to maintain statistics; set it to 2 to have detailed statistics (but costs some performance).
// #define MI_STAT 1
#define MI_STAT 1
// Define MI_SECURE to enable security mitigations
// #define MI_SECURE 1 // guard page around metadata