zfs's refcount debugging should be generally available and more widely used
the ZFS folks implemented a feature I have wanted for years, and hid it away in ZFS so well that I only just discovered it.
They have debuggable refcounts, in zfs/sys/refcount.h and the zfs dmod.
Presuming this is as useful as it certainly would appear to be, this should be made generally available in the system, conditioned on DEBUG rather than ZFS_DEBUG (if that), and used wherever refcounts lurk in the dark, waiting to pounce.
No data to display