mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 12:55:46 +00:00
Bug 939385 (part 3) - Expose vsizeMaxContiguous to about:memory. r=froydnj.
--HG-- extra : rebase_source : 77331283b56ddf28a137a0165ef9926d6e0f0f42
This commit is contained in:
parent
8545d77585
commit
1f1f9e46d4
@ -104,7 +104,8 @@
|
||||
// If we have more than 1000 chars, we've probably successfully
|
||||
// copy+pasted.
|
||||
if (actual.length > 1000) {
|
||||
let vsizes = actual.match(/vsize/g);
|
||||
// Note: Match "vsize" but not "vsize-max-contiguous".
|
||||
let vsizes = actual.match(/vsize[^-]/g);
|
||||
let endOfBrowsers = actual.match(/End of Browser/g);
|
||||
|
||||
if (vsizes.length == 4 && endOfBrowsers.length == 3) {
|
||||
|
@ -399,6 +399,20 @@ static nsresult GetVsizeMaxContiguous(int64_t* aN)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
class VsizeMaxContiguousReporter MOZ_FINAL : public MemoryUniReporter
|
||||
{
|
||||
public:
|
||||
VsizeMaxContiguousReporter()
|
||||
: MemoryUniReporter("vsize-max-contiguous", KIND_OTHER, UNITS_BYTES,
|
||||
"Size of the maximum contiguous block of available virtual memory.")
|
||||
{}
|
||||
|
||||
NS_IMETHOD GetAmount(int64_t* aAmount)
|
||||
{
|
||||
return GetVsizeMaxContiguous(aAmount);
|
||||
}
|
||||
};
|
||||
|
||||
#define HAVE_PRIVATE_REPORTER
|
||||
class PrivateReporter MOZ_FINAL : public MemoryUniReporter
|
||||
{
|
||||
@ -776,6 +790,10 @@ nsMemoryReporterManager::Init()
|
||||
RegisterReporter(new ResidentReporter);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VSIZE_MAX_CONTIGUOUS_REPORTER
|
||||
RegisterReporter(new VsizeMaxContiguousReporter);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RESIDENT_UNIQUE_REPORTER
|
||||
RegisterReporter(new ResidentUniqueReporter);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user