From 604c2bbc34ecab3af2cdf74a7caa5fc821fa8ad1 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 22 Jul 2006 22:31:57 +0000 Subject: [PATCH] Export the number of object bypasses and collapses through sysctl. --- sys/vm/vm_object.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 5572f2d8e1b..4f6696e67e5 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -144,8 +144,16 @@ struct mtx vm_object_list_mtx; /* lock for object list and count */ struct vm_object kernel_object_store; struct vm_object kmem_object_store; +SYSCTL_DECL(_vm_stats); +SYSCTL_NODE(_vm_stats, OID_AUTO, object, CTLFLAG_RD, 0, "VM object stats"); + static long object_collapses; +SYSCTL_LONG(_vm_stats_object, OID_AUTO, collapses, CTLFLAG_RD, + &object_collapses, 0, "VM object collapses"); + static long object_bypasses; +SYSCTL_LONG(_vm_stats_object, OID_AUTO, bypasses, CTLFLAG_RD, + &object_bypasses, 0, "VM object bypasses"); /* * next_index determines the page color that is assigned to the next