On Thu, May 5, 2011 at 1:08 PM, David Christensen <davidch_at_broadcom.com> wrote: > I was looking at using dtrace to help characterize performance > for the new bxe(4) driver but I'm having problems with the very > simple task of capturing time spent in a function. The D script > I'm using looks like the following: > > #pragma D option quiet > > fbt:if_bxe::entry > { > self->in = timestamp; > } > > fbt:if_bxe::return > { > > _at_callouts[((struct callout *)arg0)->c_func] = sum(timestamp - > self->in); > } > > tick-10sec > { > printa("%40a %10_at_d\n", _at_callouts); > clear(_at_callouts); > printf("\n"); > } > > BEGIN > { > printf("%40s | %s\n", "function", "nanoseconds per second"); > } > > After building dtrace into the kernel and loading the dtraceall > kernel module, when I load my bxe kernel module and run "dtrace -l" > to list all supported probes I notice that many functions have an > entry probe but no exit probe. This effectively prevents me from > calculating timestamps on "fbt:if_bxe::return" probes. Why am I > seeing this behavior? Tail call optimization could do that to you: http://en.wikipedia.org/wiki/Tail_call --Artem > > Dave > > _______________________________________________ > freebsd-current_at_freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org" >Received on Thu May 05 2011 - 21:54:06 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC