Diagnostics and Performance Tuning

Diagnostics and Performance Tuning

Performance Counters

The new Performance Counter Library (PERFLIB version 2.0) included with Windows Vista® offers a number of advantages to the developer:

  • No more requirement to create separate performance extension DLLs and (typically) callback functions

  • Finer granularity queries

  • A standard inter-process communication (IPC) mechanism between a provider and consumer that is based on Event Tracing for Windows (ETW) notification

  • More reliable and secure operation

  • The ability to provide both 64-bit and 32-bit versions of the performance provider on 64-bit versions of Windows Vista.

  • Language-neutral universal identifiers, which are available across PCs

  • The new Counter Preprocessor (CTRPP) tool, which generates skeleton code for performance counter providers

.NET Framework 3.0 applications can access performance counter information through the classes in the System.Diagnostics namespace, primarily through the PerformanceCounter class. For more information, see "Monitoring Performance Thresholds" and "Performance Counters in the .NET Framework" in the Windows SDK.

Event Reporting and Tracing

Windows Vista contains two facilities for event reporting and tracing:

  • Event Tracing for Windows (ETW)

  • Windows Event Log

The new Windows Event Log service has an associated API that, in conjunction with the ETW API, unifies much of this functionality for the developer. This API is targeted at the C/C++ programmer. For more information about the Windows Event Logging API, see "Windows Event Log" in the Windows SDK.