Bug 844768 - Make JSRuntime::gcNumArenasFreeCommitted atomic r=billm
authorJon Coppeard <jcoppeard@mozilla.com>
Tue, 05 Nov 2013 10:16:53 +0000
changeset 153533 94032114aaf5f2a8e41811e86f02aa367e15325a
parent 153532 6fe3a73c35d88a3b5c54a18c4f9eadabab1431f0
child 153534 75d5fed1950e0e0cbad884df0d77d1579c4d5f50
push id35822
push userjcoppeard@mozilla.com
push dateTue, 05 Nov 2013 10:54:34 +0000
treeherdermozilla-inbound@94032114aaf5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs844768
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 844768 - Make JSRuntime::gcNumArenasFreeCommitted atomic r=billm
js/src/vm/Runtime.h
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -990,20 +990,18 @@ struct JSRuntime : public JS::shadow::Ru
     /* This is updated by both the main and GC helper threads. */
     mozilla::Atomic<size_t, mozilla::ReleaseAcquire> gcBytes;
 
     size_t              gcMaxBytes;
     size_t              gcMaxMallocBytes;
 
     /*
      * Number of the committed arenas in all GC chunks including empty chunks.
-     * The counter is volatile as it is read without the GC lock, see comments
-     * in MaybeGC.
      */
-    volatile uint32_t   gcNumArenasFreeCommitted;
+    mozilla::Atomic<uint32_t, mozilla::ReleaseAcquire> gcNumArenasFreeCommitted;
     js::GCMarker        gcMarker;
     void                *gcVerifyPreData;
     void                *gcVerifyPostData;
     bool                gcChunkAllocationSinceLastGC;
     int64_t             gcNextFullGCTime;
     int64_t             gcLastGCTime;
     int64_t             gcJitReleaseTime;
     JSGCMode            gcMode;