diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 16:40:59 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 16:40:59 +0000 |
commit | 69e1906df2f65d859a214f02754b8934aea5d33d (patch) | |
tree | fa293c8b4213a801a1274569237ca5b17c3e732d /third_party | |
parent | eefdf65e3cc5d092ae015d3af45391c406b7b2f5 (diff) | |
download | chromium_src-69e1906df2f65d859a214f02754b8934aea5d33d.zip chromium_src-69e1906df2f65d859a214f02754b8934aea5d33d.tar.gz chromium_src-69e1906df2f65d859a214f02754b8934aea5d33d.tar.bz2 |
Get more precise count of commited bytes in stats
Account for bytes allocated for meta info when calculating
the number of committed bytes.
[This is partly CL http://codereview.chromium.org/384086
by Antonm, and I'm just landing it for him.]
Also changed mechanism of gathering commited bytes to be sure
we are under a lock (via ExtractStats) while fetching data.
r=antonm,sgk
Review URL: http://codereview.chromium.org/385098
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32328 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/tcmalloc/tcmalloc.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/tcmalloc/tcmalloc.cc b/third_party/tcmalloc/tcmalloc.cc index 97cc414..66e0ea6 100644 --- a/third_party/tcmalloc/tcmalloc.cc +++ b/third_party/tcmalloc/tcmalloc.cc @@ -586,7 +586,7 @@ class TCMallocImplementation : public MallocExtension { if (strcmp(name, "generic.committed_bytes") == 0) { TCMallocStats stats; ExtractStats(&stats, NULL); - *value = Static::pageheap()->CommittedBytes(); + *value = stats.committed_bytes + stats.metadata_bytes; return true; } |