StorPortEtwEvent8 function (storport.h)
A miniport calls StorPortEtwEvent8 to log an ETW event with eight general-purpose ETW parameters to a storage trace channel.
Syntax
ULONG StorPortEtwEvent8(
[in] PVOID HwDeviceExtension,
[in/optional] PSTOR_ADDRESS Address,
[in] ULONG EventId,
[in] PWSTR EventDescription,
[in] ULONGLONG EventKeywords,
[in] STORPORT_ETW_LEVEL EventLevel,
[in] STORPORT_ETW_EVENT_OPCODE EventOpcode,
[in/optional] PSCSI_REQUEST_BLOCK Srb,
[in/optional] _In_reads_or_z_opt_(STORPORT_ETW_MAX_PARAM_NAME_LENGTH)PWSTR Parameter1Name,
[in] ULONGLONG Parameter1Value,
[in/optional] _In_reads_or_z_opt_(STORPORT_ETW_MAX_PARAM_NAME_LENGTH)PWSTR Parameter2Name,
[in] ULONGLONG Parameter2Value,
[in/optional] _In_reads_or_z_opt_(STORPORT_ETW_MAX_PARAM_NAME_LENGTH)PWSTR Parameter3Name,
[in] ULONGLONG Parameter3Value,
[in/optional] _In_reads_or_z_opt_(STORPORT_ETW_MAX_PARAM_NAME_LENGTH)PWSTR Parameter4Name,
[in] ULONGLONG Parameter4Value,
[in/optional] _In_reads_or_z_opt_(STORPORT_ETW_MAX_PARAM_NAME_LENGTH)PWSTR Parameter5Name,
[in] ULONGLONG Parameter5Value,
[in/optional] _In_reads_or_z_opt_(STORPORT_ETW_MAX_PARAM_NAME_LENGTH)PWSTR Parameter6Name,
[in] ULONGLONG Parameter6Value,
[in/optional] _In_reads_or_z_opt_(STORPORT_ETW_MAX_PARAM_NAME_LENGTH)PWSTR Parameter7Name,
[in] ULONGLONG Parameter7Value,
[in/optional] _In_reads_or_z_opt_(STORPORT_ETW_MAX_PARAM_NAME_LENGTH)PWSTR Parameter8Name,
[in] ULONGLONG Parameter8Value
);
Parameters
[in] HwDeviceExtension
A pointer to the hardware device extension for the host bus adapter (HBA).
[in/optional] Address
The storage unit device address. This parameter is NULL for adapter devices.
[in] EventId
A miniport-defined identifier to uniquely identify the type of event.
[in] EventDescription
Required string that describes the event. The maximum size of the string is STORPORT_ETW_MAX_DESCRIPTION_LENGTH characters, not including the null terminator.
[in] EventKeywords
Keyword flags for event categorization. Set to 0 if no keyword is desired. The keywords are a bitwise OR combination of the following.
Value | Meaning |
---|---|
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. |
[in] EventLevel
A STORPORT_ETW_LEVEL value that specifies the importance or severity of the event.
[in] EventOpcode
A STORPORT_ETW_EVENT_OPCODE value that specifies the operational nature of the event.
[in/optional] Srb
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.
[in/optional] Parameter1Name
A description of the meaning of Parameter1Value. The maximum size of the string is STORPORT_ETW_MAX_PARAM_NAME_LENGTH characters, not including the null terminator.
[in] Parameter1Value
The value for parameter 1.
[in/optional] Parameter2Name
A description of the meaning of Parameter2Value. The maximum size of the string is STORPORT_ETW_MAX_PARAM_NAME_LENGTH characters, not including the null terminator.
[in] Parameter2Value
The value for parameter 2.
[in/optional] Parameter3Name
A description of the meaning of Parameter3Value. The maximum size of the string is STORPORT_ETW_MAX_PARAM_NAME_LENGTH characters, not including the null terminator.
[in] Parameter3Value
The value for parameter 3.
[in/optional] Parameter4Name
A description of the meaning of Parameter4Value. The maximum size of the string is STORPORT_ETW_MAX_PARAM_NAME_LENGTH characters, not including the null terminator.
[in] Parameter4Value
The value for parameter 4.
[in/optional] Parameter5Name
A description of the meaning of Parameter5Value. The maximum size of the string is STORPORT_ETW_MAX_PARAM_NAME_LENGTH characters, not including the null terminator.
[in] Parameter5Value
The value for parameter 5.
[in/optional] Parameter6Name
A description of the meaning of Parameter6Value. The maximum size of the string is STORPORT_ETW_MAX_PARAM_NAME_LENGTH characters, not including the null terminator.
[in] Parameter6Value
The value for parameter 6.
[in/optional] Parameter7Name
A description of the meaning of Parameter7Value. The maximum size of the string is STORPORT_ETW_MAX_PARAM_NAME_LENGTH characters, not including the null terminator.
[in] Parameter7Value
The value for parameter 7.
[in/optional] Parameter8Name
A description of the meaning of Parameter8Value. The maximum size of the string is STORPORT_ETW_MAX_PARAM_NAME_LENGTH characters, not including the null terminator.
[in] Parameter8Value
The value for parameter 8.
Return value
StorPortEtwEvent8 returns one of the following status codes:
Return code | Description |
---|---|
STOR_STATUS_SUCCESS | The event was successfully logged. |
STOR_STATUS_NOT_IMPLEMENTED | Tracing is not enabled for storage events. |
STOR_STATUS_INVALID_PARAMETER | One of the parameters is invalid. For example, HwDeviceExtension or EventDescription are NULL, EventDescription is greater than the maximum name length, or an ETW parameter name is greater than the maximum name length. |
Remarks
A miniport can call StorPortEtwEvent8 to log eight general-purpose ETW parameters. The ETW parameters are expressed as eight name-value pairs. If a parameter is not named (ParameterXName = NULL), the routine will set the corresponding parameter value to 0.
Events generated from StorPort miniport drivers are logged to the "Microsoft-Windows-Storage-Storport/Diagnose" ETW channel.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8.1 |
Target Platform | Universal |
Header | storport.h (include Storport.h) |
IRQL | <= DISPATCH_LEVEL |