summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-08-06 21:52:38 +0000
committerrwatson <rwatson@FreeBSD.org>2004-08-06 21:52:38 +0000
commitb9c212d7f853cb4540f3393cdfb2c8b54930ecf4 (patch)
tree396235e37b3f10533b897ef343a4b71047bd2dd9 /sys/vm
parent36a8fef8a8b749d8e9cc28e3718c9964045fcb12 (diff)
downloadFreeBSD-src-b9c212d7f853cb4540f3393cdfb2c8b54930ecf4.zip
FreeBSD-src-b9c212d7f853cb4540f3393cdfb2c8b54930ecf4.tar.gz
Generate KTR trace records for uma_zalloc_arg() and uma_zfree_arg().
This doesn't trace every event of interest in UMA, but provides enough basic information to explain lock traces and sleep patterns.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/uma_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index cdb9b05..31c7fe8 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/malloc.h>
+#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/sysctl.h>
#include <sys/mutex.h>
@@ -1766,6 +1767,8 @@ uma_zalloc_arg(uma_zone_t zone, void *udata, int flags)
#ifdef UMA_DEBUG_ALLOC_1
printf("Allocating one item from %s(%p)\n", zone->uz_name, zone);
#endif
+ CTR3(KTR_UMA, "uma_zalloc_arg thread %x zone %s flags %d", curthread,
+ zone->uz_name, flags);
if (!(flags & M_NOWAIT)) {
KASSERT(curthread->td_intr_nesting_level == 0,
@@ -2182,6 +2185,9 @@ uma_zfree_arg(uma_zone_t zone, void *item, void *udata)
#ifdef UMA_DEBUG_ALLOC_1
printf("Freeing item %p to %s(%p)\n", item, zone->uz_name, zone);
#endif
+ CTR2(KTR_UMA, "uma_zfree_arg thread %x zone %s", curthread,
+ zone->uz_name);
+
/*
* The race here is acceptable. If we miss it we'll just have to wait
* a little longer for the limits to be reset.
OpenPOWER on IntegriCloud