Hello All,
I have to extract the time it takes for a context switch to occur from dumpfile.xml.
The CSWITCH entry in dumpfile.xml looks like below:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Guid="{9e814aad-3204-11d2-9a82-006008a86939}" />
<EventID>0</EventID>
<Version>2</Version>
<Level>0</Level>
<Task>0</Task>
<Opcode>36</Opcode>
<Keywords>0x0</Keywords>
<TimeCreated SystemTime="2014-06-19T19:21:07.270117100Z" />
<Correlation ActivityID="{00000000-0000-0000-0000-000000000000}" />
<Execution ProcessID="4294967295" ThreadID="4294967295" ProcessorID="0" KernelTime="0" UserTime="0" />
<Channel />
<Computer />
</System>
<EventData>
<Data Name="NewThreadId">0x988</Data>
<Data Name="OldThreadId">0x958</Data>
<Data Name="NewThreadPriority">9</Data>
<Data Name="OldThreadPriority">10</Data>
<Data Name="PreviousCState">0</Data>
<Data Name="SpareByte">0</Data>
<Data Name="OldThreadWaitReason">17</Data>
<Data Name="OldThreadWaitMode">1</Data>
<Data Name="OldThreadState">5</Data>
<Data Name="OldThreadWaitIdealProcessor">0</Data>
<Data Name="NewThreadWaitTime">0x0</Data>
<Data Name="Reserved"> 29760</Data>
</EventData>
<RenderingInfo Culture="en-IN">
<Opcode>CSwitch</Opcode>
<Provider>MSNT_SystemTrace</Provider>
<EventName xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">Thread</EventName>
</RenderingInfo>
<ExtendedTracingInfo xmlns="http://schemas.microsoft.com/win/2004/08/events/trace">
<EventGuid>{3d6fa8d1-fe05-11d0-9dda-00c04fd7ba7c}</EventGuid>
</ExtendedTracingInfo>
</Event>
Can anyone tell me how to find the Latency(time it takes to execute the above CSWITCH) of the above context switch.
Also which field in xperf summary table gives the equivalent Latency of CSWITCH so that I can verify my results.