Changeset 11498 in vbox for trunk/src/VBox/Main/linux
- Timestamp:
- Aug 19, 2008 6:50:33 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 34999
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/linux/PerformanceLinux.cpp
r11483 r11498 25 25 #include <iprt/alloc.h> 26 26 #include <iprt/err.h> 27 #include <iprt/mp.h>28 27 #include <iprt/param.h> 29 28 #include <iprt/string.h> … … 35 34 { 36 35 public: 37 virtual int getHostCpuMHz(ULONG *mhz);38 36 virtual int getHostMemoryUsage(ULONG *total, ULONG *used, ULONG *available); 39 37 virtual int getProcessMemoryUsage(RTPROCESS process, ULONG *used); … … 93 91 94 92 return rc; 95 }96 97 int CollectorLinux::getHostCpuMHz(ULONG *mhz)98 {99 RTCPUID nProcessors = RTMpGetCount();100 uint64_t uTotalMHz = 0;101 102 for (RTCPUID i = 0; i < nProcessors; ++i)103 uTotalMHz += RTMpGetCurFrequency(RTMpCpuIdFromSetIndex(i));104 105 *mhz = (ULONG)(uTotalMHz / nProcessors);106 return VINF_SUCCESS;107 93 } 108 94
Note:
See TracChangeset
for help on using the changeset viewer.