Update to FreeBSD head 2016-08-23

Git mirror commit 9fe7c416e6abb28b1398fd3e5687099846800cfd.
This commit is contained in:
Sebastian Huber
2016-10-07 15:10:20 +02:00
parent 8c0eebac7d
commit c40e45b75e
1040 changed files with 156866 additions and 67039 deletions

View File

@@ -255,6 +255,13 @@ memstat_get_size(const struct memory_type *mtp)
return (mtp->mt_size);
}
uint64_t
memstat_get_rsize(const struct memory_type *mtp)
{
return (mtp->mt_rsize);
}
uint64_t
memstat_get_memalloced(const struct memory_type *mtp)
{

View File

@@ -124,6 +124,7 @@ uint64_t memstat_get_countlimit(const struct memory_type *mtp);
uint64_t memstat_get_byteslimit(const struct memory_type *mtp);
uint64_t memstat_get_sizemask(const struct memory_type *mtp);
uint64_t memstat_get_size(const struct memory_type *mtp);
uint64_t memstat_get_rsize(const struct memory_type *mtp);
uint64_t memstat_get_memalloced(const struct memory_type *mtp);
uint64_t memstat_get_memfreed(const struct memory_type *mtp);
uint64_t memstat_get_numallocs(const struct memory_type *mtp);

View File

@@ -51,6 +51,7 @@ struct memory_type {
uint64_t mt_byteslimit; /* 0, or maximum bytes. */
uint64_t mt_sizemask; /* malloc: allocated size bitmask. */
uint64_t mt_size; /* uma: size of objects. */
uint64_t mt_rsize; /* uma: real size of objects. */
/*
* Zone or type information that includes all caches and any central

View File

@@ -214,6 +214,7 @@ retry:
}
mtp->mt_size = uthp->uth_size;
mtp->mt_rsize = uthp->uth_rsize;
mtp->mt_memalloced = mtp->mt_numallocs * uthp->uth_size;
mtp->mt_memfreed = mtp->mt_numfrees * uthp->uth_size;
mtp->mt_bytes = mtp->mt_memalloced - mtp->mt_memfreed;
@@ -438,6 +439,7 @@ memstat_kvm_uma(struct memory_type_list *list, void *kvm_handle)
}
skip_percpu:
mtp->mt_size = kz.uk_size;
mtp->mt_rsize = kz.uk_rsize;
mtp->mt_memalloced = mtp->mt_numallocs * mtp->mt_size;
mtp->mt_memfreed = mtp->mt_numfrees * mtp->mt_size;
mtp->mt_bytes = mtp->mt_memalloced - mtp->mt_memfreed;
@@ -449,7 +451,7 @@ skip_percpu:
kz.uk_ipers;
mtp->mt_byteslimit = mtp->mt_countlimit * mtp->mt_size;
mtp->mt_count = mtp->mt_numallocs - mtp->mt_numfrees;
for (ubp = LIST_FIRST(&uz.uz_full_bucket); ubp !=
for (ubp = LIST_FIRST(&uz.uz_buckets); ubp !=
NULL; ubp = LIST_NEXT(&ub, ub_link)) {
ret = kread(kvm, ubp, &ub, sizeof(ub), 0);
mtp->mt_zonefree += ub.ub_cnt;