1*8e33eff8Schristos #ifndef JEMALLOC_INTERNAL_BIN_STATS_H 2*8e33eff8Schristos #define JEMALLOC_INTERNAL_BIN_STATS_H 3*8e33eff8Schristos 4*8e33eff8Schristos #include "jemalloc/internal/mutex_prof.h" 5*8e33eff8Schristos 6*8e33eff8Schristos typedef struct bin_stats_s bin_stats_t; 7*8e33eff8Schristos struct bin_stats_s { 8*8e33eff8Schristos /* 9*8e33eff8Schristos * Total number of allocation/deallocation requests served directly by 10*8e33eff8Schristos * the bin. Note that tcache may allocate an object, then recycle it 11*8e33eff8Schristos * many times, resulting many increments to nrequests, but only one 12*8e33eff8Schristos * each to nmalloc and ndalloc. 13*8e33eff8Schristos */ 14*8e33eff8Schristos uint64_t nmalloc; 15*8e33eff8Schristos uint64_t ndalloc; 16*8e33eff8Schristos 17*8e33eff8Schristos /* 18*8e33eff8Schristos * Number of allocation requests that correspond to the size of this 19*8e33eff8Schristos * bin. This includes requests served by tcache, though tcache only 20*8e33eff8Schristos * periodically merges into this counter. 21*8e33eff8Schristos */ 22*8e33eff8Schristos uint64_t nrequests; 23*8e33eff8Schristos 24*8e33eff8Schristos /* 25*8e33eff8Schristos * Current number of regions of this size class, including regions 26*8e33eff8Schristos * currently cached by tcache. 27*8e33eff8Schristos */ 28*8e33eff8Schristos size_t curregs; 29*8e33eff8Schristos 30*8e33eff8Schristos /* Number of tcache fills from this bin. */ 31*8e33eff8Schristos uint64_t nfills; 32*8e33eff8Schristos 33*8e33eff8Schristos /* Number of tcache flushes to this bin. */ 34*8e33eff8Schristos uint64_t nflushes; 35*8e33eff8Schristos 36*8e33eff8Schristos /* Total number of slabs created for this bin's size class. */ 37*8e33eff8Schristos uint64_t nslabs; 38*8e33eff8Schristos 39*8e33eff8Schristos /* 40*8e33eff8Schristos * Total number of slabs reused by extracting them from the slabs heap 41*8e33eff8Schristos * for this bin's size class. 42*8e33eff8Schristos */ 43*8e33eff8Schristos uint64_t reslabs; 44*8e33eff8Schristos 45*8e33eff8Schristos /* Current number of slabs in this bin. */ 46*8e33eff8Schristos size_t curslabs; 47*8e33eff8Schristos 48*8e33eff8Schristos mutex_prof_data_t mutex_data; 49*8e33eff8Schristos }; 50*8e33eff8Schristos 51*8e33eff8Schristos #endif /* JEMALLOC_INTERNAL_BIN_STATS_H */ 52