Bug 1874108 - Only declare the ProfilerBandwidthCounter class when MOZ_GECKO_PROFILER is defined, r=canaltinova,profiler-reviewers.

Differential Revision: https://phabricator.services.mozilla.com/D198263
This commit is contained in:
Florian Quèze 2024-01-11 15:28:58 +00:00
Родитель bd0100a381
Коммит 054aa096cb
1 изменённых файлов: 20 добавлений и 2 удалений

Просмотреть файл

@ -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