mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1203834 - Fix's rapl's handling of unsupported power domains. r=glandium.
The "gpu" and "ram" domains aren't supported by all platforms. rapl has a special constant |kUnsupported_j| to represent this on Linux, but I accidentally have a minus sign in front of it in several places, which means that instead of printing "n/a" for unsupported planes we always print "1.0". I think this happened because I used to hardwire -1 in there and then I later changed it to a constant but forgot to remove the minus signs. It sure would be nice to have automated testing for this stuff, but I don't see how to do it.
This commit is contained in:
parent
1cbe3c4479
commit
b62c00faf8
@ -390,12 +390,12 @@ public:
|
||||
aCores_J = Joules(mPkes->pp0_energy - mPrevPp0Ticks, joulesPerTick);
|
||||
aGpu_J = mIsGpuSupported
|
||||
? Joules(mPkes->pp1_energy - mPrevPp1Ticks, joulesPerTick)
|
||||
: -kUnsupported_j;
|
||||
: kUnsupported_j;
|
||||
aRam_J = mIsRamSupported
|
||||
? Joules(mPkes->ddr_energy - mPrevDdrTicks,
|
||||
mHasRamUnitsQuirk ? kQuirkyRamJoulesPerTick
|
||||
: joulesPerTick)
|
||||
: -kUnsupported_j;
|
||||
: kUnsupported_j;
|
||||
|
||||
mPrevPkgTicks = mPkes->pkg_energy;
|
||||
mPrevPp0Ticks = mPkes->pp0_energy;
|
||||
@ -518,7 +518,7 @@ public:
|
||||
double EnergyEstimate()
|
||||
{
|
||||
if (!mIsSupported) {
|
||||
return -kUnsupported_j;
|
||||
return kUnsupported_j;
|
||||
}
|
||||
|
||||
uint64_t thisTicks;
|
||||
|
Loading…
Reference in New Issue
Block a user