Thread Object

The Thread performance object consists of counters that measure aspects of thread behavior. A thread is the basic object that executes instructions on a processor. All running processes have at least one thread.

Counter Name Description Counter Type
% Privileged Time Shows the percentage of elapsed time that this thread has spent executing code in privileged mode. When a Windows 2000 system service is called, the service often runs in privileged mode to gain access to system-private data. Such data is protected from access by threads executing in user mode. Calls to the system can be explicit or implicit, such as page faults or interrupts. Unlike some early operating systems, Windows 2000 uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsystem processes provide additional protection. Therefore, some work done by Windows 2000 on behalf of your application might appear in other subsystem processes in addition to the privileged time in your process. PERF_100NSEC_TIMER
% Processor Time Shows the percentage of elapsed time that this thread used the processor to execute instructions. An instruction is the basic unit of execution in a processor, and a thread is the object that executes instructions. Code executed to handle certain hardware interrupts and trap conditions are included in this count. PERF_100NSEC_TIMER
% User Time Shows the percentage of elapsed time that this thread has spent executing code in user mode. Applications, environment subsystems, and integral subsystems execute in user mode. Code executing in user mode cannot damage the integrity of the Windows 2000 Executive, Kernel, and device drivers. Unlike some early operating systems, Windows 2000 uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsystem processes provide additional protection. Therefore, some work done by Windows 2000 on behalf of your application might appear in other subsystem processes in addition to the privileged time in your process. PERF_100NSEC_TIMER
Context Switches/sec Shows the rate at which switches from one thread to another occur. Thread switches can occur either inside of a single process or across processes. A thread switch can be caused either by one thread asking another for information, or by a thread being preempted by another, higher priority thread becoming ready to run. Unlike some early operating systems, Windows 2000 uses process boundaries for subsystem protection in addition to the traditional protection of user and privileged modes. These subsystem processes provide additional protection. Therefore, some work done by Windows 2000 on behalf of an application might appear in other subsystem processes in addition to the privileged time in the application. Switching to the subsystem process causes one context switch in the application thread. Switching back causes another context switch in the subsystem thread. PERF_COUNTER_COUNTER
Elapsed Time Shows the total elapsed time, in seconds, that this thread has been running. PERF_ELAPSED_TIME
ID Process Shows the unique identifier of this process. ID Process numbers are reused, so they only identify a process for the lifetime of that process. PERF_COUNTER_RAWCOUNT
ID Thread Shows the unique identifier of this thread. ID Thread numbers are reused, so they only identify a thread for the lifetime of that thread. PERF_COUNTER_RAWCOUNT
Priority Base Shows the current base priority of this thread. The system can raise the thread's dynamic priority above the base priority if the thread is handling user input, or lower it toward the base priority if the thread becomes compute bound. PERF_COUNTER_RAWCOUNT
Priority Current Shows the current dynamic priority of this thread. The system can raise the thread's dynamic priority above the base priority if the thread is handling user input, or lower it toward the base priority if the thread becomes compute bound. PERF_COUNTER_RAWCOUNT
Start Address Shows the starting virtual address for this thread. PERF_COUNTER_RAWCOUNT
Thread State Shows the current state of the thread. Valid values are:
0Initialized
1Ready
2Running
3Standby
4 Terminated
5 Waiting
6 Transition
7 Unknown
PERF_COUNTER_RAWCOUNT
Thread Wait Reason Shows the reason that a thread was in the Wait state and is only applicable when the thread is in the Wait state as reflected by Thread\Thread State (value is 5). Values are as follows:
0Waiting for a component of the Windows NT Executive
1Waiting for a page to be freed
2Waiting for a page to be mapped or copied
3Waiting for space to be allocated in the paged or nonpaged pool
4Waiting for an Execution Delay to be resolved
5Suspended
6Waiting for a user request
7Waiting for a component of the Windows NT Executive
8Waiting for a page to be freed
9Waiting for a page to be mapped or copied
10Waiting for space to be allocated in the paged or nonpaged pool
11Waiting for an Execution Delay to be resolved
12Suspended
13Waiting for a user request
14Waiting for an event pair high
15Waiting for an event pair low
16Waiting for an LPC Receive notice
17Waiting for an LPC Reply notice
18Waiting for virtual memory to be allocated
19Waiting for a page to be written to disk
20+(Reserved for future use)
PERF_COUNTER_RAWCOUNT

See also

© 1985-2000 Microsoft Corporation. All rights reserved.