Neelam wrote:
> Can anyone confirm if sysinfo:::pswitch/sysinfo::preempt:inv_swtch fires 
> 'before' or 'after' the context switch?  

   They fire before the context switch.

   sysinfo::preempt:inv_swtch fires before calling swtch().
 
http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/disp/disp.c
 
  [look for the definition of preempt in the above file]

   The probe sysinfo:::pswitch is placed before the call to resume() in
   swtch() and hence would fire before the sched:::off-cpu probe in
   resume().
   [look for the definition of swtch() in the above url]


Pramod


> 
> I know sched:::off-cpu fires before the context switch, but not quite sure 
> about sysinfo:::pswitch and sysinfo::preempt:inv_swtch.If these fire after 
> the context switch, is there any way to use sched:::off-cpu and still be able 
> to distinguish between voluntary and involuntary context switches?
> 
> Thanks,
> Neelam
> 
> 
> --
> This message posted from opensolaris.org
> _______________________________________________
> dtrace-discuss mailing list
> [email protected]

_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to