Add logging for sampled allocations

- prof_opt_log flag starts logging automatically at runtime
- prof_log_{start,stop} mallctl for manual control
This commit is contained in:
Tyler Etzel
2018-07-05 10:56:33 -07:00
committed by David Goldblatt
parent eb261e53a6
commit b664bd7935
11 changed files with 702 additions and 24 deletions

View File

@@ -161,11 +161,13 @@ struct extent_s {
/* Small region slab metadata. */
arena_slab_data_t e_slab_data;
/*
* Profile counters, used for large objects. Points to a
* prof_tctx_t.
*/
atomic_p_t e_prof_tctx;
/* Profiling data, used for large objects. */
struct {
/* Time when this was allocated. */
nstime_t e_alloc_time;
/* Points to a prof_tctx_t. */
atomic_p_t e_prof_tctx;
};
};
};
typedef ql_head(extent_t) extent_list_t;