Changeset 46460 in vbox for trunk/src/VBox/Main/src-server/win
- Timestamp:
- Jun 10, 2013 11:43:03 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/win/PerformanceWin.cpp
r46328 r46460 63 63 virtual int getRawHostCpuLoad(uint64_t *user, uint64_t *kernel, uint64_t *idle); 64 64 virtual int getRawProcessCpuLoad(RTPROCESS process, uint64_t *user, uint64_t *kernel, uint64_t *total); 65 65 66 private: 66 67 struct VMProcessStats … … 74 75 typedef std::map<RTPROCESS, VMProcessStats> VMProcessMap; 75 76 76 VMProcessMap mProcessStats; 77 78 typedef BOOL (WINAPI *PFNGST)( 79 LPFILETIME lpIdleTime, 80 LPFILETIME lpKernelTime, 81 LPFILETIME lpUserTime); 82 typedef NTSTATUS (WINAPI *PFNNQSI)( 83 SYSTEM_INFORMATION_CLASS SystemInformationClass, 84 PVOID SystemInformation, 85 ULONG SystemInformationLength, 86 PULONG ReturnLength); 77 VMProcessMap mProcessStats; 78 79 typedef BOOL (WINAPI *PFNGST)(LPFILETIME lpIdleTime, 80 LPFILETIME lpKernelTime, 81 LPFILETIME lpUserTime); 82 typedef NTSTATUS (WINAPI *PFNNQSI)(SYSTEM_INFORMATION_CLASS SystemInformationClass, 83 PVOID SystemInformation, 84 ULONG SystemInformationLength, 85 PULONG ReturnLength); 87 86 88 87 PFNGST mpfnGetSystemTimes; … … 100 99 CollectorWin::CollectorWin() : CollectorHAL(), mhNtDll(0) 101 100 { 102 mpfnGetSystemTimes = (PFNGST)GetProcAddress( 103 GetModuleHandle(TEXT("kernel32.dll")), 104 "GetSystemTimes"); 101 mpfnGetSystemTimes = (PFNGST)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), 102 "GetSystemTimes"); 105 103 if (!mpfnGetSystemTimes) 106 104 { … … 114 112 } 115 113 else if (!(mpfnNtQuerySystemInformation = (PFNNQSI)GetProcAddress(mhNtDll, 116 "NtQuerySystemInformation")))114 "NtQuerySystemInformation"))) 117 115 { 118 116 LogRel(("Neither GetSystemTimes() nor NtQuerySystemInformation() is" … … 289 287 290 288 LONG ns = CallNtPowerInformation(ProcessorInformation, NULL, 0, ppi, 291 nProcessors * sizeof(PROCESSOR_POWER_INFORMATION));289 nProcessors * sizeof(PROCESSOR_POWER_INFORMATION)); 292 290 if (ns) 293 291 {
Note:
See TracChangeset
for help on using the changeset viewer.