web application's "real" code execution pathway! • Profile why NFS gets super busy at 0430 and a directory tree traversal takes 2 hours instead of 2 minutes.!
a probe, optional predicate and optional actions in a braced clause! • Supports BEGIN and END blocks! • Local variables (this->foo = 42)! • Aggregate/associative variables (prefixed with @)! • One liner support in the form! dtrace -n 'probe /predicate/ {action}'
/* Count sub entries by package and sub name * arg0 = source file name * arg1 = function name (def do_something():) */ @[strjoin(strjoin(copyinstr(arg0),"-"),copyinstr(arg1))] = count() } END { /* Give me top 10 highest counts; throw away rest */ trunc(@, 10) }
/* Count sub entries by package and sub name * arg0 = source file name * arg1 = functiuon name (def do_something():) */ @[strjoin(strjoin(copyinstr(arg0),"-"),copyinstr(arg1))] = count() } END { /* Give me top 10 highest counts; throw away rest */ trunc(@, 10) }
/* Count sub entries by package and sub name * arg0 = source file name * arg1 = functiuon name (def do_something():) */ @[strjoin(strjoin(copyinstr(arg0),"-"),copyinstr(arg1))] = count() } END { /* Give me top 10 highest counts; throw away rest */ trunc(@, 10) }
/* Count sub entries by package and sub name * arg0 = source file name * arg1 = functiuon name (def do_something():) */ @[strjoin(strjoin(copyinstr(arg0),"-"),copyinstr(arg1))] = count() } END { /* Give me top 10 highest counts; throw away rest */ trunc(@, 10) }