summaryrefslogtreecommitdiffstats
path: root/lib/libmemstat/libmemstat.3
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-08-06 13:54:03 +0000
committerrwatson <rwatson@FreeBSD.org>2005-08-06 13:54:03 +0000
commitd65e7588d3510a9ad0d93d4b0fa93b5e4c434dd5 (patch)
tree885f8f5cd1f7551ea42d39da8b233242b20cdc4c /lib/libmemstat/libmemstat.3
parentf2028e439d4f832b126345ea8bf8c110d43cd946 (diff)
downloadFreeBSD-src-d65e7588d3510a9ad0d93d4b0fa93b5e4c434dd5.zip
FreeBSD-src-d65e7588d3510a9ad0d93d4b0fa93b5e4c434dd5.tar.gz
Teach libmemstat(3) how to extract malloc(9) statistics using kvm(3),
so that libmemstat can be used to view full memory statistics from kernel core dumps and /dev/mem. This is provided via a new query function, memstat_kvm_malloc(), which is also automatically invoked by memstat_kvm_all(). A kvm handle must be passed in. This will allow malloc(9)-specific code to be removed from vmstat(8).
Diffstat (limited to 'lib/libmemstat/libmemstat.3')
-rw-r--r--lib/libmemstat/libmemstat.314
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/libmemstat/libmemstat.3 b/lib/libmemstat/libmemstat.3
index a851e5e..ebab812 100644
--- a/lib/libmemstat/libmemstat.3
+++ b/lib/libmemstat/libmemstat.3
@@ -53,6 +53,10 @@
.Fn memstat_mtl_geterror "struct memory_type_list *list"
.Ss Allocator Query Functions
.Ft int
+.Fn memstat_kvm_all "struct memory_type_list *list" "void *kvm_handle"
+.Ft int
+.Fn memstat_kvm_malloc "struct memory_type_list *list" "void *kvm_handle"
+.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"
@@ -147,6 +151,8 @@ 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_all ,
+.Fn memstat_kvm_malloc ,
.Fn memstat_kvm_uma ,
.Fn memstat_sysctl_all ,
.Fn memstat_sysctl_uma ,
@@ -445,11 +451,9 @@ The kernel memory allocator changes necessary to support a general purpose
monitoring library, along with the library, were written by
.An Robert Watson Aq rwatson@FreeBSD.org
.Sh BUGS
-.Nm
-cannot yet extract
-.Xr malloc 9
-statistics from kernel core dumps, although this should be straight forward
-to implement.
+There are memory allocators in the kernel, such as the VM page allocator
+and sf_buf allocator, which are not currently supported by
+.Nm.
.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
OpenPOWER on IntegriCloud