DTrace probes -- assert() on steroids?

Quite recently I've had a conversation with a good friend of mine who shares my interest in DTrace and compilers and it seems that we've come up with a pretty neat use for DTrace probes. The idea is to start using DTrace probes for assert(3). You know how, during the development cycle the assertions are kept in the code and when the final build is supposed to happen most of them get deleted by turning off a magic define? Well, with DTrace probes used instead of assert() the beauty is -- they are all turned off by default (no funky defines required) but the dynamic nature of DTrace lets you turn any subset of them on when and only when you really need them. Like at a customer site (with the production code running) to diagnose a particular problem. Neat, isn't it?
Comments:

Very neat. Be sure to check out 'is-enabled' probes.

Posted by Adam Leventhal on May 02, 2007 at 07:56 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

rvs

Search

Top Tags
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today