PspQueryProcessAccountingInformationCallback
NTSTATUS __fastcall PspQueryProcessAccountingInformationCallback(_EPROCESS *Process, _EPROCESS_VALUES *Values2){
_PROCESS_DISK_COUNTERS *DiskCounters;
char EnergyValues[432];
memset(EnergyValues, 0i64, sizeof(EnergyValues));
if( (Process->Flags2 & 2) == 0 )
{
PsQueryStatisticsProcess(Process, Values2);
PspAddAccountingValues(Values2 + 1, Values2);
LODWORD(Values2[2].ReadOperationCount) += Process->Vm.Instance.PageFaultCount;
DiskCounters = Process->DiskCounters;
if( DiskCounters )
{
Values2[2].KernelTime += DiskCounters->BytesRead;
Values2[2].UserTime += DiskCounters->BytesWritten;
Values2[2].ReadyTime += DiskCounters->ReadOperationCount;
Values2[2].CycleTime += DiskCounters->WriteOperationCount;
Values2[2].ContextSwitches += DiskCounters->FlushOperationCount;
}
if( PoEnergyEstimationEnabled() )
{
PsQueryProcessEnergyValues(Process, (_PROCESS_ENERGY_VALUES *)EnergyValues);
PsAddProcessEnergyValues((INT64)&Values2[2].WriteOperationCount, (INT64)EnergyValues);
}
}
return 0;
}Referenced by:
No references.