diff options
author | 2021-01-06 07:51:40 +0000 | |
---|---|---|
committer | 2021-01-06 07:51:40 +0000 | |
commit | da4391b39867bc671bb659d1466ab609c2682882 (patch) | |
tree | 01ba0d8d8eca0dd8687669f6d46ec9d2870940aa /sys/kern/subr_pool.c | |
parent | Insert joined pane before the target pane with -b, like for split. From (diff) | |
download | wireguard-openbsd-da4391b39867bc671bb659d1466ab609c2682882.tar.xz wireguard-openbsd-da4391b39867bc671bb659d1466ab609c2682882.zip |
Add dt(4) TRACEPOINTs for pool_get() and pool_put(), this is simmilar to the
ones added to malloc() and free(). Pass the struct pool pointer as argv1
since it is currently not possible to pass the pool name to btrace.
OK mpi@
Diffstat (limited to 'sys/kern/subr_pool.c')
-rw-r--r-- | sys/kern/subr_pool.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c index a233ff5bd8e..7c1a8fab913 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.231 2021/01/02 03:23:59 cheloha Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.232 2021/01/06 07:51:40 claudio Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -44,6 +44,7 @@ #include <sys/time.h> #include <sys/timeout.h> #include <sys/percpu.h> +#include <sys/tracepoint.h> #include <uvm/uvm_extern.h> @@ -629,6 +630,8 @@ good: if (ISSET(flags, PR_ZERO)) memset(v, 0, pp->pr_size); + TRACEPOINT(uvm, pool_get, pp, v, flags); + return (v); fail: @@ -795,6 +798,8 @@ pool_put(struct pool *pp, void *v) panic("%s: NULL item", __func__); #endif + TRACEPOINT(uvm, pool_put, pp, v); + #ifdef MULTIPROCESSOR if (pp->pr_cache != NULL && TAILQ_EMPTY(&pp->pr_requests)) { pool_cache_put(pp, v); |