Update telemetry.
This commit is contained in:
Родитель
45ac8bcb39
Коммит
8f60fb9124
|
@ -948,8 +948,6 @@ Return Value:
|
|||
}
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1007,8 +1005,6 @@ Return Value:
|
|||
}
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1082,8 +1078,6 @@ Return Value:
|
|||
}
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1164,8 +1158,8 @@ Done:
|
|||
//
|
||||
status = STATUS_PENDING;
|
||||
}
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1346,8 +1340,6 @@ Done:
|
|||
}
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1581,6 +1573,14 @@ Return Value:
|
|||
TRACE_LINE(LEVEL_INFO, "Output Buffer length after adding header is %Iu", OutputBufferUsed);
|
||||
|
||||
Done:
|
||||
TlgAggregateWrite(
|
||||
g_hNfcCxProvider,
|
||||
"EseSmartcardTransmit",
|
||||
TraceLoggingInt64AggregateSum(1, "Count"),
|
||||
TraceLoggingNTStatus(status, "Status"),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
|
||||
if (NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_INFO,
|
||||
"Completing request %p, with %!STATUS!, Output buffer length = %Iu", Request, status, OutputBufferUsed);
|
||||
|
|
|
@ -524,9 +524,10 @@ Done:
|
|||
return status;
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
static BOOLEAN
|
||||
NfpCxNfpInterfaceCompleteSubscriptionRequestLocked(
|
||||
_In_ WDFQUEUE SubQueue,
|
||||
_In_ TRANSLATION_TYPE_PROTOCOL TranslationType,
|
||||
_In_bytecount_(DataLength) PVOID Data,
|
||||
_In_ USHORT DataLength
|
||||
)
|
||||
|
@ -604,6 +605,8 @@ Return Value:
|
|||
WdfRequestCompleteWithInformation(wdfRequest, status, actualSize);
|
||||
wdfRequest = NULL;
|
||||
|
||||
NfcCxNfpInterfaceSubscriptionTelemetry(status, TranslationType);
|
||||
|
||||
if (NT_SUCCESS(status)) {
|
||||
//
|
||||
// It is possible that the event was completed with STATUS_BUFFER_OVERFLOW
|
||||
|
@ -719,6 +722,7 @@ Return Value:
|
|||
//
|
||||
if (!NfpCxNfpInterfaceCompleteSubscriptionRequestLocked(
|
||||
client->RoleParameters.Sub.SubsMessageRequestQueue,
|
||||
client->TranslationType,
|
||||
&EventData,
|
||||
sizeof(EventData))) {
|
||||
CNFCPayload* pEntry = NULL;
|
||||
|
@ -1127,6 +1131,7 @@ Return Value:
|
|||
|
||||
if (!NfpCxNfpInterfaceCompleteSubscriptionRequestLocked(
|
||||
fileContext->RoleParameters.Sub.SubsMessageRequestQueue,
|
||||
fileContext->TranslationType,
|
||||
eventData,
|
||||
eventDataLength)) {
|
||||
|
||||
|
@ -2196,6 +2201,7 @@ Return Value:
|
|||
#endif
|
||||
|
||||
WdfRequestCompleteWithInformation(Request, status, usedBufferSize);
|
||||
NfcCxNfpInterfaceSubscriptionTelemetry(status, FileContext->TranslationType);
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -2439,6 +2445,7 @@ Return Value:
|
|||
#endif
|
||||
|
||||
WdfRequestComplete(Request, STATUS_SUCCESS);
|
||||
NfcCxNfpInterfacePublicationTelemetry(STATUS_SUCCESS, FileContext->TranslationType);
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -2552,9 +2559,6 @@ Return Value:
|
|||
status = STATUS_PENDING;
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -2617,9 +2621,43 @@ Return Value:
|
|||
status = STATUS_PENDING;
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void
|
||||
NfcCxNfpInterfaceSubscriptionTelemetry(
|
||||
_In_ NTSTATUS Status,
|
||||
_In_ TRANSLATION_TYPE_PROTOCOL Type
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(Status);
|
||||
UNREFERENCED_PARAMETER(Type);
|
||||
|
||||
TlgAggregateWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfpSubscriptionFulfilled",
|
||||
TraceLoggingInt64AggregateSum(1, "Count"),
|
||||
TraceLoggingInt32(Type, "Type"),
|
||||
TraceLoggingNTStatus(Status, "Status"),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
}
|
||||
|
||||
void
|
||||
NfcCxNfpInterfacePublicationTelemetry(
|
||||
_In_ NTSTATUS Status,
|
||||
_In_ TRANSLATION_TYPE_PROTOCOL Type
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(Status);
|
||||
UNREFERENCED_PARAMETER(Type);
|
||||
|
||||
TlgAggregateWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfpPublicationFulfilled",
|
||||
TraceLoggingInt64AggregateSum(1, "Count"),
|
||||
TraceLoggingInt32(Type, "Type"),
|
||||
TraceLoggingNTStatus(Status, "Status"),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
}
|
||||
|
|
|
@ -320,3 +320,15 @@ NfcCxNfpInterfaceDispatchGetKbps(
|
|||
_Out_opt_bytecap_(OutputBufferLength) PVOID OutputBuffer,
|
||||
_In_ size_t OutputBufferLength
|
||||
);
|
||||
|
||||
void
|
||||
NfcCxNfpInterfaceSubscriptionTelemetry(
|
||||
_In_ NTSTATUS Status,
|
||||
_In_ TRANSLATION_TYPE_PROTOCOL Type
|
||||
);
|
||||
|
||||
void
|
||||
NfcCxNfpInterfacePublicationTelemetry(
|
||||
_In_ NTSTATUS Status,
|
||||
_In_ TRANSLATION_TYPE_PROTOCOL Type
|
||||
);
|
||||
|
|
|
@ -335,11 +335,7 @@ NfcCxRFInterfaceWatchdogTimerCallback(
|
|||
|
||||
TRACE_LINE(LEVEL_ERROR, "Watchdog timer timed out");
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxRfInterfaceWatchdogTimeout",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
|
||||
MICROSOFT_TELEMETRY_ASSERT_MSG(false, "NfcCxRfInterfaceWatchdogTimeout");
|
||||
NfcCxDeviceSetFailed(rfInterface->FdoContext->Device);
|
||||
}
|
||||
|
||||
|
@ -402,15 +398,7 @@ NfcCxRFInterfaceExecute(
|
|||
status = STATUS_UNSUCCESSFUL;
|
||||
TRACE_LINE(LEVEL_ERROR, "%!NFCCX_RF_OPERATION! timed out. Error: 0x%08X. %!STATUS!", Operation, dwWait, status);
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxRfExecutionTimeout",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TraceLoggingUInt32(Operation, "Operation"),
|
||||
TraceLoggingUIntPtr(Param1, "Param1"),
|
||||
TraceLoggingUIntPtr(Param2, "Param2"),
|
||||
TraceLoggingHexUInt32(dwWait, "WaitError"));
|
||||
|
||||
MICROSOFT_TELEMETRY_ASSERT_MSG(false, "NfcCxRfExecutionTimeout");
|
||||
NfcCxDeviceSetFailed(RFInterface->FdoContext->Device);
|
||||
goto Done;
|
||||
}
|
||||
|
@ -852,16 +840,6 @@ Return Value:
|
|||
TRACE_LINE(LEVEL_INFO, "TotalDuration=%d PollConfig=0x%08x NfcIPMode=0x%02x NfcIPTgtMode=0x%02x NfcCEMode=0x%02x BailoutConfig=0x%02x",
|
||||
Config->TotalDuration, Config->PollConfig, Config->NfcIPMode, Config->NfcIPTgtMode, Config->NfcCEMode, Config->BailoutConfig);
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxRFInterfaceSetDiscoveryConfig",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_TELEMETRY),
|
||||
TraceLoggingValue(Config->TotalDuration, "TotalDuration"),
|
||||
TraceLoggingHexInt32(Config->PollConfig, "PollConfig"),
|
||||
TraceLoggingHexInt32(Config->NfcIPMode, "NfcIPMode"),
|
||||
TraceLoggingHexInt32(Config->NfcIPTgtMode, "NfcIPTgtMode"),
|
||||
TraceLoggingHexInt32(Config->NfcCEMode, "NfcCEMode"));
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
return status;
|
||||
}
|
||||
|
@ -902,14 +880,6 @@ Return Value:
|
|||
|
||||
TRACE_LINE(LEVEL_INFO, "Miu=%d LinkTimeout=%d RecvWindowSize=%d", Config->Miu, Config->LinkTimeout, Config->RecvWindowSize);
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxRFInterfaceSetLLCPConfig",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_TELEMETRY),
|
||||
TraceLoggingValue(Config->Miu, "Miu"),
|
||||
TraceLoggingValue(Config->LinkTimeout, "LinkTimeout"),
|
||||
TraceLoggingValue(Config->RecvWindowSize, "RecvWindowSize"));
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
return status;
|
||||
}
|
||||
|
@ -2183,15 +2153,6 @@ NfcCxRFInterfaceHandleReceivedNdefMessage(
|
|||
//
|
||||
NfcCxNfpInterfaceHandleReceivedNdefMessage(NfcCxRFInterfaceGetNfpInterface(RFInterface),
|
||||
proxBuffer);
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxProximityMessageReceived",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TraceLoggingValue(proxBuffer->GetTnf(), "Tnf"),
|
||||
TraceLoggingCharArray((LPCSTR)proxBuffer->GetSubTypeExt(), proxBuffer->GetSubTypeExtSize(), "MessageType"),
|
||||
TraceLoggingValue(proxBuffer->GetSubTypeExtSize(), "TypeLength"),
|
||||
TraceLoggingValue(proxBuffer->GetPayloadSize(), "PayloadSize"));
|
||||
}
|
||||
|
||||
delete proxBuffer;
|
||||
|
@ -2218,12 +2179,6 @@ NfcCxRFInterfaceHandleReceivedBarcodeMessage(
|
|||
//
|
||||
NfcCxNfpInterfaceHandleReceivedNdefMessage(NfcCxRFInterfaceGetNfpInterface(RFInterface),
|
||||
proxBuffer);
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxRFInterfaceHandleReceivedBarcodeMessage",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TraceLoggingValue(proxBuffer->GetPayloadSize(), "PayloadSize"));
|
||||
}
|
||||
|
||||
delete proxBuffer;
|
||||
|
@ -2471,6 +2426,22 @@ NfcCxRFInterfaceInitializeCB(
|
|||
}
|
||||
|
||||
status = NfcCxNtStatusFromNfcStatus(NfcStatus);
|
||||
if (NT_SUCCESS(status))
|
||||
{
|
||||
const phNfc_sDeviceCapabilities_t& deviceInfo = rfInterface->pLibNfcContext->sStackCapabilities.psDevCapabilities;
|
||||
UNREFERENCED_PARAMETER(deviceInfo);
|
||||
|
||||
TlgAggregateWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NciDeviceInfo",
|
||||
TraceLoggingInt64AggregateSum(1, "Count"),
|
||||
TraceLoggingUInt8(deviceInfo.NciVersion, "NciVersion"),
|
||||
TraceLoggingUInt8(deviceInfo.ManufacturerId, "ManufacturerId"),
|
||||
TraceLoggingUInt8Array(deviceInfo.ManufactureInfo.Buffer, deviceInfo.ManufactureInfo.Length, "ManufacturerInfo"),
|
||||
TelemetryPrivacyDataTag(PDT_DeviceConnectivityAndConfiguration),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
}
|
||||
|
||||
NfcCxSequenceDispatchResume(rfInterface, sequence, status, NULL, NULL);
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
|
@ -3938,11 +3909,13 @@ NfcCxRFInterfaceRemoteDevNtfCB(
|
|||
|
||||
TRACE_LINE(LEVEL_INFO, "RemDevType=%!phNfc_eRFDevType_t!", psRemoteDev->psRemoteDevInfo->RemDevType);
|
||||
|
||||
TraceLoggingWrite(
|
||||
TlgAggregateWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxDeviceType",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TraceLoggingValue((DWORD)(psRemoteDev->psRemoteDevInfo->RemDevType), "DeviceType"));
|
||||
"RemoteDeviceConnected",
|
||||
TraceLoggingInt64AggregateSum(1, "Count"),
|
||||
TraceLoggingInt32(psRemoteDev->psRemoteDevInfo->RemDevType, "DeviceType"),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
|
||||
status = NfcCxRFInterfaceSetRemoteDevList(rfInterface, psRemoteDev, uNofRemoteDev);
|
||||
|
||||
|
|
|
@ -1084,8 +1084,6 @@ Return Value:
|
|||
}
|
||||
Done:
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1159,8 +1157,6 @@ Return Value:
|
|||
}
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1234,8 +1230,6 @@ Return Value:
|
|||
}
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1315,8 +1309,6 @@ Return Value:
|
|||
|
||||
Done:
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1410,8 +1402,6 @@ Done:
|
|||
}
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1744,6 +1734,14 @@ Return Value:
|
|||
}
|
||||
|
||||
Done:
|
||||
TlgAggregateWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcSmartcardTransmit",
|
||||
TraceLoggingInt64AggregateSum(1, "Count"),
|
||||
TraceLoggingNTStatus(status, "Status"),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
|
||||
if (NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_INFO,
|
||||
"Completing request %p, with %!STATUS!, output buffer used = %lu", Request, status, cbOutputBufferUsed);
|
||||
|
@ -1756,8 +1754,6 @@ Done:
|
|||
}
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -2561,7 +2557,6 @@ NTSTATUS NfcCxSCInterfaceLoadNewSelectedProtocol(
|
|||
status = NfcCxSCInterfaceLoadStorageClassFromAtrLocked(ScInterface);
|
||||
|
||||
Done:
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
return status;
|
||||
}
|
||||
|
|
|
@ -918,11 +918,13 @@ NfcCxSEInterfaceHandleEvent(
|
|||
|
||||
WdfWaitLockRelease(SEInterface->SEEventsLock);
|
||||
|
||||
TraceLoggingWrite(
|
||||
TlgAggregateWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxSEInterfaceHandleEvent",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_TELEMETRY),
|
||||
TraceLoggingValue((DWORD)EventType, "EventType"));
|
||||
"SEEvent",
|
||||
TraceLoggingInt64AggregateSum(1, "Count"),
|
||||
TraceLoggingInt32(EventType, "EventType"),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServiceUsage),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
|
||||
TRACE_FUNCTION_EXIT(LEVEL_VERBOSE);
|
||||
}
|
||||
|
@ -1118,8 +1120,6 @@ Return Value:
|
|||
Done:
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1427,7 +1427,6 @@ Return Value:
|
|||
status = NfcCxSEInterfaceSetCardEmulationMode(FileContext, pMode);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_ERROR, "Failed to set card emulation mode, %!STATUS!", status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -1505,19 +1504,8 @@ Return Value:
|
|||
//
|
||||
status = STATUS_PENDING;
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxSEInterfaceDispatchGetNfccCapabilities",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_TELEMETRY),
|
||||
TraceLoggingValue(pCapabilities->cbMaxRoutingTableSize, "cbMaxRoutingTableSize"),
|
||||
TraceLoggingValue(pCapabilities->IsAidRoutingSupported, "IsAidRoutingSupported"),
|
||||
TraceLoggingValue(pCapabilities->IsProtocolRoutingSupported, "IsProtocolRoutingSupported"),
|
||||
TraceLoggingValue(pCapabilities->IsTechRoutingSupported, "IsTechRoutingSupported"));
|
||||
|
||||
Done:
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1579,7 +1567,6 @@ Return Value:
|
|||
|
||||
Done:
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1661,8 +1648,6 @@ Return Value:
|
|||
|
||||
Done:
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1799,8 +1784,6 @@ Done:
|
|||
WdfWaitLockRelease(FileContext->StateLock);
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -1879,8 +1862,6 @@ Return Value:
|
|||
|
||||
Done:
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
@ -348,11 +348,7 @@ NfcCxTml_PostWriteCompletion(
|
|||
|
||||
if (!IsListEmpty(&TmlInterface->ReadNotificationQueue)) {
|
||||
TRACE_LINE(LEVEL_ERROR, "ReadQueue and ReadNotificationQueue both have data, which is unexpected. Calling NfcCxDeviceSetFailed");
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxTmlInvalidQueueState",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
MICROSOFT_TELEMETRY_ASSERT_MSG(false, "NfcCxTmlInvalidQueueState");
|
||||
|
||||
NfcCxDeviceSetFailed(TmlInterface->FdoContext->Device);
|
||||
|
||||
|
@ -516,12 +512,7 @@ Return Value:
|
|||
}
|
||||
|
||||
TRACE_LINE(LEVEL_ERROR, "Timer for write completion callback timed out. Error: 0x%08X", dwWait);
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxTmlPostWriteCallbackTimeout",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TraceLoggingHexUInt32(dwWait, "WaitError"));
|
||||
MICROSOFT_TELEMETRY_ASSERT_MSG(false, "NfcCxTmlPostWriteCallbackTimeout");
|
||||
|
||||
NfcCxDeviceSetFailed(fdoContext->Device);
|
||||
}
|
||||
|
@ -1010,12 +1001,7 @@ Return Value:
|
|||
}
|
||||
|
||||
TRACE_LINE(LEVEL_ERROR, "Timer for read completion callback timed out. Error: 0x%08X", dwWait);
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxTmlPostReadCallbackTimeout",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TraceLoggingHexUInt32(dwWait, "WaitError"));
|
||||
MICROSOFT_TELEMETRY_ASSERT_MSG(false, "NfcCxTmlPostReadCallbackTimeout");
|
||||
|
||||
status = STATUS_UNSUCCESSFUL;
|
||||
NfcCxDeviceSetFailed(TmlInterface->FdoContext->Device);
|
||||
|
|
|
@ -19,8 +19,10 @@ Environment:
|
|||
|
||||
#ifdef TELEMETRY
|
||||
|
||||
#include <TraceLoggingProvider.h>
|
||||
#include <TlgAggregate.h>
|
||||
#include <Telemetry\MicrosoftTelemetry.h>
|
||||
#include <Telemetry\MicrosoftTelemetryAssert.h>
|
||||
#include <Telemetry\MicrosoftTelemetryPrivacy.h>
|
||||
#include <TraceLoggingActivity.h>
|
||||
|
||||
#define LOG_BUFFER_LENGTH 1024
|
||||
|
@ -28,18 +30,11 @@ Environment:
|
|||
// Declare provider
|
||||
TRACELOGGING_DECLARE_PROVIDER(g_hNfcCxProvider);
|
||||
|
||||
#define TRACE_LOG_NTSTATUS_ON_FAILURE(status) \
|
||||
if (!NT_SUCCESS(status)) { \
|
||||
TraceLoggingWrite(g_hNfcCxProvider, \
|
||||
__FUNCTION__, \
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES), \
|
||||
TraceLoggingHexInt32(status, "NTStatus")); \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define TraceLoggingWrite(hProvider, eventName, ...)
|
||||
|
||||
#define TRACE_LOG_NTSTATUS_ON_FAILURE(status)
|
||||
#define TlgAggregateWrite(hProvider, eventName, ...)
|
||||
#define MICROSOFT_TELEMETRY_ASSERT(_exp)
|
||||
#define MICROSOFT_TELEMETRY_ASSERT_MSG(_exp, _msg)
|
||||
|
||||
#endif // TELEMETRY
|
||||
|
|
|
@ -271,8 +271,6 @@ Return Value:
|
|||
--*/
|
||||
{
|
||||
NTSTATUS status = STATUS_SUCCESS;
|
||||
char* interfaceFailure = NULL;
|
||||
NFC_CX_DEVICE_MODE nfcCxDeviceMode = NFC_CX_DEVICE_MODE_NCI;
|
||||
|
||||
TRACE_FUNCTION_ENTRY(LEVEL_VERBOSE);
|
||||
|
||||
|
@ -283,7 +281,6 @@ Return Value:
|
|||
status = NfcCxTmlInterfaceStart(FdoContext->TmlInterface);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_ERROR, "Failed to start the Tml Interface, %!STATUS!", status);
|
||||
interfaceFailure = "TML";
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -293,7 +290,6 @@ Return Value:
|
|||
status = NfcCxRFInterfaceStart(FdoContext->RFInterface);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_ERROR, "Failed to start the RF Interface, %!STATUS!", status);
|
||||
interfaceFailure = "RF";
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -303,7 +299,6 @@ Return Value:
|
|||
status = NfcCxNfpInterfaceStart(FdoContext->NfpInterface);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_ERROR, "Failed to start the Nfp Interface, %!STATUS!", status);
|
||||
interfaceFailure = "NFP";
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -313,7 +308,6 @@ Return Value:
|
|||
status = NfcCxSCInterfaceStart(FdoContext->SCInterface);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_ERROR, "Failed to start the SC Interface, %!STATUS!", status);
|
||||
interfaceFailure = "SC";
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -323,7 +317,6 @@ Return Value:
|
|||
status = NfcCxSEInterfaceStart(FdoContext->SEInterface);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_ERROR, "Failed to start the SE Interface, %!STATUS!", status);
|
||||
interfaceFailure = "SE";
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -333,7 +326,6 @@ Return Value:
|
|||
status = NfcCxESEInterfaceStart(FdoContext->ESEInterface);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_ERROR, "Failed to start the eSE Interface, %!STATUS!", status);
|
||||
interfaceFailure = "ESE";
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -344,8 +336,6 @@ Return Value:
|
|||
status = NfcCxTmlInterfaceStart(FdoContext->TmlInterface);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_ERROR, "Failed to start the Tml Interface, %!STATUS!", status);
|
||||
interfaceFailure = "TML";
|
||||
nfcCxDeviceMode = NFC_CX_DEVICE_MODE_DTA;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -355,8 +345,6 @@ Return Value:
|
|||
status = NfcCxDTAInterfaceStart(FdoContext->DTAInterface);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_ERROR, "Failed to start the DTA Interface, %!STATUS!", status);
|
||||
interfaceFailure = "DTA";
|
||||
nfcCxDeviceMode = NFC_CX_DEVICE_MODE_DTA;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
|
@ -367,29 +355,22 @@ Return Value:
|
|||
status = NfcCxPowerStart(FdoContext->Power);
|
||||
if (!NT_SUCCESS(status)) {
|
||||
TRACE_LINE(LEVEL_ERROR, "Failed to start power manager, %!STATUS!", status);
|
||||
interfaceFailure = "POWER";
|
||||
goto Done;
|
||||
}
|
||||
|
||||
Done:
|
||||
TlgAggregateWrite(
|
||||
g_hNfcCxProvider,
|
||||
"FdoInitialize",
|
||||
TraceLoggingInt64AggregateSum(1, "Count"),
|
||||
TraceLoggingNTStatus(status, "Status"),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServicePerformance),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
|
||||
if(!NT_SUCCESS(status)) {
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxFdoInitialize",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TraceLoggingString(interfaceFailure, "Interface"),
|
||||
TraceLoggingUInt32(nfcCxDeviceMode, "NFCCxDeviceMode"),
|
||||
TraceLoggingHexInt32(status, "NTStatus")
|
||||
);
|
||||
}
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
NTSTATUS
|
||||
NfcCxFdoDeInitialize(
|
||||
_In_ PNFCCX_FDO_CONTEXT FdoContext
|
||||
|
|
|
@ -48,7 +48,7 @@ DllMain(
|
|||
#endif
|
||||
|
||||
#ifdef TELEMETRY
|
||||
TraceLoggingRegister(g_hNfcCxProvider);
|
||||
TlgRegisterAggregateProvider(g_hNfcCxProvider);
|
||||
#endif
|
||||
}
|
||||
else if (DLL_PROCESS_DETACH == Reason) {
|
||||
|
@ -61,7 +61,7 @@ DllMain(
|
|||
#endif
|
||||
|
||||
#ifdef TELEMETRY
|
||||
TraceLoggingUnregister(g_hNfcCxProvider);
|
||||
TlgUnregisterAggregateProvider(g_hNfcCxProvider);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -136,8 +136,14 @@ Return Value:
|
|||
}
|
||||
|
||||
Done:
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"DriverEntry",
|
||||
TraceLoggingNTStatus(status, "Status"),
|
||||
TelemetryPrivacyDataTag(PDT_ProductAndServicePerformance),
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES));
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -313,25 +319,13 @@ Return Value:
|
|||
TRACE_LINE(LEVEL_INFO, "DriverFlags=0x%x PowerIdleType=%d PowerIdleTimeout=%d",
|
||||
Config->DriverFlags, Config->PowerIdleType, Config->PowerIdleTimeout);
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxClientConfig",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_TELEMETRY),
|
||||
TraceLoggingHexInt32(Config->DriverFlags, "DriverFlags"),
|
||||
TraceLoggingValue((INT32)(Config->PowerIdleType), "PowerIdleType"),
|
||||
TraceLoggingValue(Config->PowerIdleTimeout, "PowerIdleTimeout"));
|
||||
|
||||
//
|
||||
// Save the client driver configs
|
||||
//
|
||||
RtlCopyMemory(&nfcCxClientGlobals->Config, Config, Config->Size);
|
||||
|
||||
Done:
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -533,11 +527,7 @@ Return Value:
|
|||
}
|
||||
|
||||
Done:
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -584,11 +574,7 @@ Return Value:
|
|||
}
|
||||
|
||||
Done:
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -662,11 +648,7 @@ Return Value:
|
|||
}
|
||||
|
||||
Done:
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
|
||||
TRACE_LOG_NTSTATUS_ON_FAILURE(status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -903,16 +885,9 @@ Return Value:
|
|||
goto Done;
|
||||
}
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxEvtRegisterSequence",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_TELEMETRY),
|
||||
TraceLoggingValue((DWORD)Sequence, "Sequence"));
|
||||
|
||||
status = NfcCxRFInterfaceRegisterSequenceHandler(fdoContext->RFInterface, Sequence, EvtNfcCxSequenceHandler);
|
||||
|
||||
Done:
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
return status;
|
||||
}
|
||||
|
@ -967,12 +942,6 @@ Return Value:
|
|||
goto Done;
|
||||
}
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"NfcCxEvtUnregisterSequence",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_TELEMETRY),
|
||||
TraceLoggingValue((DWORD)Sequence, "sequence"));
|
||||
|
||||
status = NfcCxRFInterfaceUnregisterSequenceHandler(fdoContext->RFInterface, Sequence);
|
||||
|
||||
Done:
|
||||
|
|
|
@ -1309,6 +1309,8 @@ Return Value:
|
|||
|
||||
WdfRequestCompleteWithInformation(wdfRequest, status, 0);
|
||||
wdfRequest = NULL;
|
||||
|
||||
NfcCxNfpInterfacePublicationTelemetry(status, FileContext->TranslationType);
|
||||
}
|
||||
|
||||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
|
|
22
Cx/power.cpp
22
Cx/power.cpp
|
@ -322,13 +322,7 @@ Return Value:
|
|||
|
||||
status = STATUS_INTEGER_OVERFLOW;
|
||||
TRACE_LINE(LEVEL_ERROR, "File power policy references underflow (%d), %!STATUS!", Type, status);
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"FileHandlePowerRefCountUnderflow",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TraceLoggingInt32(Type, "powerReferenceType"),
|
||||
TraceLoggingInt32(FileContext->Role, "powerHandleRole"));
|
||||
MICROSOFT_TELEMETRY_ASSERT_MSG(false, "FileHandlePowerRefCountUnderflow");
|
||||
|
||||
NfcCxDeviceSetFailed(PowerManager->FdoContext->Device);
|
||||
goto Done;
|
||||
|
@ -653,12 +647,7 @@ Return Value:
|
|||
|
||||
status = STATUS_INTEGER_OVERFLOW;
|
||||
TRACE_LINE(LEVEL_ERROR, "Power policy references underflow (%d), %!STATUS!", Type, status);
|
||||
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"PowerRefCountUnderflow",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TraceLoggingInt32(Type, "powerReferenceType"));
|
||||
MICROSOFT_TELEMETRY_ASSERT_MSG(false, "PowerRefCountUnderflow");
|
||||
|
||||
NfcCxDeviceSetFailed(PowerManager->FdoContext->Device);
|
||||
goto Done;
|
||||
|
@ -905,12 +894,7 @@ Done:
|
|||
TRACE_FUNCTION_EXIT_NTSTATUS(LEVEL_VERBOSE, status);
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceLoggingWrite(
|
||||
g_hNfcCxProvider,
|
||||
"UpdateRfPollingStateFailed",
|
||||
TraceLoggingKeyword(MICROSOFT_KEYWORD_MEASURES),
|
||||
TraceLoggingNTStatus(status, "status"));
|
||||
|
||||
MICROSOFT_TELEMETRY_ASSERT_MSG(false, "UpdateRfPollingStateFailed");
|
||||
NfcCxDeviceSetFailed(fdoContext->Device);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче