From 14b40ea06d3bafe0b25831b75fd76df177b0a80b Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Tue, 19 Nov 2013 11:48:01 +0100 Subject: [PATCH] Backed out changeset a06dd3421421 (bug 939385) for perma failures/orange in XPCShell Tests on Linux and OS X on a CLOSED TREE --- .../mochitest/tests/SimpleTest/TestRunner.js | 2 +- xpcom/base/nsIMemoryReporter.idl | 10 ++++--- xpcom/base/nsMemoryReporterManager.cpp | 26 +++++++++---------- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/testing/mochitest/tests/SimpleTest/TestRunner.js b/testing/mochitest/tests/SimpleTest/TestRunner.js index b6f14d0a1a2..28254f43775 100644 --- a/testing/mochitest/tests/SimpleTest/TestRunner.js +++ b/testing/mochitest/tests/SimpleTest/TestRunner.js @@ -405,8 +405,8 @@ var MEM_STAT_UNSUPPORTED = 1; var MEM_STAT_SUPPORTED = 2; TestRunner._hasMemoryStatistics = {} TestRunner._hasMemoryStatistics.vsize = MEM_STAT_UNKNOWN; -TestRunner._hasMemoryStatistics.vsizeMaxContiguous = MEM_STAT_UNKNOWN; TestRunner._hasMemoryStatistics.heapAllocated = MEM_STAT_UNKNOWN; +TestRunner._hasMemoryStatistics.largestContiguousVMBlock = MEM_STAT_UNKNOWN; /** * This stub is called by SimpleTest when a test is finished. diff --git a/xpcom/base/nsIMemoryReporter.idl b/xpcom/base/nsIMemoryReporter.idl index 59330f1b565..66e7ade7ac8 100644 --- a/xpcom/base/nsIMemoryReporter.idl +++ b/xpcom/base/nsIMemoryReporter.idl @@ -263,9 +263,6 @@ interface nsIMemoryReporterManager : nsISupports * |vsize| (UNITS_BYTES) The virtual size, i.e. the amount of address space * taken up. * - * |vsizeMaxContiguous| (UNITS_BYTES) The size of the largest contiguous - * block of virtual memory. - * * |resident| (UNITS_BYTES) The resident size (a.k.a. RSS or physical memory * used). * @@ -303,10 +300,13 @@ interface nsIMemoryReporterManager : nsISupports * * |pageFaultsHard| (UNITS_COUNT_CUMULATIVE) The number of hard (a.k.a. * major) page faults that have occurred since the process started. + * + * |largestContiguousVMBlock| (UNITS_BYTES) The size of the largest + * contiguous block of virtual memory. Only available on Windows; on all + * other platforms, reading this value returns 0. */ readonly attribute int64_t explicit; readonly attribute int64_t vsize; - readonly attribute int64_t vsizeMaxContiguous; readonly attribute int64_t resident; readonly attribute int64_t residentFast; @@ -329,6 +329,8 @@ interface nsIMemoryReporterManager : nsISupports readonly attribute int64_t pageFaultsHard; + readonly attribute int64_t largestContiguousVMBlock; + /* * This attribute indicates if moz_malloc_usable_size() works. */ diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp index 2f3c7b19d99..dfa41367055 100644 --- a/xpcom/base/nsMemoryReporterManager.cpp +++ b/xpcom/base/nsMemoryReporterManager.cpp @@ -371,8 +371,8 @@ static nsresult GetResidentFast(int64_t* aN) return GetResident(aN); } -#define HAVE_VSIZE_MAX_CONTIGUOUS_REPORTER 1 -static nsresult GetVsizeMaxContiguous(int64_t* aN) +#define HAVE_LARGEST_CONTIGUOUS_BLOCK_REPORTERS 1 +static nsresult LargestContiguousVMBlock(int64_t* aN) { SIZE_T biggestRegion = 0; MEMORY_BASIC_INFORMATION vmemInfo = {0}; @@ -1285,17 +1285,6 @@ nsMemoryReporterManager::GetVsize(int64_t* aVsize) #endif } -NS_IMETHODIMP -nsMemoryReporterManager::GetVsizeMaxContiguous(int64_t* aAmount) -{ -#ifdef HAVE_VSIZE_MAX_CONTIGUOUS_REPORTER - return ::GetVsizeMaxContiguous(aAmount); -#else - *aAmount = 0; - return NS_ERROR_NOT_AVAILABLE; -#endif -} - NS_IMETHODIMP nsMemoryReporterManager::GetResident(int64_t* aAmount) { @@ -1422,6 +1411,17 @@ nsMemoryReporterManager::GetPageFaultsHard(int64_t* aAmount) #endif } +NS_IMETHODIMP +nsMemoryReporterManager::GetLargestContiguousVMBlock(int64_t* aAmount) +{ +#ifdef HAVE_LARGEST_CONTIGUOUS_BLOCK_REPORTERS + return LargestContiguousVMBlock(aAmount); +#else + *aAmount = 0; + return NS_ERROR_NOT_AVAILABLE; +#endif +} + NS_IMETHODIMP nsMemoryReporterManager::GetHasMozMallocUsableSize(bool* aHas) {