[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
ggaren at apple.com
ggaren at apple.com
Wed Mar 17 18:30:30 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit cbc5ae3381375cf96e8a8d72502495799d4e6ecd
Author: ggaren at apple.com <ggaren at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Mar 9 23:07:33 2010 +0000
JavaScriptCore: Changed FastMalloc statistics reporting to be a bit clearer. We now
report:
- Reserved VM Bytes: the VM that has been mapped into the process.
- Committed VM Bytes: the subset of Reserved VM Bytes actually in use.
- Free List Bytes: the subset of Committed VM Bytes in a free list.
Reviewed by Darin Adler.
* wtf/FastMalloc.cpp:
(WTF::fastMallocStatistics):
(WTF::TCMallocStats::fastMallocStatistics): Updated to report the statistics
above. Standardized use of "ifdef WTF_CHANGES". Added a SpinLockHolder
around all statistics gathering, since it reads from the page heap.
* wtf/FastMalloc.h: Updated to report the statistics above.
WebKit/mac: Updated for FastMalloc reporting changes.
Reviewed by Darin Adler.
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics memoryStatistics]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 927f217..011e632 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-03-09 Geoffrey Garen <ggaren at apple.com>
+
+ Reviewed by Darin Adler.
+
+ Changed FastMalloc statistics reporting to be a bit clearer. We now
+ report:
+ - Reserved VM Bytes: the VM that has been mapped into the process.
+ - Committed VM Bytes: the subset of Reserved VM Bytes actually in use.
+ - Free List Bytes: the subset of Committed VM Bytes in a free list.
+
+ * wtf/FastMalloc.cpp:
+ (WTF::fastMallocStatistics):
+ (WTF::TCMallocStats::fastMallocStatistics): Updated to report the statistics
+ above. Standardized use of "ifdef WTF_CHANGES". Added a SpinLockHolder
+ around all statistics gathering, since it reads from the page heap.
+
+ * wtf/FastMalloc.h: Updated to report the statistics above.
+
2010-03-09 Gabor Loki <loki at webkit.org>
Rubber-stamped by Maciej Stachowiak.
diff --git a/JavaScriptCore/wtf/FastMalloc.cpp b/JavaScriptCore/wtf/FastMalloc.cpp
index a40a9b2..d1a4d28 100644
--- a/JavaScriptCore/wtf/FastMalloc.cpp
+++ b/JavaScriptCore/wtf/FastMalloc.cpp
@@ -375,7 +375,7 @@ void releaseFastMallocFreeMemory() { }
FastMallocStatistics fastMallocStatistics()
{
- FastMallocStatistics statistics = { 0, 0, 0, 0 };
+ FastMallocStatistics statistics = { 0, 0, 0 };
return statistics;
}
@@ -432,7 +432,7 @@ extern "C" const int jscore_fastmalloc_introspection = 0;
#include <windows.h>
#endif
-#if WTF_CHANGES
+#ifdef WTF_CHANGES
#if OS(DARWIN)
#include "MallocZoneSupport.h"
@@ -4431,7 +4431,7 @@ void FastMallocZone::init()
#endif
-#if WTF_CHANGES
+#ifdef WTF_CHANGES
void releaseFastMallocFreeMemory()
{
// Flush free pages in the current thread cache back to the page heap.
@@ -4449,20 +4449,21 @@ void releaseFastMallocFreeMemory()
FastMallocStatistics fastMallocStatistics()
{
FastMallocStatistics statistics;
- {
- SpinLockHolder lockHolder(&pageheap_lock);
- statistics.heapSize = static_cast<size_t>(pageheap->SystemBytes());
- statistics.freeSizeInHeap = static_cast<size_t>(pageheap->FreeBytes());
- statistics.returnedSize = pageheap->ReturnedBytes();
- statistics.freeSizeInCaches = 0;
- for (TCMalloc_ThreadCache* threadCache = thread_heaps; threadCache ; threadCache = threadCache->next_)
- statistics.freeSizeInCaches += threadCache->Size();
- }
+
+ SpinLockHolder lockHolder(&pageheap_lock);
+ statistics.reservedVMBytes = static_cast<size_t>(pageheap->SystemBytes());
+ statistics.committedVMBytes = statistics.reservedVMBytes - pageheap->ReturnedBytes();
+
+ statistics.freeListBytes = 0;
for (unsigned cl = 0; cl < kNumClasses; ++cl) {
const int length = central_cache[cl].length();
const int tc_length = central_cache[cl].tc_length();
- statistics.freeSizeInCaches += ByteSizeForClass(cl) * (length + tc_length);
+
+ statistics.freeListBytes += ByteSizeForClass(cl) * (length + tc_length);
}
+ for (TCMalloc_ThreadCache* threadCache = thread_heaps; threadCache ; threadCache = threadCache->next_)
+ statistics.freeListBytes += threadCache->Size();
+
return statistics;
}
diff --git a/JavaScriptCore/wtf/FastMalloc.h b/JavaScriptCore/wtf/FastMalloc.h
index 78ecb8d..ef98639 100644
--- a/JavaScriptCore/wtf/FastMalloc.h
+++ b/JavaScriptCore/wtf/FastMalloc.h
@@ -83,10 +83,9 @@ namespace WTF {
void releaseFastMallocFreeMemory();
struct FastMallocStatistics {
- size_t heapSize;
- size_t freeSizeInHeap;
- size_t freeSizeInCaches;
- size_t returnedSize;
+ size_t reservedVMBytes;
+ size_t committedVMBytes;
+ size_t freeListBytes;
};
FastMallocStatistics fastMallocStatistics();
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index b976a0c..3ff64d9 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,12 @@
+2010-03-09 Geoffrey Garen <ggaren at apple.com>
+
+ Reviewed by Darin Adler.
+
+ Updated for FastMalloc reporting changes.
+
+ * Misc/WebCoreStatistics.mm:
+ (+[WebCoreStatistics memoryStatistics]):
+
2010-03-08 Simon Fraser <simon.fraser at apple.com>
Reviewed by Mark Rowe.
diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm
index 9e8ae05..1351fe5 100644
--- a/WebKit/mac/Misc/WebCoreStatistics.mm
+++ b/WebKit/mac/Misc/WebCoreStatistics.mm
@@ -196,10 +196,9 @@ using namespace WebCore;
JSLock lock(SilenceAssertionsOnly);
Heap::Statistics jsHeapStatistics = JSDOMWindow::commonJSGlobalData()->heap.statistics();
return [NSDictionary dictionaryWithObjectsAndKeys:
- [NSNumber numberWithInt:fastMallocStatistics.heapSize], @"FastMallocHeapSize",
- [NSNumber numberWithInt:fastMallocStatistics.freeSizeInHeap], @"FastMallocFreeSizeInHeap",
- [NSNumber numberWithInt:fastMallocStatistics.freeSizeInCaches], @"FastMallocFreeSizeInCaches",
- [NSNumber numberWithInt:fastMallocStatistics.returnedSize], @"FastMallocReturnedSize",
+ [NSNumber numberWithInt:fastMallocStatistics.reservedVMBytes], @"FastMallocReservedVMBytes",
+ [NSNumber numberWithInt:fastMallocStatistics.committedVMBytes], @"FastMallocCommittedVMBytes",
+ [NSNumber numberWithInt:fastMallocStatistics.freeListBytes], @"FastMallocFreeListBytes",
[NSNumber numberWithInt:jsHeapStatistics.size], @"JavaScriptHeapSize",
[NSNumber numberWithInt:jsHeapStatistics.free], @"JavaScriptFreeSize",
nil];
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list