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 263153 bad1e6a9f0057ecfa01759b2c166dad3e1e13b4a
parent 263152 ebe6bf3f6473b09d2877d1723d6f1352aa95428b
child 263154 e17c2061c0c8911eac7e23940a45581a37e34975
push id65227
push usernfroyd@mozilla.com
push dateFri, 18 Sep 2015 03:43:30 +0000
treeherdermozilla-inbound@e8bb18a02a56 [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
@@ -13021,41 +13021,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);
       }
     }
   }
 }