diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 20:37:24 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 20:37:24 +0000 |
commit | f5451060c844cf9695bdc6df47001f11ca4f5f1c (patch) | |
tree | b881091a5a8cecee47191b027155d16b990961dd /chrome/browser/task_manager.h | |
parent | f02e5d62f711866b573c7fe128588be2f837592d (diff) | |
download | chromium_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.h')
-rw-r--r-- | chrome/browser/task_manager.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/task_manager.h b/chrome/browser/task_manager.h index 0bba99e..a667a78 100644 --- a/chrome/browser/task_manager.h +++ b/chrome/browser/task_manager.h @@ -52,6 +52,9 @@ class TaskManager { return WebKit::WebCache::ResourceTypeStats(); } + virtual bool ReportsSqliteMemoryUsed() const { return false; } + virtual size_t SqliteMemoryUsedBytes() const { return 0; } + // A helper function for ActivateFocusedTab. Returns NULL by default // because not all resources have an assoiciated tab. virtual TabContents* GetTabContents() const { return NULL; } @@ -191,6 +194,7 @@ class TaskManagerModel : public URLRequestJobTracker::JobObserver, std::wstring GetResourceWebCoreImageCacheSize(int index) const; std::wstring GetResourceWebCoreScriptsCacheSize(int index) const; std::wstring GetResourceWebCoreCSSCacheSize(int index) const; + std::wstring GetResourceSqliteMemoryUsed(int index) const; std::wstring GetResourceGoatsTeleported(int index) const; // Returns true if the resource is first in its group (resources |