diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2022-06-28 09:32:29 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2022-06-28 09:32:29 +0000 |
commit | f469e1ef26e454d2f6c35b94b977c4ee07795b13 (patch) | |
tree | b2dbb5e5525c950662e68da1f393cb80953ec734 /sys/netinet/ip_ipsp.c | |
parent | 61eef5c03ddb57b2047cfb9deae0f649210dd256 (diff) |
Use btrace(8) to debug reference counting. dt(4) provides a static
tracepoint for each type of refcnt we have. As a start, add inpcb
and tdb refcnt. When the counter changes, btrace may print the
actual object, the current counter, the change value and optionally
the stack trace.
discussed with visa@; OK mpi@
Diffstat (limited to 'sys/netinet/ip_ipsp.c')
-rw-r--r-- | sys/netinet/ip_ipsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c index cf396225e2b..3d7c9a0b25b 100644 --- a/sys/netinet/ip_ipsp.c +++ b/sys/netinet/ip_ipsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.c,v 1.270 2022/04/30 13:28:53 mvs Exp $ */ +/* $OpenBSD: ip_ipsp.c,v 1.271 2022/06/28 09:32:27 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr), @@ -1048,7 +1048,7 @@ tdb_alloc(u_int rdomain) tdbp = pool_get(&tdb_pool, PR_WAITOK | PR_ZERO); - refcnt_init(&tdbp->tdb_refcnt); + refcnt_init_trace(&tdbp->tdb_refcnt, DT_REFCNT_IDX_TDB); mtx_init(&tdbp->tdb_mtx, IPL_SOFTNET); TAILQ_INIT(&tdbp->tdb_policy_head); |