#!/usr/sbin/dtrace -s #pragma D option quiet sjsws$1::*:saf-entry { self->t = timestamp; printf("thread %d: Calling saf %s\n", tid, copyinstr(arg0)); } sjsws$1::*:saf-exit { printf("thread %d: saf %s returned %d. Time spent is %d nanoseconds\n", tid, copyinstr(arg0), args[1], (timestamp - self->t)); self->t = 0; } sjsws$1::*:processing-uri { this->uri = copyinstr(arg0); printf("thread %d: processing objects for uri %s\n", tid, copyinstr(arg0)); } sjsws$1::*:respond-error { printf("thread %d: Processing %d error for client %s\n", tid, arg0, copyinstr(arg1)); } sjsws$1::*:respond-start { printf("thread %d: Processing for absolute path %s client ip %s\n", tid, copyinstr(arg0), copyinstr(arg1)); } sjsws$1::*:connq-addready { connq[arg0] = timestamp; printf("thread %d: Added connection %#p to connectionQ\n", tid, arg0); } sjsws$1::*:connq-getready { printf("thread %d: Removed connection %#p from connectionQ. Time spent in Q %d nanoseconds\n", tid, arg0, (timestamp - connq[arg0])); connq[arg0] = 0; } sjsws$1::*:object-check-start { objectcheck[tid] = timestamp; printf("thread %d: object-check called\n", tid); } sjsws$1::*:object-check-end { printf("thread %d: object-check finished. Time spent %d nanoseconds\n", tid, (timestamp - objectcheck[tid])); objectcheck[tid] = 0; } sjsws$1::*:cond-eval-start { condeval[tid] = timestamp; printf("thread %d: cond-eval called\n", tid); } sjsws$1::*:cond-eval-end { printf("thread %d: cond-eval finished. Time spent %d nanoseconds\n", tid, (timestamp - condeval[tid])); condeval[tid] = 0; } sjsws$1::*:client-eval-start { clienteval[tid] = timestamp; printf("thread %d: client-eval called\n", tid); } sjsws$1::*:client-eval-end { printf("thread %d: client-eval finished. Time spent %d nanoseconds\n", tid, (timestamp - clienteval[tid])); clienteval[tid] = 0; } sjsws$1::*:object-interpolate-start { objectinterpolate[tid] = timestamp; printf("thread %d: object-interpolate called\n", tid); } sjsws$1::*:object-interpolate-end { printf("thread %d: object-interpolate finished. Time spent %d nanoseconds\n", tid, (timestamp - objectinterpolate[tid])); objectinterpolate[tid] = 0; } sjsws$1::*:expr-eval-start { expreval[tid] = timestamp; printf("thread %d: expr-eval called\n", tid); } sjsws$1::*:expr-eval-end { printf("thread %d: expr-eval finished. Time spent %d nanoseconds\n", tid, (timestamp - expreval[tid])); expreval[tid] = 0; } sjsws$1::*:expr-re-eval { printf("thread %d: expr-re-eval subject %s match %d pattern %s, return value %d\n", tid, copyinstr(arg0), arg1, copyinstr(arg2), arg3); } sjsws$1::*:expr-compiled-re-eval { printf("thread %d: expr-compiled-re-eval subject %s match %d pattern %s, return value %d\n", tid, copyinstr(arg0), arg1, copyinstr(arg2), arg3); }