The lockstat driver is the mechanism used by the lockstat(1M) command to extract kernel lock statistics. This is not a public interface.
lockstat(1M)