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