Bug 757299 (part 10) - Remove the kind description prefix in about:memory, it's not much use. r=jlebar.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 27 May 2012 18:24:34 -0700
changeset 99159 5859f7d3fb2595b10e47353a96560c442691f488
parent 99158 a9a778e471d1f9706de4bd9b149d2acfb1b91d4c
child 99160 36f327aaffa5d7c0ed4bf1c84b488a18b6332754
push idunknown
push userunknown
push dateunknown
reviewersjlebar
bugs757299
milestone15.0a1
Bug 757299 (part 10) - Remove the kind description prefix in about:memory, it's not much use. r=jlebar.
toolkit/components/aboutmemory/content/aboutMemory.js
--- a/toolkit/components/aboutmemory/content/aboutMemory.js
+++ b/toolkit/components/aboutmemory/content/aboutMemory.js
@@ -557,23 +557,17 @@ function getTreesAndOthersByProcess(aMgr
     
       if (u._amount) {
         // Duplicate!  Sum the values and mark it as a dup.
         u._amount += aAmount;
         u._nMerged = u._nMerged ? u._nMerged + 1 : 2;
       } else {
         // New leaf node.  Fill in extra details node from the report.
         u._amount = aAmount;
-        if (unsafeNames[0] === "explicit") {
-          u._description = kindToString(aKind) + aDescription;
-        } else {
-          // We don't want to show '(Non-heap)' on an smaps tree because
-          // the whole tree is non-heap.
-          u._description = aDescription;
-        }
+        u._description = aDescription;
       }
 
       if (unsafeNames[0] === "explicit" && aKind == KIND_HEAP) {
         if (!aHeapTotalByProcess[process]) {
           aHeapTotalByProcess[process] = 0;
         }
         aHeapTotalByProcess[process] += aAmount;
       }
@@ -724,17 +718,17 @@ function addHeapUnclassifiedNode(aT, aOt
 {
   let heapAllocatedReport = aOthers["heap-allocated"];
   if (heapAllocatedReport === undefined)
     return false;
 
   let heapAllocatedBytes = heapAllocatedReport._amount;
   let heapUnclassifiedT = new TreeNode("heap-unclassified");
   heapUnclassifiedT._amount = heapAllocatedBytes - aHeapTotal;
-  heapUnclassifiedT._description = kindToString(KIND_HEAP) +
+  heapUnclassifiedT._description =
       "Memory not classified by a more specific reporter. This includes " +
       "slop bytes due to internal fragmentation in the heap allocator " +
       "(caused when the allocator rounds up request sizes).";
   aT._kids.push(heapUnclassifiedT);
   aT._amount += heapUnclassifiedT._amount;
   return true;
 }
 
@@ -1055,27 +1049,16 @@ const kNoKidsSep                    = " 
       kShowKidsSep                  = " -- ";
 
 function appendMrValueSpan(aP, aValue, aIsInvalid)
 {
   appendElementWithText(aP, "span", "mrValue" + (aIsInvalid ? " invalid" : ""),
                         aValue);
 }
 
-function kindToString(aKind)
-{
-  switch (aKind) {
-   case KIND_NONHEAP: return "(Non-heap) ";
-   case KIND_HEAP:    return "(Heap) ";
-   case KIND_OTHER:
-   case undefined:
-   default:           assert(false, "bad kind in kindToString");
-  }
-}
-
 function appendMrNameSpan(aP, aDescription, aUnsafeName, aIsInvalid, aNMerged)
 {
   let safeName = flipBackslashes(aUnsafeName);
   if (!aIsInvalid && !aNMerged) {
     safeName += "\n";
   }
   let nameSpan = appendElementWithText(aP, "span", "mrName", safeName);
   nameSpan.title = aDescription;