Bug 649867 - Remove the heap-used/storage/lookaside-used memory reporter. r=sdwilsh.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 22 May 2011 19:50:14 -0700
changeset 70138 11d04991cdd03376276ce319769a03079de35825
parent 70137 eb1e4d0e8f5ce5c00bd5b9305378e7624d64edd4
child 70208 0f9347d4012161d63903d1f187c7d35828e90ade
push id76
push userbzbarsky@mozilla.com
push dateTue, 05 Jul 2011 17:00:57 +0000
treeherdermozilla-beta@d3a2732c35f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssdwilsh
bugs649867
milestone6.0a1
first release with
nightly linux32
11d04991cdd0 / 6.0a1 / 20110523030619 / files
nightly linux64
11d04991cdd0 / 6.0a1 / 20110523030619 / files
nightly mac
11d04991cdd0 / 6.0a1 / 20110523030619 / files
nightly win32
11d04991cdd0 / 6.0a1 / 20110523030619 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 649867 - Remove the heap-used/storage/lookaside-used memory reporter. r=sdwilsh.
storage/src/mozStorageConnection.cpp
--- a/storage/src/mozStorageConnection.cpp
+++ b/storage/src/mozStorageConnection.cpp
@@ -330,17 +330,16 @@ private:
 //// Memory Reporting
 
 class StorageMemoryReporter : public nsIMemoryReporter
 {
 public:
   NS_DECL_ISUPPORTS
 
   enum ReporterType {
-    LookAside_Used,
     Cache_Used,
     Schema_Used,
     Stmt_Used
   };
 
   StorageMemoryReporter(Connection &aDBConn,
                         ReporterType aType)
   : mDBConn(aDBConn)
@@ -351,20 +350,17 @@ public:
 
   NS_IMETHOD GetPath(char **memoryPath)
   {
     nsCString path;
 
     path.AppendLiteral("explicit/storage/sqlite/");
     path.Append(mDBConn.getFilename());
 
-    if (mType == LookAside_Used) {
-      path.AppendLiteral("/lookaside-used");
-    }
-    else if (mType == Cache_Used) {
+    if (mType == Cache_Used) {
       path.AppendLiteral("/cache-used");
     }
     else if (mType == Schema_Used) {
       path.AppendLiteral("/schema-used");
     }
     else if (mType == Stmt_Used) {
       path.AppendLiteral("/stmt-used");
     }
@@ -376,39 +372,33 @@ public:
   NS_IMETHOD GetKind(PRInt32 *kind)
   {
     *kind = MR_HEAP;
     return NS_OK;
   }
 
   NS_IMETHOD GetDescription(char **desc)
   {
-    if (mType == LookAside_Used) {
-      *desc = ::strdup("Number of lookaside memory slots currently checked out.");
-    }
-    else if (mType == Cache_Used) {
+    if (mType == Cache_Used) {
       *desc = ::strdup("Memory (approximate) used by all pager caches.");
     }
     else if (mType == Schema_Used) {
       *desc = ::strdup("Memory (approximate) used to store the schema "
                        "for all databases associated with the connection");
     }
     else if (mType == Stmt_Used) {
       *desc = ::strdup("Memory (approximate) used by all prepared statements");
     }
     return NS_OK;
   }
 
   NS_IMETHOD GetMemoryUsed(PRInt64 *memoryUsed)
   {
     int type = 0;
-    if (mType == LookAside_Used) {
-      type = SQLITE_DBSTATUS_LOOKASIDE_USED;
-    }
-    else if (mType == Cache_Used) {
+    if (mType == Cache_Used) {
       type = SQLITE_DBSTATUS_CACHE_USED;
     }
     else if (mType == Schema_Used) {
       type = SQLITE_DBSTATUS_SCHEMA_USED;
     }
     else if (mType == Stmt_Used) {
       type = SQLITE_DBSTATUS_STMT_USED;
     }
@@ -578,22 +568,16 @@ Connection::initialize(nsIFile *aDatabas
     case 1:
     default:
       (void)ExecuteSimpleSQL(NS_LITERAL_CSTRING(
           "PRAGMA synchronous = NORMAL;"));
       break;
   }
 
   nsRefPtr<nsIMemoryReporter> reporter;
-#if 0
-  // FIXME: Bug 649867 explains why this is disabled.
-  reporter =
-    new StorageMemoryReporter(*this, StorageMemoryReporter::LookAside_Used);
-  mMemoryReporters.AppendElement(reporter);
-#endif
 
   reporter =
     new StorageMemoryReporter(*this, StorageMemoryReporter::Cache_Used);
   mMemoryReporters.AppendElement(reporter);
 
   reporter =
     new StorageMemoryReporter(*this, StorageMemoryReporter::Schema_Used);
   mMemoryReporters.AppendElement(reporter);