aboutsummaryrefslogtreecommitdiff
path: root/lib/libmemstat/libmemstat.3
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2005-08-01 19:07:39 +0000
committerRobert Watson <rwatson@FreeBSD.org>2005-08-01 19:07:39 +0000
commit33c20d188c95e286882b488f032c4d08bd52aca0 (patch)
tree114f0eee6842ca4f71539f0be9d6d57137832be8 /lib/libmemstat/libmemstat.3
parent786d03d56aeb816e5477f7f914643bd0e25303a0 (diff)
downloadsrc-33c20d188c95e286882b488f032c4d08bd52aca0.tar.gz
src-33c20d188c95e286882b488f032c4d08bd52aca0.zip
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.
Notes
Notes: svn path=/head/; revision=148627
Diffstat (limited to 'lib/libmemstat/libmemstat.3')
-rw-r--r--lib/libmemstat/libmemstat.39
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libmemstat/libmemstat.3 b/lib/libmemstat/libmemstat.3
index 0bc341035c32..a851e5e40cf2 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