Add stats: arena uptime.

This commit is contained in:
Qi Wang
2017-05-16 13:56:00 -07:00
committed by Qi Wang
parent 04fec5e084
commit baf3e294e0
6 changed files with 42 additions and 0 deletions

View File

@@ -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. */

View File

@@ -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 */