mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-06 13:57:17 +03:00
Add stats: arena uptime.
This commit is contained in:
parent
04fec5e084
commit
baf3e294e0
6 changed files with 42 additions and 0 deletions
|
|
@ -330,6 +330,10 @@ arena_stats_merge(tsdn_t *tsdn, arena_t *arena, unsigned *nthreads,
|
|||
arena_prof_mutex_base)
|
||||
#undef READ_ARENA_MUTEX_PROF_DATA
|
||||
|
||||
nstime_copy(&astats->uptime, &arena->create_time);
|
||||
nstime_update(&astats->uptime);
|
||||
nstime_subtract(&astats->uptime, &arena->create_time);
|
||||
|
||||
for (szind_t i = 0; i < NBINS; i++) {
|
||||
arena_bin_t *bin = &arena->bins[i];
|
||||
|
||||
|
|
@ -1965,6 +1969,9 @@ arena_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t *extent_hooks) {
|
|||
|
||||
arena->base = base;
|
||||
|
||||
nstime_init(&arena->create_time, 0);
|
||||
nstime_update(&arena->create_time);
|
||||
|
||||
/* We don't support reetrancy for arena 0 bootstrapping. */
|
||||
if (ind != 0 && hooks_arena_new_hook) {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue