boklm pushed to branch tor-browser-150.0a1-16.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
fa337cb6
by Damien Carver at 2026-04-21T10:52:19+02:00
4 changed files:
- mozglue/baseprofiler/public/BaseProfilerState.h
- tools/profiler/core/PowerCounters.h
- tools/profiler/moz.build
- tools/profiler/public/ProfilerState.h
Changes:
| ... | ... | @@ -136,7 +136,7 @@ class MOZ_RAII AutoProfilerStats { |
| 136 | 136 | "Record the power used by the entire system with each sample. " \
|
| 137 | 137 | "Only available with Intel CPUs and requires setting " \
|
| 138 | 138 | "the sysctl kernel.perf_event_paranoid to 0."
|
| 139 | -#elif defined(GP_OS_windows)
|
|
| 139 | +#elif defined(GP_OS_windows) && defined(_MSC_VER)
|
|
| 140 | 140 | # define POWER_HELP \
|
| 141 | 141 | "Record the value of every energy meter available on the system with " \
|
| 142 | 142 | "each sample. Only available on Windows 11 with Intel CPUs."
|
| ... | ... | @@ -10,7 +10,7 @@ |
| 10 | 10 | #include "mozilla/UniquePtr.h"
|
| 11 | 11 | #include "mozilla/Vector.h"
|
| 12 | 12 | |
| 13 | -#if defined(GP_OS_windows)
|
|
| 13 | +#if defined(GP_OS_windows) && defined(_MSC_VER)
|
|
| 14 | 14 | class PowerMeterDevice;
|
| 15 | 15 | #endif
|
| 16 | 16 | #if defined(GP_PLAT_arm64_darwin)
|
| ... | ... | @@ -50,20 +50,20 @@ bool GetRailEnergyData(RailEnergyData*, size_t* size_of_arr); |
| 50 | 50 | |
| 51 | 51 | class PowerCounters {
|
| 52 | 52 | public:
|
| 53 | -#if defined(GP_OS_windows) || defined(GP_OS_darwin) || \
|
|
| 53 | +#if (defined(GP_OS_windows) && defined(_MSC_VER)) || defined(GP_OS_darwin) || \
|
|
| 54 | 54 | defined(GP_PLAT_amd64_linux) || defined(GP_PLAT_arm64_android)
|
| 55 | 55 | explicit PowerCounters();
|
| 56 | 56 | #else
|
| 57 | 57 | explicit PowerCounters() {};
|
| 58 | 58 | #endif
|
| 59 | -#if defined(GP_OS_windows) || defined(GP_PLAT_amd64_darwin) || \
|
|
| 60 | - defined(GP_PLAT_arm64_android)
|
|
| 59 | +#if (defined(GP_OS_windows) && defined(_MSC_VER)) || \
|
|
| 60 | + defined(GP_PLAT_amd64_darwin) || defined(GP_PLAT_arm64_android)
|
|
| 61 | 61 | ~PowerCounters();
|
| 62 | 62 | #else
|
| 63 | 63 | ~PowerCounters() = default;
|
| 64 | 64 | #endif
|
| 65 | -#if defined(GP_OS_windows) || defined(GP_PLAT_amd64_darwin) || \
|
|
| 66 | - defined(GP_PLAT_arm64_android)
|
|
| 65 | +#if (defined(GP_OS_windows) && defined(_MSC_VER)) || \
|
|
| 66 | + defined(GP_PLAT_amd64_darwin) || defined(GP_PLAT_arm64_android)
|
|
| 67 | 67 | void Sample();
|
| 68 | 68 | #else
|
| 69 | 69 | void Sample() {};
|
| ... | ... | @@ -75,7 +75,7 @@ class PowerCounters { |
| 75 | 75 | private:
|
| 76 | 76 | CountVector mCounters;
|
| 77 | 77 | |
| 78 | -#if defined(GP_OS_windows)
|
|
| 78 | +#if defined(GP_OS_windows) && defined(_MSC_VER)
|
|
| 79 | 79 | mozilla::Vector<mozilla::UniquePtr<PowerMeterDevice>> mPowerMeterDevices;
|
| 80 | 80 | #endif
|
| 81 | 81 | #if defined(GP_PLAT_amd64_darwin)
|
| ... | ... | @@ -167,6 +167,7 @@ elif CONFIG["OS_TARGET"] == "WINNT" and CONFIG["TARGET_CPU"] in ( |
| 167 | 167 | UNIFIED_SOURCES += [
|
| 168 | 168 | "gecko/nsProfiler.cpp",
|
| 169 | 169 | ]
|
| 170 | + # Keep in sync with PowerCounters.h, BaseProfilerState.h and ProfilerState.h (see __MINGW32__)
|
|
| 170 | 171 | if CONFIG["CC_TYPE"] == "clang-cl":
|
| 171 | 172 | UNIFIED_SOURCES += [
|
| 172 | 173 | "core/PowerCounters-win.cpp",
|
| ... | ... | @@ -31,7 +31,7 @@ |
| 31 | 31 | "Only available with Intel CPUs and requires setting " \
|
| 32 | 32 | "the sysctl kernel.perf_event_paranoid to 0."
|
| 33 | 33 | |
| 34 | -#elif defined(GP_OS_windows)
|
|
| 34 | +#elif defined(GP_OS_windows) && defined(_MSC_VER)
|
|
| 35 | 35 | # define POWER_HELP \
|
| 36 | 36 | "Record the value of every energy meter available on the system with " \
|
| 37 | 37 | "each sample. Only available on Windows 11 with Intel CPUs."
|