- 時間撮記:
- 2013-1-30 上午07:19:06 (12 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/src-server/solaris/PerformanceSolaris.cpp
r44031 r44450 100 100 101 101 FsMap mFsMap; 102 uint32_t mCpus; 102 103 }; 103 104 … … 114 115 mSysPages(0), 115 116 mZFSCache(0), 116 mZfsLib(0) 117 mZfsLib(0), 118 mCpus(0) 117 119 { 118 120 if ((mKC = kstat_open()) == 0) … … 155 157 156 158 updateFilesystemMap(); 159 /* Notice that mCpus member will be initialized by HostCpuLoadRaw::init() */ 157 160 } 158 161 … … 196 199 return VERR_INTERNAL_ERROR; 197 200 } 201 else 202 mCpus = cpus; 198 203 199 204 if (user) *user = tmpUser; … … 221 226 //Assert((pid_t)process == pstatus.pr_pid); 222 227 //Log(("user=%u kernel=%u total=%u\n", prusage.pr_utime.tv_sec, prusage.pr_stime.tv_sec, prusage.pr_tstamp.tv_sec)); 223 *user = (uint64_t)prusage.pr_utime.tv_sec * 1000000000 + prusage.pr_utime.tv_nsec; 224 *kernel = (uint64_t)prusage.pr_stime.tv_sec * 1000000000 + prusage.pr_stime.tv_nsec; 228 /* 229 * The CPU time spent must be adjusted by the number of cores for compatibility with 230 * other platforms (see @bugref{6345}). 231 */ 232 Assert(mCpus); 233 if (mCpus) 234 { 235 *user = ((uint64_t)prusage.pr_utime.tv_sec * 1000000000 + prusage.pr_utime.tv_nsec) / mCpus; 236 *kernel = ((uint64_t)prusage.pr_stime.tv_sec * 1000000000 + prusage.pr_stime.tv_nsec) / mCpus; 237 } 238 else 239 *user = *kernel = 0; 225 240 *total = (uint64_t)prusage.pr_tstamp.tv_sec * 1000000000 + prusage.pr_tstamp.tv_nsec; 226 241 //Log(("user=%llu kernel=%llu total=%llu\n", *user, *kernel, *total));
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器