Date: Thu, 5 May 2011 13:08:56 -0700 From: "David Christensen" <davidch@broadcom.com> To: "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: Using Dtrace for Performance Evaluation Message-ID: <5D267A3F22FD854F8F48B3D2B523819360D799A42B@IRVEXCHCCR01.corp.ad.broadcom.com>
next in thread | raw e-mail | index | archive | help
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
{
@callouts[((struct callout *)arg0)->c_func] = sum(timestamp -
self->in);
}
tick-10sec
{
printa("%40a %10@d\n", @callouts);
clear(@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?
Dave
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5D267A3F22FD854F8F48B3D2B523819360D799A42B>
