Bug 1207696 Part 4l - Don't record some debugging/statistics atomics, r=froydnj.
authorBrian Hackett <bhackett1024@gmail.com>
Sat, 21 Jul 2018 14:26:58 +0000
changeset 427672 a64bcb2b5c4d3d36d69e276d8d07ddedf271a446
parent 427671 f007143a96eb464f6d7b3873bf1722b11e6634fe
child 427673 51c0852ddbf6f76c2a34cea1b4402e1017664e29
push id34310
push userrgurzau@mozilla.com
push dateSun, 22 Jul 2018 09:46:49 +0000
treeherdermozilla-central@a10e41860e7d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1207696
milestone63.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 1207696 Part 4l - Don't record some debugging/statistics atomics, r=froydnj.
xpcom/ds/PLDHashTable.h
xpcom/string/nsSubstring.cpp
--- a/xpcom/ds/PLDHashTable.h
+++ b/xpcom/ds/PLDHashTable.h
@@ -181,18 +181,22 @@ private:
   // - kIdle and kRead1 are deliberately chosen so that incrementing the -
   //   former gives the latter.
   // - 9999 concurrent readers should be enough for anybody.
   static const uint32_t kIdle    = 0;
   static const uint32_t kRead1   = 1;
   static const uint32_t kReadMax = 9999;
   static const uint32_t kWrite   = 10000;
 
-  mutable mozilla::Atomic<uint32_t> mState;
-  mutable mozilla::Atomic<uint32_t> mIsWritable;
+  mutable mozilla::Atomic<uint32_t,
+                          mozilla::SequentiallyConsistent,
+                          mozilla::recordreplay::Behavior::DontPreserve> mState;
+  mutable mozilla::Atomic<uint32_t,
+                          mozilla::SequentiallyConsistent,
+                          mozilla::recordreplay::Behavior::DontPreserve> mIsWritable;
 };
 #endif
 
 // A PLDHashTable may be allocated on the stack or within another structure or
 // class. No entry storage is allocated until the first element is added. This
 // means that empty hash tables are cheap, which is good because they are
 // common.
 //
--- a/xpcom/string/nsSubstring.cpp
+++ b/xpcom/string/nsSubstring.cpp
@@ -99,22 +99,26 @@ public:
       printf("  --  LEAKED %d !!!\n", mAdoptCount - mAdoptFreeCount);
     } else {
       printf("\n");
     }
     printf(" => Process ID: %" PRIuPTR ", Thread ID: %" PRIuPTR "\n",
            uintptr_t(getpid()), uintptr_t(pthread_self()));
   }
 
-  Atomic<int32_t> mAllocCount;
-  Atomic<int32_t> mReallocCount;
-  Atomic<int32_t> mFreeCount;
-  Atomic<int32_t> mShareCount;
-  Atomic<int32_t> mAdoptCount;
-  Atomic<int32_t> mAdoptFreeCount;
+  typedef Atomic<int32_t,
+                 mozilla::SequentiallyConsistent,
+                 mozilla::recordreplay::Behavior::DontPreserve> AtomicInt;
+
+  AtomicInt mAllocCount;
+  AtomicInt mReallocCount;
+  AtomicInt mFreeCount;
+  AtomicInt mShareCount;
+  AtomicInt mAdoptCount;
+  AtomicInt mAdoptFreeCount;
 };
 static nsStringStats gStringStats;
 #define STRING_STAT_INCREMENT(_s) (gStringStats.m ## _s ## Count)++
 #else
 #define STRING_STAT_INCREMENT(_s)
 #endif
 
 // ---------------------------------------------------------------------------