12. Kernel

The operating system kernel is the software at the heart of a system, managing system resources and user processes. It has historically been difficult to observe as it executes in a protected context, beyond the reach of process debuggers. DTrace provides custom visibility into kernel operations, allowing you to answer questions such as the following.

• Where is the kernel spending time consuming CPU cycles?

• What kernel memory allocations are occurring, and for which segments?

• When are functions executing? And with what arguments?

• Why are functions being executed? What is their stack backtrace?

• How long does it take to execute kernel functions? On-cpu/off-cpu?

As an example, the following one-liner traces all kernel function ...

Get DTrace: Dynamic Tracing in Oracle now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.