Until the DTrace framework and tools became available with Solaris 10,
kernel debugging was usually shrouded in mystery and accomplished via happenstance and archaic code and tools. For example,
CPUshaveabreakpoint feature that will halt execution and allow a debugger to examine the state of the system.
Then execution can continue until the next breakpoint or termination.
This method cannot be used in a multiuser operating-system kernel without negatively affecting all of the users on the system.
Profiling, which periodically samples the instruction pointer to determine which code is being executed,
can show statistical trends but not individual activities. Code can be included in the kernel to emit specific data under specific circumstances,
but that code slows down the kernel and tends not to be included in the part of the kernel where the specific problem being debugged is occurring.