Saturday, September 25, 2010

Summary of DTrace Project

Rui Paulo recently committed to FreeBSD HEAD the userland DTrace support, marking the completion of this FreeBSD Foundation sponsored project. Rui summarizes his work as follows:

DTrace, which originated on Solaris 10, is a comprehensive tracing framework that allows the instrumentation of software. FreeBSD has had DTrace support since 7.0, but until now tracing userland programs was not possible. Now that this project is complete, anyone can use DTrace with userland programs.

Tracing and instrumenting userland programs is very important because it allows the understanding of what's going on, especially on highly complex systems such as databases, web servers, and language interpreters. Since DTrace on FreeBSD now has the ability to instrument both the kernel and the userland program, you can get very meaningful data on how your program is behaving and why.

Companies building products on FreeBSD now have the ability to create better products and find about problems faster then before.

This project focused on allowing the creation of DTrace pid probes, userland statically defined probes (aka USDT), importing plockstat (a DTrace utility to measure lock contention in the pthread library), importing dtruss (a system call tracing utility similar to ktrace) and enabling FreeBSD DTrace support on MySQL and PostgreSQL.

Merges to upcoming FreeBSD releases (8.2 and 7.4) are being thought out, but it's likely they will happen.

4 comments:

  1. > Merges to upcoming FreeBSD releases (8.2 and 7.3)

    maybe 7.4?

    ReplyDelete
  2. Just to be clear for readers: DTrace has been supported on the kernel itself for several FreeBSD revisions -- this has been incredibly valuable to FreeBSD kernel developers, but also appliance vendors, etc, who need to profile and optimise kernel behaviour. This benefits everyone, but userspace DTrace is just as important a feature, especially for developers of applications who want to apply the same tools we have been using with great success on the kernel! Rui's done some great work, and I'm looking forward to seeing userspace DTrace as an out-of-the-box feature in 8.x soon.

    ReplyDelete
  3. how to wwrite dscripts for file writing

    ReplyDelete