VirtualBox

Changeset 44467 in vbox


Ignore:
Timestamp:
Jan 30, 2013 2:47:00 PM (12 years ago)
Author:
vboxsync
Message:

Reverted r83474

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/darwin/PerformanceDarwin.cpp

    r44466 r44467  
    2525#include <iprt/err.h>
    2626#include <iprt/log.h>
    27 #include <iprt/mp.h>
    2827#include <iprt/param.h>
    2928#include <iprt/system.h>
     
    9998    }
    10099
    101     int nCpus = RTMpGetOnlineCount();
    102     Assert(nCpus);
    103     if (nCpus)
    104     {
    105         *user = ((uint64_t)info.cpu_ticks[CPU_STATE_USER]
    106                  + info.cpu_ticks[CPU_STATE_NICE]) / nCpus;
    107         *kernel = ((uint64_t)info.cpu_ticks[CPU_STATE_SYSTEM]) / nCpus;
    108         *idle = ((uint64_t)info.cpu_ticks[CPU_STATE_IDLE]) / nCpus;
    109     }
    110     else
    111     {
    112         /* It is rather unsual to have no CPUs, but the show must go on. */
    113         *user = (uint64_t)info.cpu_ticks[CPU_STATE_USER]
    114             + info.cpu_ticks[CPU_STATE_NICE];
    115         *kernel = (uint64_t)info.cpu_ticks[CPU_STATE_SYSTEM];
    116         *idle = (uint64_t)info.cpu_ticks[CPU_STATE_IDLE];
    117     }
    118 
     100    *user = (uint64_t)info.cpu_ticks[CPU_STATE_USER]
     101                    + info.cpu_ticks[CPU_STATE_NICE];
     102    *kernel = (uint64_t)info.cpu_ticks[CPU_STATE_SYSTEM];
     103    *idle = (uint64_t)info.cpu_ticks[CPU_STATE_IDLE];
    119104    return VINF_SUCCESS;
    120105}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette