Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/kern



Module Name:    src
Committed By:   riastradh
Date:           Sat Jan  3 23:08:16 UTC 2026

Modified Files:
        src/sys/kern: kern_lock.c

Log Message:
KERNEL_LOCK(9): New dtrace probes for taking and dropping the lock.

At some point, fbt::_kernel_lock:return worked to probe the `taking'
part (judging by the message I wrote some years ago at
https://mail-index.NetBSD.org/tech-kern/2022/10/30/msg028499.html)
but no longer, so let's just make sure there is always a probe that
explicitly works, on both sides:

- sdt:kernel:lock:entry(nlocks) fires when we have determined we can
  take the kernel lock and we're about to increment its depth by
  nlocks.

- sdt:kernel:lock:exit(nlocks) fires after we have released the kernel
  lock and already decremented its depth by nlocks.

On first acquisition, or last release, of the kernel lock by a thread
or CPU, in both probes the value of curlwp->l_blcnt or
curcpu()->ci_biglock_count will be zero.

PR kern/59870: kernel lock runtime diagnostics are difficult


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/kern/kern_lock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index