diff options
author | rwatson <rwatson@FreeBSD.org> | 2005-08-01 19:07:39 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2005-08-01 19:07:39 +0000 |
commit | f5e7c145fc0e6d604adea539ccb9fbec7802f9a2 (patch) | |
tree | 114f0eee6842ca4f71539f0be9d6d57137832be8 /lib/libmemstat/libmemstat.3 | |
parent | ef7c6d9a808a36b9b16699fca1db857a58d8b449 (diff) | |
download | FreeBSD-src-f5e7c145fc0e6d604adea539ccb9fbec7802f9a2.zip FreeBSD-src-f5e7c145fc0e6d604adea539ccb9fbec7802f9a2.tar.gz |
Add memstat_kvm_uma(), an implementation of a libmemstat(3) query routine
that knows how to extract UMA(9) allocator statistics from a core dump or
live memory image using kvm(3). The caller is expected to provide the
necessary kvm_t handle, which is then used by libmemstat(3).
With these changes, it is trivially straight forward to re-introduce
vmstat -z support on core dumps, which was lost when UMA was introduced.
In the short term, this requires including vm/ include files that are not
intended for extra-kernel use, requiring in turn some ugliness.
Diffstat (limited to 'lib/libmemstat/libmemstat.3')
-rw-r--r-- | lib/libmemstat/libmemstat.3 | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libmemstat/libmemstat.3 b/lib/libmemstat/libmemstat.3 index 0bc3410..a851e5e 100644 --- a/lib/libmemstat/libmemstat.3 +++ b/lib/libmemstat/libmemstat.3 @@ -53,6 +53,8 @@ .Fn memstat_mtl_geterror "struct memory_type_list *list" .Ss Allocator Query Functions .Ft int +.Fn memstat_kvm_uma "struct memory_type_list *list" "void *kvm_handle" +.Ft int .Fn memstat_sysctl_all "struct memory_type_list *list" "int flags" .Ft int .Fn memstat_sysctl_malloc "struct memory_type_list *list" "int flags" @@ -145,6 +147,7 @@ and freed on completion using .Fn memstat_mtl_free . Lists of memory types are populated via calls that query the kernel for statistics information; currently: +.Fn memstat_kvm_uma , .Fn memstat_sysctl_all , .Fn memstat_sysctl_uma , and @@ -443,8 +446,10 @@ monitoring library, along with the library, were written by .An Robert Watson Aq rwatson@FreeBSD.org .Sh BUGS .Nm -cannot yet extract statistics from kernel core dumps, although this should be -straight forward to implement. +cannot yet extract +.Xr malloc 9 +statistics from kernel core dumps, although this should be straight forward +to implement. .Pp Once a memory type is present on a memory type list, it will not be removed even if the kernel no longer presents information on the type via its |