summaryrefslogtreecommitdiffstats
path: root/chrome/browser/task_manager_resource_providers.cc
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 20:37:24 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-15 20:37:24 +0000
commitf5451060c844cf9695bdc6df47001f11ca4f5f1c (patch)
treeb881091a5a8cecee47191b027155d16b990961dd /chrome/browser/task_manager_resource_providers.cc
parentf02e5d62f711866b573c7fe128588be2f837592d (diff)
downloadchromium_src-f5451060c844cf9695bdc6df47001f11ca4f5f1c.zip
chromium_src-f5451060c844cf9695bdc6df47001f11ca4f5f1c.tar.gz
chromium_src-f5451060c844cf9695bdc6df47001f11ca4f5f1c.tar.bz2
Tracks the amount of memory SQLite is using in the browser process
This patch adds support for SQLite memory use tracking in the task manager and enables it for the browser process. SQLite can get into the 10s of MB of memory pretty easily and it is nice to see exactly how much of a 'fat' browser process it is responsible for. SQLite is also used in the renderer process for web databases, but since those are behind a flag and off by default I haven't added support for them yet. TEST=none BUG=none Review URL: http://codereview.chromium.org/276009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/task_manager_resource_providers.cc')
-rw-r--r--chrome/browser/task_manager_resource_providers.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/task_manager_resource_providers.cc b/chrome/browser/task_manager_resource_providers.cc
index 62af8fa..931d325 100644
--- a/chrome/browser/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager_resource_providers.cc
@@ -36,6 +36,7 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/render_messages.h"
+#include "chrome/common/sqlite_utils.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -701,6 +702,10 @@ SkBitmap TaskManagerBrowserProcessResource::GetIcon() const {
return *default_icon_;
}
+size_t TaskManagerBrowserProcessResource::SqliteMemoryUsedBytes() const {
+ return static_cast<size_t>(sqlite3_memory_used());
+}
+
base::ProcessHandle TaskManagerBrowserProcessResource::GetProcess() const {
return base::GetCurrentProcessHandle(); // process_;
}