Click to Rate and Give Feedback
MSDN
MSDN Library
Diagnostics
Windows Events
Event Tracing
EventTrace
MSNT_SystemTrace
Thread
 CSwitch Class
CSwitch Class

This class is the event type class for context switch events.

The following syntax is simplified from MOF code.


[EventType{36}, EventTypeName{"CSwitch"}]
class CSwitch : Thread
{
  uint32 NewThreadId;
  uint32 OldThreadId;
  sint8 NewThreadPriority;
  sint8 OldThreadPriority;
  sint8 NewThreadQuantum;
  sint8 OldThreadQuantum;
  sint8 OldThreadWaitReason;
  sint8 OldThreadWaitMode;
  sint8 OldThreadState;
  sint8 OldThreadWaitIdealProcessor;
  uint32 NewThreadWaitTime;
  uint32 Reserved;
};

Methods

The CSwitch class does not define any methods.

Properties

The CSwitch class defines the following properties.

NewThreadId
Data type: uint32
Access type: Read-only
Qualifiers: WmiDataId(1), Format("x")

New thread ID after the switch.

NewThreadPriority
Data type: sint8
Access type: Read-only
Qualifiers: WmiDataId(3)

Thread priority of the new thread.

NewThreadQuantum
Data type: sint8
Access type: Read-only
Qualifiers: WmiDataId(5)

Quantum of the new thread.

NewThreadWaitTime
Data type: uint32
Access type: Read-only
Qualifiers: WmiDataId(11), Format("x")

Wait time for the new thread.

OldThreadId
Data type: uint32
Access type: Read-only
Qualifiers: WmiDataId(2), Format("x")

Previous thread ID.

OldThreadPriority
Data type: sint8
Access type: Read-only
Qualifiers: WmiDataId(4)

Thread priority of the previous thread.

OldThreadQuantum
Data type: sint8
Access type: Read-only
Qualifiers: WmiDataId(6)

Quantum of the previous thread.

OldThreadState
Data type: sint8
Access type: Read-only
Qualifiers: WmiDataId(9)

State of the previous thread. The following are the possible state values:

State Description
0 Initialized
1 Ready
2 Running
3 Standby
4 Terminated
5 Waiting
6 Transition
7 DeferredReady (added for Windows Server 2003)
OldThreadWaitIdealProcessor
Data type: sint8
Access type: Read-only
Qualifiers: WmiDataId(10), Format("x")

Ideal wait time of the previous thread.

OldThreadWaitMode
Data type: sint8
Access type: Read-only
Qualifiers: WmiDataId(8)

Wait mode for the previous thread.

OldThreadWaitReason
Data type: sint8
Access type: Read-only
Qualifiers: WmiDataId(7)

Wait reason for the previous thread.

Reserved
Data type: uint32
Access type: Read-only
Qualifiers: WmiDataId(12)

Reserved.

Remarks

These events produce a high volume of events.

Requirements

ClientRequires Windows Vista.
ServerRequires Windows Server 2008.

See Also

Thread


Send comments about this topic to Microsoft

Build date: 9/4/2008

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker