mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 17:01:24 +12:00
Decrease log spam in case that per core cpu usage cannot be queried
This commit is contained in:
parent
7a86cffd0a
commit
539ac32806
2 changed files with 5 additions and 1 deletions
|
@ -125,6 +125,11 @@ namespace utils
|
|||
};
|
||||
|
||||
#ifdef _WIN32
|
||||
if (!m_cpu_cores || !m_cpu_query)
|
||||
{
|
||||
perf_log.warning("Can not collect per core cpu usage: The required API is not initialized.");
|
||||
return;
|
||||
}
|
||||
|
||||
PDH_STATUS status = PdhCollectQueryData(m_cpu_query);
|
||||
if (ERROR_SUCCESS != status)
|
||||
|
|
|
@ -19,7 +19,6 @@ namespace utils
|
|||
|
||||
#ifdef _WIN32
|
||||
PDH_HQUERY m_cpu_query = nullptr;
|
||||
PDH_HCOUNTER m_cpu_total = nullptr;
|
||||
PDH_HCOUNTER m_cpu_cores = nullptr;
|
||||
#elif __linux__
|
||||
size_t m_previous_idle_time_total = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue