Bug 1204994 - part 0 - separate debugging use counters check from value check; r=bz
authorNathan Froyd <froydnj@mozilla.com>
Tue, 15 Sep 2015 20:20:44 -0400
changeset 295531 b217dfd70e226c8ec3ef02c2f5e59a2a0c0c87d0
parent 295530 71f39e19070eac1697666f90ff1bc9014a20f935
child 295532 06bb41ed2935b2b9622b13121166e63151c0b6dd
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1204994
milestone43.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 1204994 - part 0 - separate debugging use counters check from value check; r=bz This change is only here to make future changes more obvious. It is a no-op on its own: just adding a block and shifting whitespace around.
dom/base/nsDocument.cpp
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -13046,41 +13046,45 @@ nsDocument::ReportUseCounters()
     for (int32_t c = 0;
          c < eUseCounter_Count; ++c) {
       UseCounter uc = static_cast<UseCounter>(c);
       
       Telemetry::ID id =
         static_cast<Telemetry::ID>(Telemetry::HistogramFirstUseCounter + uc * 2);
       bool value = GetUseCounter(uc);
 
-      if (sDebugUseCounters && value) {
-        const char* name = Telemetry::GetHistogramName(id);
-        if (name) {
-          printf("  %s", name);
-        } else {
-          printf("  #%d", id);
+      if (value) {
+        if (sDebugUseCounters) {
+          const char* name = Telemetry::GetHistogramName(id);
+          if (name) {
+            printf("  %s", name);
+          } else {
+            printf("  #%d", id);
+          }
+          printf(": %d\n", value);
         }
-        printf(": %d\n", value);
       }
 
       Telemetry::Accumulate(id, value);
 
       if (IsTopLevelContentDocument()) {
         id = static_cast<Telemetry::ID>(Telemetry::HistogramFirstUseCounter +
                                         uc * 2 + 1);
         value = GetUseCounter(uc) || GetChildDocumentUseCounter(uc);
 
-        if (sDebugUseCounters && value) {
-          const char* name = Telemetry::GetHistogramName(id);
-          if (name) {
-            printf("  %s", name);
-          } else {
-            printf("  #%d", id);
+        if (value) {
+          if (sDebugUseCounters) {
+            const char* name = Telemetry::GetHistogramName(id);
+            if (name) {
+              printf("  %s", name);
+            } else {
+              printf("  #%d", id);
+            }
+            printf(": %d\n", value);
           }
-          printf(": %d\n", value);
         }
 
         Telemetry::Accumulate(id, value);
       }
     }
   }
 }