This moves critical parts of PerfStats into mozglue so that they can be used by things that don't have access to full XUL. At the same time make everything lockless and limit RecordMeasurementStart/End to the main thread to prevent race conditions on the start times. Differential Revision: https://phabricator.services.mozilla.com/D294018
12 lines
482 B
C++
12 lines
482 B
C++
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* 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/PerfStats.h"
|
|
|
|
namespace mozilla::detail {
|
|
MFBT_DATA Atomic<uint64_t, MemoryOrdering::Relaxed> sPerfStatsCollectionMask{0};
|
|
MFBT_DATA Atomic<PerfStats*, MemoryOrdering::SequentiallyConsistent>
|
|
sPerfStatsSingleton{nullptr};
|
|
} // namespace mozilla::detail
|