PpmEventTraceExpectedUtility
char __fastcall PpmEventTraceExpectedUtility(__int64 a1){
EVENT_DESCRIPTOR *EventDescriptorAndProcessorId;
EVENT_DESCRIPTOR *v3;
EVENT_DESCRIPTOR *v4;
UINT64 v5;
__int64 v6;
unsigned int v7;
unsigned __int64 v8;
unsigned int v9;
int v10;
int v11;
UINT64 UserDataCount;
int v14;
int v15;
int v16;
int v17;
unsigned int v18;
EVENT_DATA_DESCRIPTOR UserData;
int *v20;
int v21;
int v22;
int *v23;
int v24;
int v25;
int *v26;
int v27;
int v28;
int *v29;
int v30;
int v31;
GUID v32;
v15 = 0;
EventDescriptorAndProcessorId = (EVENT_DESCRIPTOR *)PpmEventGetEventDescriptorAndProcessorId(
a1,
(INT64)&PPM_ETW_EXPECTED_UTILITY,
(INT64)&PPM_ETW_EXPECTED_UTILITY_HV,
(INT64)&v15,
(INT64)&v32);
v4 = EventDescriptorAndProcessorId;
if( PpmEtwRegistered )
{
v5 = PpmEtwHandle;
LOBYTE(EventDescriptorAndProcessorId) = EtwEventEnabled(PpmEtwHandle, EventDescriptorAndProcessorId, v3);
if( (_BYTE)EventDescriptorAndProcessorId )
{
UserData.Reserved = 0;
UserData.Ptr = (unsigned __int64)&PpmCheckTime;
v6 = *(_QWORD *)(a1 + 8);
UserData.Size = 8;
if( v6 )
v7 = *(_DWORD *)(v6 + 72);
else
v7 = 100;
v18 = v7;
v8 = PpmCheckPeriod / 0x2710ui64;
v9 = ((unsigned int)(PpmCheckPeriod / 0x2710ui64) * (*(_DWORD *)(a1 + 40) / v7) + 50) / 0x64;
v14 = v9;
if( v9 <= (unsigned int)(PpmCheckPeriod / 0x2710ui64) )
{
v10 = v8 - v9;
v11 = 0;
}
else
{
v10 = 0;
v14 = PpmCheckPeriod / 0x2710ui64;
v11 = v9 - v8;
}
v22 = 0;
v25 = 0;
v28 = 0;
v31 = 0;
v16 = v10;
v20 = &v16;
v23 = &v14;
v26 = &v17;
v29 = (int *)&v18;
LODWORD(UserDataCount) = 6;
v17 = v11;
v21 = 4;
v24 = 4;
v27 = 4;
v30 = 4;
LOBYTE(EventDescriptorAndProcessorId) = EtwWriteEx(v5, v4, 0i64, 0i64, 0i64, 0i64, UserDataCount, &UserData);
}
}
return(char)EventDescriptorAndProcessorId;
}Referenced by:
PpmPerfApplyProcessorState