Module Name: src Committed By: riastradh Date: Mon May 30 20:28:30 UTC 2022
Modified Files: src/sys/kern: subr_kmem.c Log Message: kmem(9): Create dtrace sdt probes for each kmem cache size. The names of the probes correspond to the names shown in vmstat -m. This should make it much easier to track down who's allocating memory when there's a leak, e.g. by getting a histogram of stack traces for the matching kmem cache pool: # vmstat -m Memory resource pool statistics Name Size Requests Fail Releases Pgreq Pgrel Npage Hiwat Minpg Maxpg Idle ... kmem-00128 256 62242 0 0 3891 0 3891 3891 0 inf 0 ... # dtrace -n 'sdt:kmem:*:kmem-00128 { @[probefunc, stack()] = count() }' ^C When there's no leak, the allocs and frees (probefunc) will be roughly matched; when there's a leak, the allocs will far outnumber the frees. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.85 src/sys/kern/subr_kmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.