Mercurial > hg > nginx
comparison src/core/ngx_slab.h @ 6828:99770a5ea14f
Slab: slots statistics.
For each slot, the number of total and used entries, as well as
the number of allocation requests and failures, are tracked.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 07 Dec 2016 22:25:37 +0300 |
parents | 25ade23cf281 |
children | 6e757036e588 |
comparison
equal
deleted
inserted
replaced
6827:0e61510c56c4 | 6828:99770a5ea14f |
---|---|
21 uintptr_t prev; | 21 uintptr_t prev; |
22 }; | 22 }; |
23 | 23 |
24 | 24 |
25 typedef struct { | 25 typedef struct { |
26 ngx_uint_t total; | |
27 ngx_uint_t used; | |
28 | |
29 ngx_uint_t reqs; | |
30 ngx_uint_t fails; | |
31 } ngx_slab_stat_t; | |
32 | |
33 | |
34 typedef struct { | |
26 ngx_shmtx_sh_t lock; | 35 ngx_shmtx_sh_t lock; |
27 | 36 |
28 size_t min_size; | 37 size_t min_size; |
29 size_t min_shift; | 38 size_t min_shift; |
30 | 39 |
31 ngx_slab_page_t *pages; | 40 ngx_slab_page_t *pages; |
32 ngx_slab_page_t *last; | 41 ngx_slab_page_t *last; |
33 ngx_slab_page_t free; | 42 ngx_slab_page_t free; |
43 | |
44 ngx_slab_stat_t *stats; | |
34 | 45 |
35 u_char *start; | 46 u_char *start; |
36 u_char *end; | 47 u_char *end; |
37 | 48 |
38 ngx_shmtx_t mutex; | 49 ngx_shmtx_t mutex; |