diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2019-01-15 18:47:19 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2019-01-15 18:47:19 +0000 |
commit | cf64f5197b6de49e567407171c4a9477c4558320 (patch) | |
tree | fdeb44127f66f53ef198c15e9e148d866d1046ba /lib/libmemstat | |
parent | bb45b411e24d32770b5daa5cf0972b967dc7cd1b (diff) |
This was missed in r343051: make uz_allocs, uz_frees and uz_fails counter(9).
Notes
Notes:
svn path=/head/; revision=343053
Diffstat (limited to 'lib/libmemstat')
-rw-r--r-- | lib/libmemstat/memstat_uma.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/libmemstat/memstat_uma.c b/lib/libmemstat/memstat_uma.c index 3a6ac2727546..87a6b573307b 100644 --- a/lib/libmemstat/memstat_uma.c +++ b/lib/libmemstat/memstat_uma.c @@ -29,6 +29,7 @@ */ #include <sys/param.h> +#include <sys/counter.h> #include <sys/cpuset.h> #include <sys/sysctl.h> @@ -406,9 +407,12 @@ memstat_kvm_uma(struct memory_type_list *list, void *kvm_handle) * Reset the statistics on a current node. */ _memstat_mt_reset_stats(mtp, mp_maxid + 1); - mtp->mt_numallocs = uz.uz_allocs; - mtp->mt_numfrees = uz.uz_frees; - mtp->mt_failures = uz.uz_fails; + mtp->mt_numallocs = kvm_counter_u64_fetch(kvm, + (unsigned long )uz.uz_allocs); + mtp->mt_numfrees = kvm_counter_u64_fetch(kvm, + (unsigned long )uz.uz_frees); + mtp->mt_failures = kvm_counter_u64_fetch(kvm, + (unsigned long )uz.uz_fails); mtp->mt_sleeps = uz.uz_sleeps; if (kz.uk_flags & UMA_ZFLAG_INTERNAL) goto skip_percpu; |