Open Bug 1277713 Opened 4 years ago Updated 2 years ago

make nsAtomTable's gUnusedAtomCount use Relaxed memory synchronization instead of ReleaseAcquire

Categories

(Core :: XPCOM, defect, P3)

defect

Tracking

()

Tracking Status
firefox49 --- affected

People

(Reporter: dbaron, Unassigned)

References

Details

(Keywords: perf)

In bug 1275755 comment 36, I wrote:
> And, additionally, I don't see why gUnusedAtomCount can't use Relaxed
> semantics -- even without any of those immutability assumptions.  It seems
> like the key thing that's needed there is that there's a memory barrier from
> unlocking/locking the AtomTableLock, and when the atom table hands out a new
> atom, it does the initial AddRef of that atom on the thread on which it's
> handing it out while holding the atom table lock (which NS_Atomize does),
> which in turn assures that DynamicAtom::GCAtomTable (which holds the atom
> table lock) sees that reflected in the reference count.
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.