On Wednesday, October 31, 2007 8:40 AM,
tesla-dev-bounces at opensolaris.org wrote:
> Here's a little DTrace script that uses the cstate_transition probe to
> report how long we're spending in C1 before being awoken:
>
And here is a Dtrace script for wakeups, althought it's ugly now, ;-)
#!/usr/sbin/dtrace -s
#pragma D option quiet
sdt:::callout-start
{
@callouts[((callout_t *)arg0)->c_func] = count();
}
sdt:::interrupt-start
/arg0 != 0/
{
this->devi = (struct dev_info *)arg0;
@interrupts[stringof(`devnamesp[this->devi->devi_major].dn_name)] =
count();
}
tick-5sec
{
printf("=======================================================\n");
printa("%40a %10 at d\n", @callouts);
printa("%40s %10 at d\n", @interrupts);
clear(@callouts);
clear(@interrupts);
}
The output on my side is attached for any interest.
Thanks,
-Aubrey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: top-wakeups.d
Type: application/octet-stream
Size: 472 bytes
Desc: top-wakeups.d
URL:
<http://mail.opensolaris.org/pipermail/tesla-dev/attachments/20071031/f494cebf/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: top-wakeups.log
Type: application/octet-stream
Size: 1328 bytes
Desc: top-wakeups.log
URL:
<http://mail.opensolaris.org/pipermail/tesla-dev/attachments/20071031/f494cebf/attachment-0001.obj>