svn commit: r343053 - head/lib/libmemstat
Gleb Smirnoff
glebius at FreeBSD.org
Tue Jan 15 18:47:20 UTC 2019
Author: glebius
Date: Tue Jan 15 18:47:19 2019
New Revision: 343053
URL: https://svnweb.freebsd.org/changeset/base/343053
Log:
This was missed in r343051: make uz_allocs, uz_frees and uz_fails counter(9).
Modified:
head/lib/libmemstat/memstat_uma.c
Modified: head/lib/libmemstat/memstat_uma.c
==============================================================================
--- head/lib/libmemstat/memstat_uma.c Tue Jan 15 18:32:26 2019 (r343052)
+++ head/lib/libmemstat/memstat_uma.c Tue Jan 15 18:47:19 2019 (r343053)
@@ -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 *k
* 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;
More information about the svn-src-all
mailing list