Diff
Modified: trunk/LayoutTests/ChangeLog (123772 => 123773)
--- trunk/LayoutTests/ChangeLog 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/LayoutTests/ChangeLog 2012-07-26 18:16:54 UTC (rev 123773)
@@ -1,3 +1,13 @@
+2012-07-26 Olivier Blin <olivier.b...@softathome.com>
+
+ Add FastMalloc statistics in window.internals
+ https://bugs.webkit.org/show_bug.cgi?id=91274
+
+ Reviewed by Ryosuke Niwa.
+
+ * fast/harness/fastmallocstatistics-object-expected.txt: Added.
+ * fast/harness/fastmallocstatistics-object.html: Added.
+
2012-07-26 Luciano Wolf <luciano.w...@openbossa.org>
[Qt] css3/filters, editing/undo, fast/block/lineboxcontain, fast/js and tables/layering tests need update after rebaseline and new testfonts
Added: trunk/LayoutTests/fast/harness/fastmallocstatistics-object-expected.txt (0 => 123773)
--- trunk/LayoutTests/fast/harness/fastmallocstatistics-object-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/harness/fastmallocstatistics-object-expected.txt 2012-07-26 18:16:54 UTC (rev 123773)
@@ -0,0 +1,6 @@
+PASS [object Internals] is defined.
+PASS [object FastMallocStatistics] is defined.
+PASS stats.reservedVMBytes is >= 0
+PASS stats.committedVMBytes is >= 0
+PASS stats.freeListBytes is >= 0
+
Added: trunk/LayoutTests/fast/harness/fastmallocstatistics-object.html (0 => 123773)
--- trunk/LayoutTests/fast/harness/fastmallocstatistics-object.html (rev 0)
+++ trunk/LayoutTests/fast/harness/fastmallocstatistics-object.html 2012-07-26 18:16:54 UTC (rev 123773)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src=""
+<script type="text/_javascript_">
+shouldBeDefined(window.internals);
+
+var stats = window.internals.fastMallocStatistics();
+shouldBeDefined(stats);
+shouldBeGreaterThanOrEqual("stats.reservedVMBytes", "0");
+shouldBeGreaterThanOrEqual("stats.committedVMBytes", "0");
+shouldBeGreaterThanOrEqual("stats.freeListBytes", "0");
+</script>
+</head>
+<body>
+</body>
+</html>
Modified: trunk/Source/WebCore/CMakeLists.txt (123772 => 123773)
--- trunk/Source/WebCore/CMakeLists.txt 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/CMakeLists.txt 2012-07-26 18:16:54 UTC (rev 123773)
@@ -2626,6 +2626,7 @@
)
SET(WebCoreTestSupport_IDL_FILES
+ testing/FastMallocStatistics.idl
testing/Internals.idl
testing/InternalSettings.idl
)
Modified: trunk/Source/WebCore/ChangeLog (123772 => 123773)
--- trunk/Source/WebCore/ChangeLog 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/ChangeLog 2012-07-26 18:16:54 UTC (rev 123773)
@@ -1,3 +1,38 @@
+2012-07-26 Olivier Blin <olivier.b...@softathome.com>
+
+ Add FastMalloc statistics in window.internals
+ https://bugs.webkit.org/show_bug.cgi?id=91274
+
+ Reviewed by Ryosuke Niwa.
+
+ Test: fast/harness/fastmallocstatistics-object.html
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * DerivedSources.pri:
+ * GNUmakefile.list.am:
+ * Target.pri:
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCoreTestSupport.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * testing/FastMallocStatistics.h: Added.
+ (WebCore):
+ (FastMallocStatistics):
+ (WebCore::FastMallocStatistics::create):
+ (WebCore::FastMallocStatistics::reservedVMBytes):
+ (WebCore::FastMallocStatistics::committedVMBytes):
+ (WebCore::FastMallocStatistics::freeListBytes):
+ (WebCore::FastMallocStatistics::FastMallocStatistics):
+ * testing/FastMallocStatistics.idl: Added.
+ * testing/Internals.cpp:
+ (WebCore::Internals::fastMallocStatistics):
+ (WebCore):
+ * testing/Internals.h:
+ (WebCore):
+ (Internals):
+ * testing/Internals.idl:
+
2012-07-26 Adrienne Walker <e...@google.com>
[chromium] Remove redundant surface origin transforms
Modified: trunk/Source/WebCore/DerivedSources.make (123772 => 123773)
--- trunk/Source/WebCore/DerivedSources.make 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/DerivedSources.make 2012-07-26 18:16:54 UTC (rev 123773)
@@ -589,6 +589,7 @@
$(WebCore)/svg/SVGViewSpec.idl \
$(WebCore)/svg/SVGZoomAndPan.idl \
$(WebCore)/svg/SVGZoomEvent.idl \
+ $(WebCore)/testing/FastMallocStatistics.idl \
$(WebCore)/testing/Internals.idl \
$(WebCore)/testing/InternalSettings.idl \
$(WebCore)/workers/AbstractWorker.idl \
Modified: trunk/Source/WebCore/DerivedSources.pri (123772 => 123773)
--- trunk/Source/WebCore/DerivedSources.pri 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/DerivedSources.pri 2012-07-26 18:16:54 UTC (rev 123773)
@@ -443,6 +443,7 @@
$$PWD/plugins/DOMMimeTypeArray.idl \
$$PWD/storage/Storage.idl \
$$PWD/storage/StorageEvent.idl \
+ $$PWD/testing/FastMallocStatistics.idl \
$$PWD/testing/Internals.idl \
$$PWD/testing/InternalSettings.idl \
$$PWD/workers/AbstractWorker.idl \
Modified: trunk/Source/WebCore/GNUmakefile.list.am (123772 => 123773)
--- trunk/Source/WebCore/GNUmakefile.list.am 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2012-07-26 18:16:54 UTC (rev 123773)
@@ -993,6 +993,7 @@
$(WebCore)/plugins/DOMPluginArray.idl \
$(WebCore)/storage/Storage.idl \
$(WebCore)/storage/StorageEvent.idl \
+ $(WebCore)/testing/FastMallocStatistics.idl \
$(WebCore)/testing/Internals.idl \
$(WebCore)/testing/InternalSettings.idl \
$(WebCore)/workers/AbstractWorker.idl \
Modified: trunk/Source/WebCore/Target.pri (123772 => 123773)
--- trunk/Source/WebCore/Target.pri 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/Target.pri 2012-07-26 18:16:54 UTC (rev 123773)
@@ -2642,6 +2642,7 @@
svg/SVGVKernElement.h \
svg/SVGZoomAndPan.h \
svg/SVGZoomEvent.h \
+ testing/FastMallocStatistics.h \
testing/Internals.h \
testing/InternalSettings.h \
workers/AbstractWorker.h \
Modified: trunk/Source/WebCore/WebCore.gyp/WebCore.gyp (123772 => 123773)
--- trunk/Source/WebCore/WebCore.gyp/WebCore.gyp 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/WebCore.gyp/WebCore.gyp 2012-07-26 18:16:54 UTC (rev 123773)
@@ -2130,6 +2130,8 @@
],
'sources': [
'<@(webcore_test_support_files)',
+ '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8FastMallocStatistics.cpp',
+ '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8FastMallocStatistics.h',
'<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8Internals.cpp',
'<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8Internals.h',
'<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8InternalSettings.cpp',
Modified: trunk/Source/WebCore/WebCore.gypi (123772 => 123773)
--- trunk/Source/WebCore/WebCore.gypi 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/WebCore.gypi 2012-07-26 18:16:54 UTC (rev 123773)
@@ -6196,6 +6196,7 @@
'svg/properties/SVGPathSegListPropertyTearOff.cpp',
],
'webcore_test_support_idl_files': [
+ 'testing/FastMallocStatistics.idl',
'testing/Internals.idl',
'testing/InternalSettings.idl',
],
@@ -6204,6 +6205,7 @@
'testing/v8/WebCoreTestSupport.h',
'testing/js/WebCoreTestSupport.cpp',
'testing/js/WebCoreTestSupport.h',
+ 'testing/FastMallocStatistics.h',
'testing/Internals.cpp',
'testing/Internals.h',
'testing/InternalSettings.cpp',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCoreTestSupport.vcproj (123772 => 123773)
--- trunk/Source/WebCore/WebCore.vcproj/WebCoreTestSupport.vcproj 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCoreTestSupport.vcproj 2012-07-26 18:16:54 UTC (rev 123773)
@@ -348,6 +348,74 @@
Name="DerivedSources"
>
<File
+ RelativePath="$(ConfigurationBuildDir)\obj\WebCore\DerivedSources\JSFastMallocStatistics.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ DisableSpecificWarnings="4065;4273;4565;4701;4702"
+ ForcedIncludeFiles="$(NOINHERIT)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ DisableSpecificWarnings="4065;4273;4565;4701;4702"
+ ForcedIncludeFiles="$(NOINHERIT)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo_CFLite|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ DisableSpecificWarnings="4065;4273;4565;4701;4702"
+ ForcedIncludeFiles="$(NOINHERIT)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo_CFLite|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ DisableSpecificWarnings="4065;4273;4565;4701;4702"
+ ForcedIncludeFiles="$(NOINHERIT)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ DisableSpecificWarnings="4065;4273;4565;4701;4702"
+ ForcedIncludeFiles="$(NOINHERIT)"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Production|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="0"
+ DisableSpecificWarnings="4065;4273;4565;4701;4702"
+ ForcedIncludeFiles="$(NOINHERIT)"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="$(ConfigurationBuildDir)\obj\WebCore\DerivedSources\JSFastMallocStatistics.h"
+ >
+ </File>
+ <File
RelativePath="$(ConfigurationBuildDir)\obj\WebCore\DerivedSources\JSInternals.cpp"
>
<FileConfiguration
@@ -488,6 +556,10 @@
Name="testing"
>
<File
+ RelativePath="..\testing\FastMallocStatistics.h"
+ >
+ </File>
+ <File
RelativePath="..\testing\Internals.cpp"
>
<FileConfiguration
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (123772 => 123773)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2012-07-26 18:16:54 UTC (rev 123773)
@@ -3794,6 +3794,8 @@
A72EA3BB1585CF55004FAA26 /* RefCountedSupplement.h in Headers */ = {isa = PBXBuildFile; fileRef = A72EA3BA1585CF55004FAA26 /* RefCountedSupplement.h */; settings = {ATTRIBUTES = (Private, ); }; };
A73F95FE12C97BFE0031AAF9 /* RoundedRect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A73F95FC12C97BFE0031AAF9 /* RoundedRect.cpp */; };
A73F95FF12C97BFE0031AAF9 /* RoundedRect.h in Headers */ = {isa = PBXBuildFile; fileRef = A73F95FD12C97BFE0031AAF9 /* RoundedRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ A740B59514C935AB00A77FA4 /* JSFastMallocStatistics.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B4EA6914C9348400C8F5BF /* JSFastMallocStatistics.h */; };
+ A740B59714C935AF00A77FA4 /* JSFastMallocStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7B4EA6814C9348400C8F5BF /* JSFastMallocStatistics.cpp */; };
A740B5A514C935AB00A77FA4 /* JSInternalSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B4EA7914C9348400C8F5BF /* JSInternalSettings.h */; };
A740B5A714C935AF00A77FA4 /* JSInternalSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7B4EA7814C9348400C8F5BF /* JSInternalSettings.cpp */; };
A74BB76B13BDA86300FF7BF0 /* ExceptionCodePlaceholder.h in Headers */ = {isa = PBXBuildFile; fileRef = A74BB76A13BDA86300FF7BF0 /* ExceptionCodePlaceholder.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3832,6 +3834,7 @@
A7B6E69F0B291A9600D0529F /* DragData.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B6E69D0B291A9600D0529F /* DragData.h */; settings = {ATTRIBUTES = (Private, ); }; };
A7BBE26611AFB3F20005EA03 /* JSHTMLMeterElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7BBE26411AFB3F20005EA03 /* JSHTMLMeterElement.cpp */; };
A7BBE26711AFB3F20005EA03 /* JSHTMLMeterElement.h in Headers */ = {isa = PBXBuildFile; fileRef = A7BBE26511AFB3F20005EA03 /* JSHTMLMeterElement.h */; };
+ A7BE7EDF14C9175A0014489D /* FastMallocStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7BE7EDC14C9175A0014489D /* FastMallocStatistics.cpp */; };
A7BF7EDF14C9175A0014489D /* InternalSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7BF7EDC14C9175A0014489D /* InternalSettings.cpp */; };
A7BF7EE014C9175A0014489D /* InternalSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = A7BF7EDD14C9175A0014489D /* InternalSettings.h */; };
A7C9ABF81357A3BF00F5503F /* DetailsMarkerControl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7C9ABF61357A3BF00F5503F /* DetailsMarkerControl.cpp */; };
@@ -11000,12 +11003,16 @@
A7AD2F860EC89D07008AB002 /* LinkHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LinkHash.h; sourceTree = "<group>"; };
A7B070D0130A409C00A3763C /* FrameActionScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FrameActionScheduler.cpp; sourceTree = "<group>"; };
A7B070D1130A409C00A3763C /* FrameActionScheduler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrameActionScheduler.h; sourceTree = "<group>"; };
+ A7B4EA6814C9348400C8F5BF /* JSFastMallocStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFastMallocStatistics.cpp; sourceTree = "<group>"; };
+ A7B4EA6914C9348400C8F5BF /* JSFastMallocStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFastMallocStatistics.h; sourceTree = "<group>"; };
A7B4EA7814C9348400C8F5BF /* JSInternalSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInternalSettings.cpp; sourceTree = "<group>"; };
A7B4EA7914C9348400C8F5BF /* JSInternalSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInternalSettings.h; sourceTree = "<group>"; };
A7B6E69D0B291A9600D0529F /* DragData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DragData.h; sourceTree = "<group>"; };
A7B7749614CF6353004044BB /* HTMLContentElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLContentElement.idl; sourceTree = "<group>"; };
A7BBE26411AFB3F20005EA03 /* JSHTMLMeterElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLMeterElement.cpp; sourceTree = "<group>"; };
A7BBE26511AFB3F20005EA03 /* JSHTMLMeterElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLMeterElement.h; sourceTree = "<group>"; };
+ A7BE7EDD14C9175A0014489D /* FastMallocStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FastMallocStatistics.h; sourceTree = "<group>"; };
+ A7BE7EDE14C9175A0014489D /* FastMallocStatistics.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = FastMallocStatistics.idl; sourceTree = "<group>"; };
A7BF7EDC14C9175A0014489D /* InternalSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InternalSettings.cpp; sourceTree = "<group>"; };
A7BF7EDD14C9175A0014489D /* InternalSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InternalSettings.h; sourceTree = "<group>"; };
A7BF7EDE14C9175A0014489D /* InternalSettings.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = InternalSettings.idl; sourceTree = "<group>"; };
@@ -14888,6 +14895,8 @@
isa = PBXGroup;
children = (
41815C1B138319630057AAA4 /* js */,
+ A7BE7EDD14C9175A0014489D /* FastMallocStatistics.h */,
+ A7BE7EDE14C9175A0014489D /* FastMallocStatistics.idl */,
417DA4CF13734326007C57FB /* Internals.cpp */,
417DA4CE13734326007C57FB /* Internals.h */,
41813F9113818AD60057AAA4 /* Internals.idl */,
@@ -14901,6 +14910,8 @@
417DA71213735D90007C57FB /* Testing */ = {
isa = PBXGroup;
children = (
+ A7B4EA6814C9348400C8F5BF /* JSFastMallocStatistics.cpp */,
+ A7B4EA6914C9348400C8F5BF /* JSFastMallocStatistics.h */,
417DA71B13735DFA007C57FB /* JSInternals.cpp */,
417DA71C13735DFA007C57FB /* JSInternals.h */,
A7B4EA7814C9348400C8F5BF /* JSInternalSettings.cpp */,
@@ -22043,8 +22054,10 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
+ A7BE7EE014C9175A0014489D /* FastMallocStatistics.h in Headers */,
417DA6DA13734E6E007C57FB /* Internals.h in Headers */,
A7BF7EE014C9175A0014489D /* InternalSettings.h in Headers */,
+ A740B59514C935AB00A77FA4 /* JSFastMallocStatistics.h in Headers */,
417DA71E13735DFA007C57FB /* JSInternals.h in Headers */,
A740B5A514C935AB00A77FA4 /* JSInternalSettings.h in Headers */,
41815C1F138319830057AAA4 /* WebCoreTestSupport.h in Headers */,
@@ -25654,6 +25667,7 @@
files = (
417DA6D913734E6E007C57FB /* Internals.cpp in Sources */,
A7BF7EDF14C9175A0014489D /* InternalSettings.cpp in Sources */,
+ A740B59714C935AF00A77FA4 /* JSFastMallocStatistics.cpp in Sources */,
417DA71D13735DFA007C57FB /* JSInternals.cpp in Sources */,
A740B5A714C935AF00A77FA4 /* JSInternalSettings.cpp in Sources */,
41815C1E138319830057AAA4 /* WebCoreTestSupport.cpp in Sources */,
Added: trunk/Source/WebCore/testing/FastMallocStatistics.h (0 => 123773)
--- trunk/Source/WebCore/testing/FastMallocStatistics.h (rev 0)
+++ trunk/Source/WebCore/testing/FastMallocStatistics.h 2012-07-26 18:16:54 UTC (rev 123773)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2012 SoftAtHome. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef FastMallocStatistics_h
+#define FastMallocStatistics_h
+
+#include <wtf/FastMalloc.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class FastMallocStatistics : public RefCounted<FastMallocStatistics> {
+public:
+ static PassRefPtr<FastMallocStatistics> create() { return adoptRef(new FastMallocStatistics()); }
+
+ size_t reservedVMBytes() const { return m_stats.reservedVMBytes; }
+ size_t committedVMBytes() const { return m_stats.committedVMBytes; }
+ size_t freeListBytes() const { return m_stats.freeListBytes; }
+
+private:
+ FastMallocStatistics()
+ {
+ m_stats = WTF::fastMallocStatistics();
+ }
+
+ WTF::FastMallocStatistics m_stats;
+};
+
+} // namespace WebCore
+
+#endif
Added: trunk/Source/WebCore/testing/FastMallocStatistics.idl (0 => 123773)
--- trunk/Source/WebCore/testing/FastMallocStatistics.idl (rev 0)
+++ trunk/Source/WebCore/testing/FastMallocStatistics.idl 2012-07-26 18:16:54 UTC (rev 123773)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2012 SoftAtHome. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module window {
+ interface [
+ OmitConstructor
+ ] FastMallocStatistics {
+ readonly attribute unsigned long reservedVMBytes;
+ readonly attribute unsigned long committedVMBytes;
+ readonly attribute unsigned long freeListBytes;
+ };
+}
Modified: trunk/Source/WebCore/testing/Internals.cpp (123772 => 123773)
--- trunk/Source/WebCore/testing/Internals.cpp 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/testing/Internals.cpp 2012-07-26 18:16:54 UTC (rev 123773)
@@ -38,6 +38,7 @@
#include "Element.h"
#include "ElementShadow.h"
#include "ExceptionCode.h"
+#include "FastMallocStatistics.h"
#include "Frame.h"
#include "FrameView.h"
#include "HTMLContentElement.h"
@@ -1168,4 +1169,9 @@
SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(scheme);
}
+PassRefPtr<FastMallocStatistics> Internals::fastMallocStatistics() const
+{
+ return FastMallocStatistics::create();
}
+
+}
Modified: trunk/Source/WebCore/testing/Internals.h (123772 => 123773)
--- trunk/Source/WebCore/testing/Internals.h 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/testing/Internals.h 2012-07-26 18:16:54 UTC (rev 123773)
@@ -49,6 +49,7 @@
class ScriptExecutionContext;
class ShadowRoot;
class WebKitPoint;
+class FastMallocStatistics;
typedef int ExceptionCode;
@@ -205,6 +206,8 @@
void registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme);
void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const String& scheme);
+ PassRefPtr<FastMallocStatistics> fastMallocStatistics() const;
+
private:
explicit Internals(Document*);
Document* contextDocument() const;
Modified: trunk/Source/WebCore/testing/Internals.idl (123772 => 123773)
--- trunk/Source/WebCore/testing/Internals.idl 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Source/WebCore/testing/Internals.idl 2012-07-26 18:16:54 UTC (rev 123773)
@@ -182,6 +182,8 @@
void registerURLSchemeAsBypassingContentSecurityPolicy(in DOMString scheme);
void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(in DOMString scheme);
+
+ FastMallocStatistics fastMallocStatistics();
};
}
Modified: trunk/Tools/ChangeLog (123772 => 123773)
--- trunk/Tools/ChangeLog 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Tools/ChangeLog 2012-07-26 18:16:54 UTC (rev 123773)
@@ -1,3 +1,12 @@
+2012-07-26 Olivier Blin <olivier.b...@softathome.com>
+
+ Add FastMalloc statistics in window.internals
+ https://bugs.webkit.org/show_bug.cgi?id=91274
+
+ Reviewed by Ryosuke Niwa.
+
+ * GNUmakefile.am:
+
2012-07-20 Holger Hans Peter Freyther <hol...@moiji-mobile.com>
buildbot: Remove the configuration of hfreyther*
Modified: trunk/Tools/GNUmakefile.am (123772 => 123773)
--- trunk/Tools/GNUmakefile.am 2012-07-26 18:02:42 UTC (rev 123772)
+++ trunk/Tools/GNUmakefile.am 2012-07-26 18:16:54 UTC (rev 123773)
@@ -43,6 +43,7 @@
libWebCoreInternals_la_SOURCES = \
Source/WebCore/bindings/js/JSDOMWrapper.cpp \
Source/WebCore/bindings/js/JSDOMWrapper.h \
+ Source/WebCore/testing/FastMallocStatistics.h \
Source/WebCore/testing/Internals.cpp \
Source/WebCore/testing/Internals.h \
Source/WebCore/testing/InternalSettings.cpp \
@@ -53,6 +54,8 @@
Source/WebCore/testing/js/WebCoreTestSupport.h
libwebcoreinternals_built_sources += \
+ DerivedSources/WebCore/JSFastMallocStatistics.cpp \
+ DerivedSources/WebCore/JSFastMallocStatistics.h \
DerivedSources/WebCore/JSInternals.cpp \
DerivedSources/WebCore/JSInternals.h \
DerivedSources/WebCore/JSInternalSettings.cpp \