Bug 663423: Fix memory reporters r=jlebar
authorTaras Glek <tglek@mozilla.com>
Fri, 01 Jul 2011 16:38:25 -0700
changeset 72734 e5de7146ac1932221df7097e1f50af0c3b9fdc1d
parent 72733 aee2858cf8aa503520721cea7e4735a67d7c4a7d
child 72735 f89d4b284590010c324d0f476fdb199ae943c81f
push id159
push usereakhgari@mozilla.com
push dateTue, 16 Aug 2011 17:53:11 +0000
treeherdermozilla-beta@8786e3e49240 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar
bugs663423
milestone7.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 663423: Fix memory reporters r=jlebar
toolkit/components/telemetry/TelemetryPing.js
--- a/toolkit/components/telemetry/TelemetryPing.js
+++ b/toolkit/components/telemetry/TelemetryPing.js
@@ -235,22 +235,24 @@ TelemetryPing.prototype = {
         val = curVal - prevVal;
         this._prevValues[mr.path] = curVal;
       }
       else {
         NS_ASSERT(false, "Can't handle memory reporter with units " + mr.units);
         continue;
       }
 
-      let h = this._histograms[mr.name];
+      let h = this._histograms[mr.path];
       if (!h) {
         h = Telemetry.getHistogramById(id);
-        this._histograms[mr.name] = h;
+        this._histograms[mr.path] = h;
       }
-      h.add(val);
+      // hack to deal with some memory reporters returning 0
+      if (val)
+        h.add(val);
     }
     return memReporters;
   },
   
   /**
    * Send data to the server. Record success/send-time in histograms
    */
   send: function send(reason, server) {