BSDCan2008 - Final - we hope

BSDCan 2008
The Technical BSD Conference

John Birrell
Day Talks - 2 (2008-05-17)
Room B
Start time 13:30
Duration 01:00
ID 66
Event type lecture
Track Hacking
Language en

DTrace for FreeBSD

What on earth is that system doing?!

DTrace is a comprehensive dynamic tracing facility originally developed for Solaris that can be used by administrators and developers on live production systems to examine the behavior of both user programs and of the operating system itself. DTrace enables users to explore their system to understand how it works, track down performance problems across many layers of software, or locate the cause of aberrant behavior. DTrace lets users create their own custom programs to dynamically instrument the system and provide immediate, concise answers to arbitrary questions you can formulate using the DTrace D programming language.

This talk discusses the port of the DTrace facility to FreeBSD and demonstrates examples on a live FreeBSD system.

  • Introduction to the D language - probes, predicates and actions.
  • dtrace(8) and libdtrace - the userland side of the DTrace story.
  • The DTrace kernel module, it's ioctl interface to userland and the provider infrastructure in the kernel.
  • DTrace kernel hooks and the problem of code licensed under Sun's CDDL.
  • What does a DTrace probe actually do?
  • DTrace safety and how it is implemented.
  • Build system changes to add CTF (Compact C Type Format) data to objects, shared libraries and executables.
  • The DTrace test suite.
  • A brief list of things to do to port the DTrace facility to other BSD-derived operating systems.