Bug 1219079 - Small breakdown-related fixes for the memory tool; r=jsantell
authorNick Fitzgerald <fitzgen@gmail.com>
Wed, 28 Oct 2015 10:59:25 -0700
changeset 269937 acfa9848f2eeaa7dee9dd14a7a2863998bd2bcfe
parent 269936 63f0f345ca872ce7fe12b0cfef3e3a166f1d27e5
child 269938 8486fdc26fa6a41a845ea5efc72953b539988607
push id15946
push usernfitzgerald@mozilla.com
push dateWed, 28 Oct 2015 17:59:38 +0000
treeherderfx-team@acfa9848f2ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjsantell
bugs1219079
milestone44.0a1
Bug 1219079 - Small breakdown-related fixes for the memory tool; r=jsantell * Add "Breakdown by" in front of dropdown selector for the selected breakdown. * "Allocation Site" => "Allocation Stack" for breakdown's label. * Make the coarse type breakdown bucket strings by count.
devtools/client/memory/components/toolbar.js
devtools/client/memory/constants.js
--- a/devtools/client/memory/components/toolbar.js
+++ b/devtools/client/memory/components/toolbar.js
@@ -31,20 +31,23 @@ const Toolbar = module.exports = createC
       onToggleInverted,
       inverted
     } = this.props;
 
     return (
       DOM.div({ className: "devtools-toolbar" }, [
         DOM.button({ className: `take-snapshot devtools-button`, onClick: onTakeSnapshotClick }),
 
-        DOM.select({
-          className: `select-breakdown`,
-          onChange: e => onBreakdownChange(e.target.value),
-        }, breakdowns.map(({ name, displayName }) => DOM.option({ value: name }, displayName))),
+        DOM.label({},
+          "Breakdown by ",
+          DOM.select({
+            className: `select-breakdown`,
+            onChange: e => onBreakdownChange(e.target.value),
+          }, breakdowns.map(({ name, displayName }) => DOM.option({ value: name }, displayName)))
+        ),
 
         DOM.label({}, [
           DOM.input({
             type: "checkbox",
             checked: inverted,
             onChange: onToggleInverted,
           }),
           // TODO bug 1214799
--- a/devtools/client/memory/constants.js
+++ b/devtools/client/memory/constants.js
@@ -44,24 +44,24 @@ const ALLOCATION_STACK = { by: "allocati
 const OBJECT_CLASS = { by: "objectClass", then: COUNT, other: COUNT };
 
 const breakdowns = exports.breakdowns = {
   coarseType: {
     displayName: "Coarse Type",
     breakdown: {
       by: "coarseType",
       objects: ALLOCATION_STACK,
-      strings: ALLOCATION_STACK,
+      strings: COUNT,
       scripts: INTERNAL_TYPE,
       other: INTERNAL_TYPE,
     }
   },
 
   allocationStack: {
-    displayName: "Allocation Site",
+    displayName: "Allocation Stack",
     breakdown: ALLOCATION_STACK,
   },
 
   objectClass: {
     displayName: "Object Class",
     breakdown: OBJECT_CLASS,
   },