Lines Matching defs:stats
76 static isc_mutexstats_t stats[ISC_MUTEX_PROFTABLESIZE];
106 mp->stats = &stats[stats_next++];
110 mp->stats->file = file;
111 mp->stats->line = line;
112 mp->stats->count = 0;
113 timevalclear(&mp->stats->locked_total);
114 timevalclear(&mp->stats->wait_total);
116 mp->stats->lockers[i].file = NULL;
117 mp->stats->lockers[i].line = 0;
118 mp->stats->lockers[i].count = 0;
119 timevalclear(&mp->stats->lockers[i].locked_total);
120 timevalclear(&mp->stats->lockers[i].wait_total);
139 mp->stats->lock_t = postlock_t;
143 mp->stats->count++;
144 timevaladd(&mp->stats->wait_total, &postlock_t);
147 if (mp->stats->lockers[i].file == NULL) {
148 locker = &mp->stats->lockers[i];
152 } else if (mp->stats->lockers[i].file == file &&
153 mp->stats->lockers[i].line == line) {
154 locker = &mp->stats->lockers[i];
164 mp->stats->cur_locker = locker;
176 if (mp->stats->cur_locker != NULL) {
178 timevalsub(&unlock_t, &mp->stats->lock_t);
179 timevaladd(&mp->stats->locked_total, &unlock_t);
180 timevaladd(&mp->stats->cur_locker->locked_total, &unlock_t);
181 mp->stats->cur_locker = NULL;
194 fprintf(fp, "Mutex stats (in us)\n");
197 stats[i].file, stats[i].line, stats[i].count,
198 stats[i].locked_total.tv_sec,
199 stats[i].locked_total.tv_usec,
200 stats[i].wait_total.tv_sec,
201 stats[i].wait_total.tv_usec,
204 locker = &stats[i].lockers[j];