diff --git a/tools/profiler/public/ProfilerBandwidthCounter.h b/tools/profiler/public/ProfilerBandwidthCounter.h index dca27d553d7e..c83fd02f325e 100644 --- a/tools/profiler/public/ProfilerBandwidthCounter.h +++ b/tools/profiler/public/ProfilerBandwidthCounter.h @@ -2,8 +2,22 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "mozilla/ProfilerMarkers.h" -#include "mozilla/ProfilerCounts.h" +#ifndef ProfilerBandwidthCounter_h +#define ProfilerBandwidthCounter_h + +#ifndef MOZ_GECKO_PROFILER + +namespace mozilla { + +inline void profiler_count_bandwidth_read_bytes(int64_t aCount) {} +inline void profiler_count_bandwidth_written_bytes(int64_t aCount) {} + +} // namespace mozilla + +#else + +# include "mozilla/ProfilerMarkers.h" +# include "mozilla/ProfilerCounts.h" class ProfilerBandwidthCounter final : public BaseProfilerCount { public: @@ -86,3 +100,7 @@ inline void profiler_count_bandwidth_written_bytes(int64_t aCount) { } } // namespace mozilla + +#endif // !MOZ_GECKO_PROFILER + +#endif // ProfilerBandwidthCounter_h