Bug 1207696 Part 4e - Don't record various JS atomics, r=jandem.

--HG--
extra : rebase_source : 7ced4108600a1182efafea06f1651a5ec7e06940
This commit is contained in:
Brian Hackett 2018-07-21 14:24:16 +00:00
Родитель 4be736018d
Коммит 0709a8aee5
12 изменённых файлов: 47 добавлений и 20 удалений

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

@ -24,7 +24,9 @@ namespace js {
struct JSPrincipals {
/* Don't call "destroy"; use reference counting macros below. */
mozilla::Atomic<int32_t> refcount;
mozilla::Atomic<int32_t,
mozilla::SequentiallyConsistent,
mozilla::recordreplay::Behavior::DontPreserve> refcount;
#ifdef JS_DEBUG
/* A helper to facilitate principals debugging. */

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

@ -263,7 +263,8 @@ class ArenaLists
ParallelAlloc
};
using ConcurrentUseState = mozilla::Atomic<ConcurrentUse, mozilla::SequentiallyConsistent>;
using ConcurrentUseState = mozilla::Atomic<ConcurrentUse, mozilla::SequentiallyConsistent,
mozilla::recordreplay::Behavior::DontPreserve>;
// Whether this structure can be accessed by other threads.
UnprotectedData<AllAllocKindArray<ConcurrentUseState>> concurrentUseState_;

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

@ -46,7 +46,8 @@ class GCParallelTask
protected:
// A flag to signal a request for early completion of the off-thread task.
mozilla::Atomic<bool, mozilla::MemoryOrdering::ReleaseAcquire> cancel_;
mozilla::Atomic<bool, mozilla::MemoryOrdering::ReleaseAcquire,
mozilla::recordreplay::Behavior::DontPreserve> cancel_;
public:
explicit GCParallelTask(JSRuntime* runtime, TaskFunc func)

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

@ -739,12 +739,15 @@ class GCRuntime
MainThreadData<RootedValueMap> rootsHash;
// An incrementing id used to assign unique ids to cells that require one.
mozilla::Atomic<uint64_t, mozilla::ReleaseAcquire> nextCellUniqueId_;
mozilla::Atomic<uint64_t,
mozilla::ReleaseAcquire,
mozilla::recordreplay::Behavior::DontPreserve> nextCellUniqueId_;
/*
* Number of the committed arenas in all GC chunks including empty chunks.
*/
mozilla::Atomic<uint32_t, mozilla::ReleaseAcquire> numArenasFreeCommitted;
mozilla::Atomic<uint32_t, mozilla::ReleaseAcquire,
mozilla::recordreplay::Behavior::DontPreserve> numArenasFreeCommitted;
MainThreadData<VerifyPreTracer*> verifyPreData;
private:
@ -758,7 +761,9 @@ class GCRuntime
*/
MainThreadData<JSGCMode> mode;
mozilla::Atomic<size_t, mozilla::ReleaseAcquire> numActiveZoneIters;
mozilla::Atomic<size_t,
mozilla::ReleaseAcquire,
mozilla::recordreplay::Behavior::DontPreserve> numActiveZoneIters;
/* During shutdown, the GC needs to clean up every possible object. */
MainThreadData<bool> cleanUpEverything;
@ -792,7 +797,9 @@ class GCRuntime
*/
UnprotectedData<bool> grayBitsValid;
mozilla::Atomic<JS::gcreason::Reason, mozilla::Relaxed> majorGCTriggerReason;
mozilla::Atomic<JS::gcreason::Reason,
mozilla::Relaxed,
mozilla::recordreplay::Behavior::DontPreserve> majorGCTriggerReason;
private:
/* Perform full GC if rt->keepAtoms() becomes false. */

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

@ -820,7 +820,9 @@ class HeapUsage
* level for GC usage. It is atomic because it is updated by both the active
* and GC helper threads.
*/
mozilla::Atomic<size_t, mozilla::ReleaseAcquire> gcBytes_;
mozilla::Atomic<size_t,
mozilla::ReleaseAcquire,
mozilla::recordreplay::Behavior::DontPreserve> gcBytes_;
public:
explicit HeapUsage(HeapUsage* parent)

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

@ -47,7 +47,9 @@ static size_t allocGranularity = 0;
#if defined(XP_UNIX)
// The addresses handed out by mmap may grow up or down.
static mozilla::Atomic<int, mozilla::Relaxed> growthDirection(0);
static mozilla::Atomic<int,
mozilla::Relaxed,
mozilla::recordreplay::Behavior::DontPreserve> growthDirection(0);
#endif
// Data from OOM crashes shows there may be up to 24 chunksized but unusable

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

@ -507,7 +507,8 @@ class MemoryCounter
{
// Bytes counter to measure memory pressure for GC scheduling. It counts
// upwards from zero.
mozilla::Atomic<size_t, mozilla::ReleaseAcquire> bytes_;
mozilla::Atomic<size_t, mozilla::ReleaseAcquire,
mozilla::recordreplay::Behavior::DontPreserve> bytes_;
// GC trigger threshold for memory allocations.
size_t maxBytes_;
@ -516,7 +517,8 @@ class MemoryCounter
MainThreadData<size_t> bytesAtStartOfGC_;
// Which kind of GC has been triggered if any.
mozilla::Atomic<TriggerKind, mozilla::ReleaseAcquire> triggered_;
mozilla::Atomic<TriggerKind, mozilla::ReleaseAcquire,
mozilla::recordreplay::Behavior::DontPreserve> triggered_;
public:
MemoryCounter();
@ -560,7 +562,8 @@ class ZoneHeapThreshold
GCLockData<double> gcHeapGrowthFactor_;
// GC trigger threshold for allocations on the GC heap.
mozilla::Atomic<size_t, mozilla::Relaxed> gcTriggerBytes_;
mozilla::Atomic<size_t, mozilla::Relaxed,
mozilla::recordreplay::Behavior::DontPreserve> gcTriggerBytes_;
public:
ZoneHeapThreshold()

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

@ -160,7 +160,8 @@ class Zone : public JS::shadow::Zone,
Pending,
Active
};
mozilla::Atomic<HelperThreadUse> helperThreadUse_;
mozilla::Atomic<HelperThreadUse, mozilla::SequentiallyConsistent,
mozilla::recordreplay::Behavior::DontPreserve> helperThreadUse_;
// The helper thread context with exclusive access to this zone, if
// usedByHelperThread(), or nullptr when on the main thread.

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

@ -185,7 +185,8 @@ class MIRGenerator
MIRGraph* graph_;
AbortReasonOr<Ok> offThreadStatus_;
ObjectGroupVector abortedPreliminaryGroups_;
mozilla::Atomic<bool, mozilla::Relaxed> cancelBuild_;
mozilla::Atomic<bool, mozilla::Relaxed,
mozilla::recordreplay::Behavior::DontPreserve> cancelBuild_;
uint32_t wasmMaxStackArgBytes_;
bool needsOverrecursedCheck_;

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

@ -601,7 +601,9 @@ struct JSContext : public JS::RootingContext,
/* Whether sampling should be enabled or not. */
private:
mozilla::Atomic<bool, mozilla::SequentiallyConsistent> suppressProfilerSampling;
mozilla::Atomic<bool,
mozilla::SequentiallyConsistent,
mozilla::recordreplay::Behavior::DontPreserve> suppressProfilerSampling;
public:
bool isProfilerSamplingEnabled() const {
@ -818,7 +820,8 @@ struct JSContext : public JS::RootingContext,
js::ThreadData<bool> interruptCallbackDisabled;
// Bitfield storing InterruptReason values.
mozilla::Atomic<uint32_t, mozilla::Relaxed> interruptBits_;
mozilla::Atomic<uint32_t, mozilla::Relaxed,
mozilla::recordreplay::Behavior::DontPreserve> interruptBits_;
// Any thread can call requestInterrupt() to request that this thread
// stop running. To stop this thread, requestInterrupt sets two fields:
@ -899,7 +902,8 @@ struct JSContext : public JS::RootingContext,
ionReturnOverride_ = v;
}
mozilla::Atomic<uintptr_t, mozilla::Relaxed> jitStackLimit;
mozilla::Atomic<uintptr_t, mozilla::Relaxed,
mozilla::recordreplay::Behavior::DontPreserve> jitStackLimit;
// Like jitStackLimit, but not reset to trigger interrupts.
js::ThreadData<uintptr_t> jitStackLimitNoInterrupt;

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

@ -794,7 +794,8 @@ class SharedScriptData
// This class is reference counted as follows: each pointer from a JSScript
// counts as one reference plus there may be one reference from the shared
// script data table.
mozilla::Atomic<uint32_t> refCount_;
mozilla::Atomic<uint32_t, mozilla::SequentiallyConsistent,
mozilla::recordreplay::Behavior::DontPreserve> refCount_;
uint32_t natoms_;
uint32_t codeLength_;
@ -1008,7 +1009,8 @@ class JSScript : public js::gc::TenuredCell
// Number of times the script has been called or has had backedges taken.
// When running in ion, also increased for any inlined scripts. Reset if
// the script's JIT code is forcibly discarded.
mozilla::Atomic<uint32_t, mozilla::Relaxed> warmUpCount = {};
mozilla::Atomic<uint32_t, mozilla::Relaxed,
mozilla::recordreplay::Behavior::DontPreserve> warmUpCount = {};
// 16-bit fields.

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

@ -292,7 +292,8 @@ struct JSRuntime : public js::MallocProvider<JSRuntime>
* considered inaccessible, and those JitcodeGlobalTable entry can be
* disposed of.
*/
mozilla::Atomic<uint64_t, mozilla::ReleaseAcquire> profilerSampleBufferRangeStart_;
mozilla::Atomic<uint64_t, mozilla::ReleaseAcquire,
mozilla::recordreplay::Behavior::DontPreserve> profilerSampleBufferRangeStart_;
mozilla::Maybe<uint64_t> profilerSampleBufferRangeStart() {
if (beingDestroyed_ || !geckoProfiler().enabled()) {