diff options
author | Qi Wang <interwq@gwu.edu> | 2017-05-16 20:56:00 (GMT) |
---|---|---|
committer | Qi Wang <interwq@gmail.com> | 2017-05-18 17:04:28 (GMT) |
commit | baf3e294e05ab62b0f80b825a76687c8a1ea001e (patch) | |
tree | 14ecc60c5d03180436aa975d5ec935b6cfb79b78 /include | |
parent | 04fec5e0844bd0cc10dcd290e82f5f6aa486e494 (diff) | |
download | jemalloc-baf3e294e05ab62b0f80b825a76687c8a1ea001e.zip jemalloc-baf3e294e05ab62b0f80b825a76687c8a1ea001e.tar.gz jemalloc-baf3e294e05ab62b0f80b825a76687c8a1ea001e.tar.bz2 |
Add stats: arena uptime.
Diffstat (limited to 'include')
-rw-r--r-- | include/jemalloc/internal/arena_structs_b.h | 2 | ||||
-rw-r--r-- | include/jemalloc/internal/stats.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/jemalloc/internal/arena_structs_b.h b/include/jemalloc/internal/arena_structs_b.h index d98b455..99e5f6a 100644 --- a/include/jemalloc/internal/arena_structs_b.h +++ b/include/jemalloc/internal/arena_structs_b.h @@ -261,6 +261,8 @@ struct arena_s { * Synchronization: internal. */ base_t *base; + /* Used to determine uptime. Read-only after initialization. */ + nstime_t create_time; }; /* Used in conjunction with tsd for fast arena-related context lookup. */ diff --git a/include/jemalloc/internal/stats.h b/include/jemalloc/internal/stats.h index 385a851..3f5c20c 100644 --- a/include/jemalloc/internal/stats.h +++ b/include/jemalloc/internal/stats.h @@ -145,6 +145,9 @@ typedef struct arena_stats_s { /* One element for each large size class. */ malloc_large_stats_t lstats[NSIZES - NBINS]; + + /* Arena uptime. */ + nstime_t uptime; } arena_stats_t; #endif /* JEMALLOC_INTERNAL_STATS_H */ |