CSwitch Class

Syntax

[EventType{36}, EventTypeName{"CSwitch"}]class CSwitch : Thread_V2
{
  uint32 NewThreadId;
  uint32 OldThreadId;
  sint8  NewThreadPriority;
  sint8  OldThreadPriority;
  uint8  PreviousCState;
  sint8  SpareByte;
  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.

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.

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

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

StateDescription
0Initialized
1Ready
2Running
3Standby
4Terminated
5Waiting
6Transition
7DeferredReady (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.

PreviousCState
Data type: uint8
Access type: Read-only
Qualifiers: WmiDataId(5)

The index of the C-state that was last used by the processor. A value of 0 represents the lightest idle state with higher values representing deeper C-states.

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

Reserved.

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

Not used.

Remarks

These events produce a high volume of events.

Requirements

Minimum supported clientWindows Vista
Minimum supported serverWindows Server 2008

See Also

Thread
Thread_V2

Send comments about this topic to Microsoft

Build date: 10/15/2009

Tags :


Page view tracker