Max wrote:
The current running thread on a cpu is not on any dispq. The runqueue (dispq) is where
runnable threads wait.  So when threads are enqueued, they are either
switching out, or going to sleep. Threads are dequeued when they are switching in.
OK, that makes sense.
Enqueues can be done either by the current thread enqueueing itself,
or if the thread is woken up following a blocking synchronization primitive.
Try the script without the predicate, or change the predicate to watch
the thread being switched instead of the current executing thread.
Also, if the process you are looking at is multithreaded, the predicate
can match different threads at different times.
Aha! That was it, all right. I updated the predicates for the *queue probes to filter on the pid being acted upon, updated the printf to show the acting process/thread as well, and added timestamps to everything so I could sort the output (forgot about that before...) and now the output is perfect:

t...@1 enqueued on cpu 1 by 6231/t...@1
t...@1 dequeued from cpu 1 by 0/t...@0
t...@1 on cpu 1
t...@1 off cpu 1
t...@1 enqueued on cpu 1 by 6231/t...@1
t...@1 dequeued from cpu 1 by 0/t...@0
t...@1 on cpu 1
t...@1 enqueued on cpu 1 by 10152/t...@1
t...@1 dequeued from cpu 1 by 10152/t...@1
t...@1 off cpu 1
t...@1 enqueued on cpu 1 by 0/t...@1
t...@1 dequeued from cpu 1 by 0/t...@0
t...@1 on cpu 1
t...@1 off cpu 1

Thanks,
Ryan

_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to