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

  Switch on low bandwidth view
CSwitch Class

[This documentation is preliminary and is subject to change.]

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

The following syntax is simplified from MOF code.

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: 7/2/2009

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