VirtualBox

Changeset 94088 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 4, 2022 2:04:59 PM (3 years ago)
Author:
vboxsync
Message:

Main/Performace.cpp: Don't assert in CollectorHAL::getHostCpuMHz() on darwin, as RTMpGetCurFrequency isn't implemented and probably won't be any time soon. bugref:9898

File:
1 edited

Legend:

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

    r93115 r94088  
    130130    }
    131131
    132     AssertReturn(cCpus, VERR_NOT_IMPLEMENTED);
    133     *mhz = (ULONG)(u64TotalMHz / cCpus);
    134 
    135     return VINF_SUCCESS;
     132    if (cCpus)
     133    {
     134        *mhz = (ULONG)(u64TotalMHz / cCpus);
     135        return VINF_SUCCESS;
     136    }
     137
     138    /* This is always the case on darwin, so don't assert there. */
     139#ifndef RT_OS_DARWIN
     140    AssertFailed();
     141#endif
     142    *mhz = 0;
     143    return VERR_NOT_IMPLEMENTED;
    136144}
    137145
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