StorPortEtwEvent2 routine

The StorPortEtwEvent2 publishes an Event Tracing for Windows (ETW) event to a storage trace channel. The miniport can log two general purpose ETW parameters. The ETW parameters are expressed as two name-value pairs.

Syntax


ULONG StorPortEtwEvent2(
  _In_      PVOID HwDeviceExtension,
  _In_opt_  PSTOR_ADDRESS Address,
  _In_      ULONG EventId,
  _In_      PWSTR EventDescription,
  _In_      ULONGLONG EventKeywords,
  _In_      STORPORT_ETW_LEVEL EventLevel,
  _In_      STORPORT_ETW_EVENT_OPCODE EventOpcode,
  _In_opt_  PSCSI_REQUEST_BLOCK Srb,
  _In_opt_  PWSTR Parameter1Name,
  _In_      ULONGLONG Parameter1Value,
  _In_opt_  PWSTR Parameter2Name,
  _In_      ULONGLONG Parameter2Value
);

Parameters

HwDeviceExtension [in]

A pointer to the hardware device extension for the host bus adapter (HBA).

Address [in, optional]

The storage unit device address. This parameter is NULL for adapter devices.

EventId [in]

A miniport defined identifier for the ETW event.

EventDescription [in]

The description text for the event. This text string must be <= STORPORT_ETW_MAX_DESCRIPTION_LENGTH.

EventKeywords [in]

Keyword flags for event categorization. Set to 0 if no keyword is desired. The keywords are a bitwise OR combination of the following.

ValueMeaning
STORPORT_ETW_EVENT_KEYWORD_IO

The event is related to device IO operations.

STORPORT_ETW_EVENT_KEYWORD_PERFORMANCE

The event is performance related.

STORPORT_ETW_EVENT_KEYWORD_POWER

The event is related to device power.

STORPORT_ETW_EVENT_KEYWORD_ENUMERATION

The event is related to device enumeration.

 

EventLevel [in]

The event level. This value can indicate the importance or severity of the event. This is one of the following values.

ValueMeaning
StorportEtwLevelLogAlways

Log the event unconditionally. The event is logged regardless of any filters set.

StorportEtwLevelCritical

Critical level event.

StorportEtwLevelError

Error level event.

StorportEtwLevelWarning

Warning level event.

StorportEtwLevelInformational

Informational event.

StorportEtwLevelVerbose

Verbose event information provided.

 

EventOpcode [in]

The operational nature of the event. This is one of the following values.

ValueMeaning
StorportEtwEventOpcodeInfo

General informational event.

StorportEtwEventOpcodeStart

Device or unit was starting.

StorportEtwEventOpcodeStop

Device or unit was stopping. The event corresponds to the last unpaired start event.

StorportEtwEventOpcodeDC_Start

A data collection starting event. These are rundown event types.

StorportEtwEventOpcodeDC_Stop

A data collection stopping event. These are rundown event types.

StorportEtwEventOpcodeExtension

An extension event.

StorportEtwEventOpcodeReply

A reply event.

StorportEtwEventOpcodeResume

Device or unit was resuming after suspend.

StorportEtwEventOpcodeSuspend

Device or unit is suspended pending completion of another operation.

StorportEtwEventOpcodeReceive

Transfer of activity is received from another component.

 

Srb [in, optional]

A pointer to the SRB associated with the logged event. If this parameter contains a valid SRB, this SRB pointer and the associated SRB pointer are logged.

Parameter1Name [in, optional]

A description of the of the meaning of Parameter1Value. This parameter name string must be <= STORPORT_ETW_MAX_PARAM_NAME_LENGTH.

Parameter1Value [in]

The value for parameter 1.

Parameter2Name [in, optional]

A description of the of the meaning of Parameter2Value. This parameter name string must be <= STORPORT_ETW_MAX_PARAM_NAME_LENGTH.

Parameter2Value [in]

The value for parameter 2.

Return value

StorPortEtwEvent2 returns one of the following status codes:

Return codeDescription
STOR_STATUS_SUCCESS

The event published successfully storage ETW channel.

STOR_STATUS_NOT_IMPLEMENTED

Tracing is not enabled for storage events.

STOR_STATUS_INVALID_PARAMETER

The HwDeviceExtension parameter is NULL.

-or-

EventDescription is NULL.

-or-

EventDescription is greater than the maximum name length.

-or-

An ETW parameter name is greater than the maximum name length.

 

Remarks

If any parameter is not named, ParameterXName = NULL, the routine will set the corresponding parameter value to 0.

Events generated from StorPort miniport drivers are published to the "Microsoft-Windows-Storage-Storport/Diagnose" ETW channel.

Requirements

Version

Available in starting with Windows 8.1.

Header

Storport.h (include Storport.h)

IRQL

<= DISPATCH_LEVEL

See also

StorPortEtwEvent4
StorPortEtwEvent8

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft