summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
Diffstat (limited to 'storage')
-rw-r--r--storage/TelemetryVFS.cpp12
-rw-r--r--storage/moz.build3
-rw-r--r--storage/mozStorageService.cpp52
3 files changed, 1 insertions, 66 deletions
diff --git a/storage/TelemetryVFS.cpp b/storage/TelemetryVFS.cpp
index f4f28b36c..5a025e29e 100644
--- a/storage/TelemetryVFS.cpp
+++ b/storage/TelemetryVFS.cpp
@@ -110,18 +110,6 @@ public:
// We don't report SQLite I/O on Windows because we have a comprehensive
// mechanism for intercepting I/O on that platform that captures a superset
// of the data captured here.
-#if defined(MOZ_ENABLE_PROFILER_SPS) && !defined(XP_WIN)
- if (IOInterposer::IsObservedOperation(op)) {
- const char* main_ref = "sqlite-mainthread";
- const char* other_ref = "sqlite-otherthread";
-
- // Create observation
- IOInterposeObserver::Observation ob(op, start, end,
- (mainThread ? main_ref : other_ref));
- // Report observation
- IOInterposer::Report(ob);
- }
-#endif /* defined(MOZ_ENABLE_PROFILER_SPS) && !defined(XP_WIN) */
}
private:
diff --git a/storage/moz.build b/storage/moz.build
index 8863105c9..216a1cf74 100644
--- a/storage/moz.build
+++ b/storage/moz.build
@@ -98,8 +98,7 @@ FINAL_LIBRARY = 'xul'
# Note: On Windows our sqlite build assumes we use jemalloc. If you disable
# MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
# MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
-if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_SYSTEM_SQLITE']
- or CONFIG['MOZ_SYSTEM_JEMALLOC']):
+if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_SYSTEM_SQLITE']:
if CONFIG['OS_TARGET'] != 'Android':
DEFINES['MOZ_STORAGE_MEMORY'] = True
diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp
index 4f288ad42..8c6f65232 100644
--- a/storage/mozStorageService.cpp
+++ b/storage/mozStorageService.cpp
@@ -36,9 +36,6 @@
#ifdef MOZ_STORAGE_MEMORY
# include "mozmemory.h"
-# ifdef MOZ_DMD
-# include "DMD.h"
-# endif
#endif
////////////////////////////////////////////////////////////////////////////////
@@ -59,10 +56,6 @@ namespace storage {
////////////////////////////////////////////////////////////////////////////////
//// Memory Reporting
-#ifdef MOZ_DMD
-static mozilla::Atomic<size_t> gSqliteMemoryUsed;
-#endif
-
static int64_t
StorageSQLiteDistinguishedAmount()
{
@@ -165,13 +158,6 @@ Service::CollectReports(nsIHandleReportCallback *aHandleReport,
NS_LITERAL_CSTRING("schema"), schemaDesc,
SQLITE_DBSTATUS_SCHEMA_USED, &totalConnSize);
}
-
-#ifdef MOZ_DMD
- if (::sqlite3_memory_used() != int64_t(gSqliteMemoryUsed)) {
- NS_WARNING("memory consumption reported by SQLite doesn't match "
- "our measurements");
- }
-#endif
}
int64_t other = ::sqlite3_memory_used() - totalConnSize;
@@ -410,58 +396,20 @@ namespace {
// from the standard ones -- they use int instead of size_t. But we don't need
// a wrapper for free.
-#ifdef MOZ_DMD
-
-// sqlite does its own memory accounting, and we use its numbers in our memory
-// reporters. But we don't want sqlite's heap blocks to show up in DMD's
-// output as unreported, so we mark them as reported when they're allocated and
-// mark them as unreported when they are freed.
-//
-// In other words, we are marking all sqlite heap blocks as reported even
-// though we're not reporting them ourselves. Instead we're trusting that
-// sqlite is fully and correctly accounting for all of its heap blocks via its
-// own memory accounting. Well, we don't have to trust it entirely, because
-// it's easy to keep track (while doing this DMD-specific marking) of exactly
-// how much memory SQLite is using. And we can compare that against what
-// SQLite reports it is using.
-
-MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(SqliteMallocSizeOfOnAlloc)
-MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(SqliteMallocSizeOfOnFree)
-
-#endif
-
static void *sqliteMemMalloc(int n)
{
void* p = ::malloc(n);
-#ifdef MOZ_DMD
- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-#endif
return p;
}
static void sqliteMemFree(void *p)
{
-#ifdef MOZ_DMD
- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-#endif
::free(p);
}
static void *sqliteMemRealloc(void *p, int n)
{
-#ifdef MOZ_DMD
- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
- void *pnew = ::realloc(p, n);
- if (pnew) {
- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(pnew);
- } else {
- // realloc failed; undo the SqliteMallocSizeOfOnFree from above
- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
- }
- return pnew;
-#else
return ::realloc(p, n);
-#endif
}
static int sqliteMemSize(void *p)