mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 11:45:37 +00:00
Followup for bug 1257445 - Remove the AutoStopwatch::getCPU implementation using sched_getcpu. r=jimb
It was always preprocessed out because the XP_LINUX condition it was using originally was never satisfied, and when turning that condition to __GLIBC__, which is more realistic, enabling that code path, web-platform-tests crash on Linux64 debug.
This commit is contained in:
parent
0a2e45670b
commit
31d2c022bd
@ -417,11 +417,9 @@ AutoStopwatch::getCPU() const
|
||||
|
||||
cpuid_t result(proc.Group, proc.Number);
|
||||
return result;
|
||||
#elif defined(__GLIBC__)
|
||||
return sched_getcpu();
|
||||
#else
|
||||
return {};
|
||||
#endif // defined(XP_WIN) || defined(__GLIBC__)
|
||||
#endif // defined(XP_WIN)
|
||||
}
|
||||
|
||||
bool inline
|
||||
@ -429,8 +427,6 @@ AutoStopwatch::isSameCPU(const cpuid_t& a, const cpuid_t& b) const
|
||||
{
|
||||
#if defined(XP_WIN) && WINVER >= _WIN32_WINNT_VISTA
|
||||
return a.group_ == b.group_ && a.number_ == b.number_;
|
||||
#elif defined(__GLIBC__)
|
||||
return a == b;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
|
@ -314,11 +314,9 @@ struct cpuid_t {
|
||||
number_(0)
|
||||
{ }
|
||||
};
|
||||
#elif defined(__linux__)
|
||||
typedef int cpuid_t;
|
||||
#else
|
||||
typedef struct {} cpuid_t;
|
||||
#endif // defined(WINVER >= 0x0600) || defined(__linux__)
|
||||
#endif // defined(WINVER >= 0x0600)
|
||||
|
||||
/**
|
||||
* RAII class to start/stop measuring performance when
|
||||
|
Loading…
Reference in New Issue
Block a user