Tuesday, December 18, 2007

Solaris 10 adaptive_mutex.d Mutex Locking

#!/usr/sbin/dtrace -qs
lockstat:::adaptive-block
{
printf( "%4s %4s %9s %9s %20s\t%s\n",
"CPU", "TID", "PID", "UID", "Wait time", "Command" );
/* dump data*/
printf( "%4d %4d %9d %9d %20d\t%s\n",
curcpu->cpu_id,
curlwpsinfo->pr_lwpid,
curpsinfo->pr_pid,
curpsinfo->pr_uid,
arg1,
curpsinfo->pr_psargs );
/* show stack */
stack();
}

0 comments: