Data Fields | |
unsigned int | magic |
Unlocked. | |
isc_mem_t * | mctx |
int | ncounters |
isc_mutex_t | lock |
unsigned int | references |
isc_stat_t * | counters |
Locked by counterlock or unlocked if efficient rwlock is not available. | |
isc_uint64_t * | copiedcounters |
We don't want to lock the counters while we are dumping, so we first copy the current counter values into a local array. This buffer will be used as the copy destination. It's allocated on creation of the stats structure so that the dump operation won't fail due to memory allocation failure. XXX: this approach is weird for non-threaded build because the additional memory and the copy overhead could be avoided. We prefer simplicity here, however, under the assumption that this function should be only rarely called. |
Definition at line 55 of file stats.c.
unsigned int isc_stats::magic |
Definition at line 59 of file stats.c.
Referenced by copy_counters(), create_stats(), isc_stats_detach(), isc_stats_dump(), and isc_stats_ncounters().
Definition at line 61 of file stats.c.
Referenced by create_stats(), isc_stats_attach(), and isc_stats_detach().
unsigned int isc_stats::references |
Definition at line 62 of file stats.c.
Referenced by create_stats(), isc_stats_attach(), and isc_stats_detach().
Locked by counterlock or unlocked if efficient rwlock is not available.
Definition at line 71 of file stats.c.
Referenced by copy_counters(), create_stats(), decrementcounter(), incrementcounter(), isc_stats_detach(), and isc_stats_set().
We don't want to lock the counters while we are dumping, so we first copy the current counter values into a local array. This buffer will be used as the copy destination. It's allocated on creation of the stats structure so that the dump operation won't fail due to memory allocation failure. XXX: this approach is weird for non-threaded build because the additional memory and the copy overhead could be avoided. We prefer simplicity here, however, under the assumption that this function should be only rarely called.
Definition at line 84 of file stats.c.
Referenced by copy_counters(), create_stats(), isc_stats_detach(), and isc_stats_dump().