Bug 835796 - Negative value in about:memory storage/sqlite/other due to double-counting of shared-cache connections. r=asuth draft
authorMarco Bonardo <mbonardo@mozilla.com>
Thu, 03 Nov 2016 23:14:35 +0100
changeset 433912 bf1150a3c00b1a8f66cc86ec5fff8d4d1dd24360
parent 433911 257535e20b6097a0cdcfaeba27d153e94e510ab5
child 535976 05be4ec83cefab82797886bd298133c5457629ec
push id34674
push usermak77@bonardo.net
push dateFri, 04 Nov 2016 12:28:15 +0000
reviewersasuth
bugs835796
milestone52.0a1
Bug 835796 - Negative value in about:memory storage/sqlite/other due to double-counting of shared-cache connections. r=asuth MozReview-Commit-ID: 2rO5sApv6rn
storage/mozStorageService.cpp
--- a/storage/mozStorageService.cpp
+++ b/storage/mozStorageService.cpp
@@ -151,17 +151,17 @@ Service::CollectReports(nsIHandleReportC
                  NS_LITERAL_CSTRING("stmt"), stmtDesc,
                  SQLITE_DBSTATUS_STMT_USED, &totalConnSize);
 
       NS_NAMED_LITERAL_CSTRING(cacheDesc,
         "Memory (approximate) used by all pager caches used by connections "
         "to this database.");
       ReportConn(aHandleReport, aData, conn, pathHead,
                  NS_LITERAL_CSTRING("cache"), cacheDesc,
-                 SQLITE_DBSTATUS_CACHE_USED, &totalConnSize);
+                 SQLITE_DBSTATUS_CACHE_USED_SHARED, &totalConnSize);
 
       NS_NAMED_LITERAL_CSTRING(schemaDesc,
         "Memory (approximate) used to store the schema for all databases "
         "associated with connections to this database.");
       ReportConn(aHandleReport, aData, conn, pathHead,
                  NS_LITERAL_CSTRING("schema"), schemaDesc,
                  SQLITE_DBSTATUS_SCHEMA_USED, &totalConnSize);
     }