Bug 1073594 - Part 1: Remove mean and stddev for BloatView addrefs and releases. r=dbaron, a=lizzard
authorAndrew McCreight <continuation@gmail.com>
Wed, 04 Mar 2015 14:07:59 -0800
changeset 248082 1abea956f06f654e953b27868879fea02d6771c7
parent 248081 c871e36ce5c75cc4d87d3dfecca934c778e1eecb
child 248083 ae154f933e659d3f57fc86e927889d7752427139
push id7757
push userryanvm@gmail.com
push dateFri, 13 Mar 2015 21:08:08 +0000
treeherdermozilla-aurora@e60410974749 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron, lizzard
bugs1073594
milestone38.0a2
Bug 1073594 - Part 1: Remove mean and stddev for BloatView addrefs and releases. r=dbaron, a=lizzard
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;