Bug 1073594, part 1 - Remove mean and stddev for BloatView addrefs and releases. r=dbaron
authorAndrew McCreight <continuation@gmail.com>
Wed, 04 Mar 2015 14:07:59 -0800
changeset 231922 9f6d6c54a10dcb30ad909609ccec249dc594c25a
parent 231921 d0d72ca21cb76fb886dcbe4589daad53a447b11f
child 231923 25e5a9346a6af24861e7daf853e49519e18d3b99
push id28364
push usercbook@mozilla.com
push dateThu, 05 Mar 2015 14:12:01 +0000
treeherdermozilla-central@fa59461863f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1073594
milestone39.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 1073594, part 1 - Remove mean and stddev for BloatView addrefs and releases. r=dbaron
xpcom/base/nsTraceRefcnt.cpp
--- a/xpcom/base/nsTraceRefcnt.cpp
+++ b/xpcom/base/nsTraceRefcnt.cpp
@@ -402,68 +402,57 @@ public:
     nsTraceRefcntStats& stats =
       (aType == nsTraceRefcnt::NEW_STATS) ? mNewStats : mAllStats;
     if (gLogLeaksOnly && !HaveLeaks(&stats)) {
       return false;
     }
 
     fprintf(aOut,
             "\n" \
-            "     |<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<--------------References-------------->|\n" \
-            "                                              Per-Inst   Leaked    Total      Rem      Mean       StdDev     Total      Rem      Mean       StdDev\n");
+            "     |<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<---References-->|\n" \
+            "                                              Per-Inst   Leaked    Total      Rem      Mean       StdDev     Total      Rem\n");
 
     this->DumpTotal(aOut);
 
     return true;
   }
 
   void Dump(int aIndex, FILE* aOut, nsTraceRefcnt::StatisticsType aType)
   {
     nsTraceRefcntStats* stats =
       (aType == nsTraceRefcnt::NEW_STATS) ? &mNewStats : &mAllStats;
     if (gLogLeaksOnly && !HaveLeaks(stats)) {
       return;
     }
 
-    double meanRefs;
-    double stddevRefs;
-    NS_MeanAndStdDev(stats->mAddRefs + stats->mReleases,
-                     stats->mRefsOutstandingTotal,
-                     stats->mRefsOutstandingSquared,
-                     &meanRefs, &stddevRefs);
-
     double meanObjs;
     double stddevObjs;
     NS_MeanAndStdDev(stats->mCreates + stats->mDestroys,
                      stats->mObjsOutstandingTotal,
                      stats->mObjsOutstandingSquared,
                      &meanObjs, &stddevObjs);
 
     if ((stats->mAddRefs - stats->mReleases) != 0 ||
         stats->mAddRefs != 0 ||
-        meanRefs != 0 ||
-        stddevRefs != 0 ||
         (stats->mCreates - stats->mDestroys) != 0 ||
         stats->mCreates != 0 ||
         meanObjs != 0 ||
         stddevObjs != 0) {
-      fprintf(aOut, "%4d %-40.40s %8d %8" PRIu64 " %8" PRIu64 " %8" PRIu64 " (%8.2f +/- %8.2f) %8" PRIu64 " %8" PRIu64 " (%8.2f +/- %8.2f)\n",
+      fprintf(aOut, "%4d %-40.40s %8d %8" PRIu64 " %8" PRIu64 " %8" PRIu64 " (%8.2f +/- %8.2f) %8" PRIu64 " %8" PRIu64 "\n",
               aIndex + 1, mClassName,
               (int32_t)mClassSize,
               (nsCRT::strcmp(mClassName, "TOTAL"))
                 ? (uint64_t)((stats->mCreates - stats->mDestroys) * mClassSize)
                 : mTotalLeaked,
               stats->mCreates,
               (stats->mCreates - stats->mDestroys),
               meanObjs,
               stddevObjs,
               stats->mAddRefs,
-              (stats->mAddRefs - stats->mReleases),
-              meanRefs,
-              stddevRefs);
+              (stats->mAddRefs - stats->mReleases));
     }
   }
 
 protected:
   char*         mClassName;
   double        mClassSize;     // this is stored as a double because of the way we compute the avg class size for total bloat
   uint64_t      mTotalLeaked; // used only for TOTAL entry
   nsTraceRefcntStats mNewStats;