mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
MINOR: threads/debug: only report used lock stats
The lock stats are very verbose and more than half of them are used in a typical test, making it hard to spot the sought values. Let's simply report "not used" for those which have not been called at all.
This commit is contained in:
parent
9a3d3fcb5d
commit
23d3b00bdd
@ -454,6 +454,15 @@ static inline void show_lock_stats()
|
||||
int lbl;
|
||||
|
||||
for (lbl = 0; lbl < LOCK_LABELS; lbl++) {
|
||||
if (!lock_stats[lbl].num_write_locked &&
|
||||
!lock_stats[lbl].num_seek_locked &&
|
||||
!lock_stats[lbl].num_read_locked) {
|
||||
fprintf(stderr,
|
||||
"Stats about Lock %s: not used\n",
|
||||
lock_label(lbl));
|
||||
continue;
|
||||
}
|
||||
|
||||
fprintf(stderr,
|
||||
"Stats about Lock %s: \n"
|
||||
"\t # write lock : %lu\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user