Neelam
2007-Nov-11 18:12 UTC
[dtrace-discuss] sysinfo:::pswitch fires ''before'' or ''after'' the context switch?
Can anyone confirm if sysinfo:::pswitch/sysinfo::preempt:inv_swtch fires ''before'' or ''after'' the context switch? 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
Pramod Batni
2007-Nov-11 19:03 UTC
[dtrace-discuss] sysinfo:::pswitch fires ''before'' or ''after'' the context switch?
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 > dtrace-discuss at opensolaris.org
Neelam
2007-Nov-12 18:08 UTC
[dtrace-discuss] sysinfo:::pswitch fires ''before'' or ''after'' the context switch?
Okay Thanks. I have another related question. Does the sysinfo:::pswitch probe fire only for a voluntary context switch or both voluntary and involuntary context switches? -- This message posted from opensolaris.org
Pramod Batni
2007-Nov-12 20:08 UTC
[dtrace-discuss] sysinfo:::pswitch fires ''before'' or ''after'' the context switch?
Neelam wrote:> Okay Thanks. > > I have another related question. Does the sysinfo:::pswitch probe fire only for a voluntary context switch or both voluntary and involuntary context switches? > >The sysinfo:::pswitch probe fires for both voluntary and involuntary context switches.> -- > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org