Rename window.internals.fastMallocStatistics to mallocStatistics

https://bugs.webkit.org/show_bug.cgi?id=94033

Patch by Scott Graham <scottmg@chromium.org> on 2012-08-15
Reviewed by Adam Barth.

PerformanceTests:

* resources/runner.js:
(PerfTestRunner.storeHeapResults):
(PerfTestRunner.getUsedMallocHeap):
(PerfTestRunner.getAndPrintMemoryStatistics):
(PerfTestRunner.initAndStartLoop):

Source/WebCore:

Mechanical rename. In preparation for plumbing allocation information
from allocators that aren't "fastMalloc".

* 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:
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::didTellClientAboutLoad):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::loadResource):
* testing/FastMallocStatistics.h: Removed.
* testing/FastMallocStatistics.idl: Removed.
* testing/Internals.cpp:
(WebCore::Internals::mallocStatistics):
* testing/Internals.h:
(WebCore):
(Internals):
* testing/Internals.idl:
* testing/MallocStatistics.h: Added.
* testing/MallocStatistics.idl: Added.

Tools:

* GNUmakefile.am:
* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(test_run_memory_test):

LayoutTests:

* fast/harness/fastmallocstatistics-object.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent afb1dbd3
2012-08-15 Scott Graham <scottmg@chromium.org>
Rename window.internals.fastMallocStatistics to mallocStatistics
https://bugs.webkit.org/show_bug.cgi?id=94033
Reviewed by Adam Barth.
* fast/harness/fastmallocstatistics-object.html:
2012-08-15 Ojan Vafai <ojan@chromium.org>
Update expectations to match the bots. This test hasn't timed out in over 500 runs.
PASS [object Internals] is defined.
PASS [object FastMallocStatistics] is defined.
PASS [object MallocStatistics] is defined.
PASS stats.reservedVMBytes is >= 0
PASS stats.committedVMBytes is >= 0
PASS stats.freeListBytes is >= 0
......
......@@ -5,7 +5,7 @@
<script type="text/javascript">
shouldBeDefined(window.internals);
var stats = window.internals.fastMallocStatistics();
var stats = window.internals.mallocStatistics();
shouldBeDefined(stats);
shouldBeGreaterThanOrEqual("stats.reservedVMBytes", "0");
shouldBeGreaterThanOrEqual("stats.committedVMBytes", "0");
......
2012-08-15 Scott Graham <scottmg@chromium.org>
Rename window.internals.fastMallocStatistics to mallocStatistics
https://bugs.webkit.org/show_bug.cgi?id=94033
Reviewed by Adam Barth.
* resources/runner.js:
(PerfTestRunner.storeHeapResults):
(PerfTestRunner.getUsedMallocHeap):
(PerfTestRunner.getAndPrintMemoryStatistics):
(PerfTestRunner.initAndStartLoop):
2012-08-10 Ryosuke Niwa <rniwa@webkit.org>
Unreviewed; fix an insanely silly typo.
......
......@@ -130,7 +130,7 @@ PerfTestRunner._runLoop = function () {
this.logStatistics(this._results, this.unit, "Time:");
if (this._jsHeapResults.length) {
this.logStatistics(this._jsHeapResults, "bytes", "JS Heap:");
this.logStatistics(this._fastMallocHeapResults, "bytes", "FastMalloc:");
this.logStatistics(this._mallocHeapResults, "bytes", "Malloc:");
}
if (this._logLines) {
var logLines = this._logLines;
......@@ -168,11 +168,11 @@ PerfTestRunner.storeHeapResults = function() {
if (!window.internals)
return;
this._jsHeapResults.push(this.getUsedJSHeap());
this._fastMallocHeapResults.push(this.getUsedFastMallocHeap());
this._mallocHeapResults.push(this.getUsedMallocHeap());
}
PerfTestRunner.getUsedFastMallocHeap = function() {
var stats = window.internals.fastMallocStatistics();
PerfTestRunner.getUsedMallocHeap = function() {
var stats = window.internals.mallocStatistics();
return stats.committedVMBytes - stats.freeListBytes;
}
......@@ -186,8 +186,8 @@ PerfTestRunner.getAndPrintMemoryStatistics = function() {
var jsMemoryStats = PerfTestRunner.computeStatistics([PerfTestRunner.getUsedJSHeap()], "bytes");
PerfTestRunner.printStatistics(jsMemoryStats, "JS Heap:");
var fastMallocMemoryStats = PerfTestRunner.computeStatistics([PerfTestRunner.getUsedFastMallocHeap()], "bytes");
PerfTestRunner.printStatistics(fastMallocMemoryStats, "FastMalloc:");
var mallocMemoryStats = PerfTestRunner.computeStatistics([PerfTestRunner.getUsedMallocHeap()], "bytes");
PerfTestRunner.printStatistics(mallocMemoryStats, "Malloc:");
}
PerfTestRunner.ignoreWarmUpAndLog = function (result) {
......@@ -208,7 +208,7 @@ PerfTestRunner.initAndStartLoop = function() {
this.customRunFunction = null;
this._results = [];
this._jsHeapResults = [];
this._fastMallocHeapResults = [];
this._mallocHeapResults = [];
this._logLines = window.testRunner ? [] : null;
this.log("Running " + this._runCount + " times");
this._runLoop();
......
......@@ -2686,9 +2686,9 @@ SET(WebCoreTestSupport_IDL_INCLUDES
)
SET(WebCoreTestSupport_IDL_FILES
testing/FastMallocStatistics.idl
testing/Internals.idl
testing/InternalSettings.idl
testing/MallocStatistics.idl
)
SET(WebCoreTestSupport_SOURCES
......
2012-08-15 Scott Graham <scottmg@chromium.org>
Rename window.internals.fastMallocStatistics to mallocStatistics
https://bugs.webkit.org/show_bug.cgi?id=94033
Reviewed by Adam Barth.
Mechanical rename. In preparation for plumbing allocation information
from allocators that aren't "fastMalloc".
* 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:
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::didTellClientAboutLoad):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::loadResource):
* testing/FastMallocStatistics.h: Removed.
* testing/FastMallocStatistics.idl: Removed.
* testing/Internals.cpp:
(WebCore::Internals::mallocStatistics):
* testing/Internals.h:
(WebCore):
(Internals):
* testing/Internals.idl:
* testing/MallocStatistics.h: Added.
* testing/MallocStatistics.idl: Added.
2012-08-15 Joshua Netterfield <jnetterfield@rim.com>
[BlackBerry] Upstream BlackBerry build fixes
......@@ -591,9 +591,9 @@ BINDING_IDLS = \
$(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)/testing/MallocStatistics.idl \
$(WebCore)/workers/AbstractWorker.idl \
$(WebCore)/workers/DedicatedWorkerContext.idl \
$(WebCore)/workers/SharedWorker.idl \
......
......@@ -443,9 +443,9 @@ IDL_BINDINGS += \
$$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/testing/MallocStatistics.idl \
$$PWD/workers/AbstractWorker.idl \
$$PWD/workers/DedicatedWorkerContext.idl \
$$PWD/workers/SharedWorker.idl \
......
......@@ -1686,9 +1686,9 @@ dom_binding_idls += \
$(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)/testing/MallocStatistics.idl \
$(WebCore)/workers/AbstractWorker.idl \
$(WebCore)/workers/DedicatedWorkerContext.idl \
$(WebCore)/workers/SharedWorker.idl \
......
......@@ -2645,9 +2645,9 @@ HEADERS += \
svg/SVGVKernElement.h \
svg/SVGZoomAndPan.h \
svg/SVGZoomEvent.h \
testing/FastMallocStatistics.h \
testing/Internals.h \
testing/InternalSettings.h \
testing/MallocStatistics.h \
workers/AbstractWorker.h \
workers/DedicatedWorkerContext.h \
workers/DedicatedWorkerThread.h \
......
......@@ -2206,8 +2206,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/V8MallocStatistics.cpp',
'<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8MallocStatistics.h',
'<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8Internals.cpp',
'<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8Internals.h',
'<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8InternalSettings.cpp',
......
......@@ -6228,20 +6228,20 @@
'svg/properties/SVGPathSegListPropertyTearOff.cpp',
],
'webcore_test_support_idl_files': [
'testing/FastMallocStatistics.idl',
'testing/Internals.idl',
'testing/InternalSettings.idl',
'testing/MallocStatistics.idl',
],
'webcore_test_support_files': [
'testing/v8/WebCoreTestSupport.cpp',
'testing/v8/WebCoreTestSupport.h',
'testing/js/WebCoreTestSupport.cpp',
'testing/js/WebCoreTestSupport.h',
'testing/FastMallocStatistics.h',
'testing/Internals.cpp',
'testing/Internals.h',
'testing/InternalSettings.cpp',
'testing/InternalSettings.h',
'testing/MallocStatistics.h',
'testing/MockPagePopupDriver.cpp',
'testing/MockPagePopupDriver.h',
],
......
......@@ -348,7 +348,7 @@
Name="DerivedSources"
>
<File
RelativePath="$(ConfigurationBuildDir)\obj\WebCore\DerivedSources\JSFastMallocStatistics.cpp"
RelativePath="$(ConfigurationBuildDir)\obj\WebCore\DerivedSources\JSMallocStatistics.cpp"
>
<FileConfiguration
Name="Debug|Win32"
......@@ -412,7 +412,7 @@
</FileConfiguration>
</File>
<File
RelativePath="$(ConfigurationBuildDir)\obj\WebCore\DerivedSources\JSFastMallocStatistics.h"
RelativePath="$(ConfigurationBuildDir)\obj\WebCore\DerivedSources\JSMallocStatistics.h"
>
</File>
<File
......@@ -556,7 +556,7 @@
Name="testing"
>
<File
RelativePath="..\testing\FastMallocStatistics.h"
RelativePath="..\testing\MallocStatistics.h"
>
</File>
<File
......
......@@ -3797,8 +3797,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 */; };
A740B59514C935AB00A77FA4 /* JSMallocStatistics.h in Headers */ = {isa = PBXBuildFile; fileRef = A7B4EA6914C9348400C8F5BF /* JSMallocStatistics.h */; };
A740B59714C935AF00A77FA4 /* JSMallocStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7B4EA6814C9348400C8F5BF /* JSMallocStatistics.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, ); }; };
......@@ -11019,16 +11019,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>"; };
A7B4EA6814C9348400C8F5BF /* JSMallocStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMallocStatistics.cpp; sourceTree = "<group>"; };
A7B4EA6914C9348400C8F5BF /* JSMallocStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMallocStatistics.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>"; };
A7BE7EDD14C9175A0014489D /* MallocStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MallocStatistics.h; sourceTree = "<group>"; };
A7BE7EDE14C9175A0014489D /* MallocStatistics.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MallocStatistics.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>"; };
......@@ -14931,8 +14931,8 @@
isa = PBXGroup;
children = (
41815C1B138319630057AAA4 /* js */,
A7BE7EDD14C9175A0014489D /* FastMallocStatistics.h */,
A7BE7EDE14C9175A0014489D /* FastMallocStatistics.idl */,
A7BE7EDD14C9175A0014489D /* MallocStatistics.h */,
A7BE7EDE14C9175A0014489D /* MallocStatistics.idl */,
417DA4CF13734326007C57FB /* Internals.cpp */,
417DA4CE13734326007C57FB /* Internals.h */,
41813F9113818AD60057AAA4 /* Internals.idl */,
......@@ -14946,8 +14946,8 @@
417DA71213735D90007C57FB /* Testing */ = {
isa = PBXGroup;
children = (
A7B4EA6814C9348400C8F5BF /* JSFastMallocStatistics.cpp */,
A7B4EA6914C9348400C8F5BF /* JSFastMallocStatistics.h */,
A7B4EA6814C9348400C8F5BF /* JSMallocStatistics.cpp */,
A7B4EA6914C9348400C8F5BF /* JSMallocStatistics.h */,
417DA71B13735DFA007C57FB /* JSInternals.cpp */,
417DA71C13735DFA007C57FB /* JSInternals.h */,
A7B4EA7814C9348400C8F5BF /* JSInternalSettings.cpp */,
......@@ -22114,7 +22114,7 @@
files = (
417DA6DA13734E6E007C57FB /* Internals.h in Headers */,
A7BF7EE014C9175A0014489D /* InternalSettings.h in Headers */,
A740B59514C935AB00A77FA4 /* JSFastMallocStatistics.h in Headers */,
A740B59514C935AB00A77FA4 /* JSMallocStatistics.h in Headers */,
417DA71E13735DFA007C57FB /* JSInternals.h in Headers */,
A740B5A514C935AB00A77FA4 /* JSInternalSettings.h in Headers */,
41815C1F138319830057AAA4 /* WebCoreTestSupport.h in Headers */,
......@@ -25736,7 +25736,7 @@
files = (
417DA6D913734E6E007C57FB /* Internals.cpp in Sources */,
A7BF7EDF14C9175A0014489D /* InternalSettings.cpp in Sources */,
A740B59714C935AF00A77FA4 /* JSFastMallocStatistics.cpp in Sources */,
A740B59714C935AF00A77FA4 /* JSMallocStatistics.cpp in Sources */,
417DA71D13735DFA007C57FB /* JSInternals.cpp in Sources */,
A740B5A714C935AF00A77FA4 /* JSInternalSettings.cpp in Sources */,
41815C1E138319830057AAA4 /* WebCoreTestSupport.cpp in Sources */,
......@@ -37,7 +37,6 @@
#include "Element.h"
#include "ElementShadow.h"
#include "ExceptionCode.h"
#include "FastMallocStatistics.h"
#include "Frame.h"
#include "FrameView.h"
#include "HTMLContentElement.h"
......@@ -54,6 +53,7 @@
#include "InternalSettings.h"
#include "IntRect.h"
#include "Language.h"
#include "MallocStatistics.h"
#include "NodeRenderingContext.h"
#include "Page.h"
#include "PrintContext.h"
......@@ -1183,9 +1183,9 @@ void Internals::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const
SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(scheme);
}
PassRefPtr<FastMallocStatistics> Internals::fastMallocStatistics() const
PassRefPtr<MallocStatistics> Internals::mallocStatistics() const
{
return FastMallocStatistics::create();
return MallocStatistics::create();
}
}
......@@ -49,7 +49,7 @@ class Range;
class ScriptExecutionContext;
class ShadowRoot;
class WebKitPoint;
class FastMallocStatistics;
class MallocStatistics;
typedef int ExceptionCode;
......@@ -208,7 +208,7 @@ public:
void registerURLSchemeAsBypassingContentSecurityPolicy(const String& scheme);
void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(const String& scheme);
PassRefPtr<FastMallocStatistics> fastMallocStatistics() const;
PassRefPtr<MallocStatistics> mallocStatistics() const;
private:
explicit Internals(Document*);
......
......@@ -185,7 +185,7 @@ module window {
void registerURLSchemeAsBypassingContentSecurityPolicy(in DOMString scheme);
void removeURLSchemeRegisteredAsBypassingContentSecurityPolicy(in DOMString scheme);
FastMallocStatistics fastMallocStatistics();
MallocStatistics mallocStatistics();
};
}
......@@ -23,8 +23,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef FastMallocStatistics_h
#define FastMallocStatistics_h
#ifndef MallocStatistics_h
#define MallocStatistics_h
#include <wtf/FastMalloc.h>
#include <wtf/PassRefPtr.h>
......@@ -32,16 +32,16 @@
namespace WebCore {
class FastMallocStatistics : public RefCounted<FastMallocStatistics> {
class MallocStatistics : public RefCounted<MallocStatistics> {
public:
static PassRefPtr<FastMallocStatistics> create() { return adoptRef(new FastMallocStatistics()); }
static PassRefPtr<MallocStatistics> create() { return adoptRef(new MallocStatistics()); }
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()
MallocStatistics()
{
m_stats = WTF::fastMallocStatistics();
}
......
......@@ -26,7 +26,7 @@
module window {
interface [
OmitConstructor
] FastMallocStatistics {
] MallocStatistics {
readonly attribute unsigned long reservedVMBytes;
readonly attribute unsigned long committedVMBytes;
readonly attribute unsigned long freeListBytes;
......
2012-08-15 Scott Graham <scottmg@chromium.org>
Rename window.internals.fastMallocStatistics to mallocStatistics
https://bugs.webkit.org/show_bug.cgi?id=94033
Reviewed by Adam Barth.
* GNUmakefile.am:
* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):
* Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
(test_run_memory_test):
2012-08-15 Peter Beverloo <peter@chromium.org>
Fix a warning in TestWebKitAPI's MediaTime test-suite
......
......@@ -43,7 +43,7 @@ noinst_LTLIBRARIES += libWebCoreInternals.la
libWebCoreInternals_la_SOURCES = \
Source/WebCore/bindings/js/JSDOMWrapper.cpp \
Source/WebCore/bindings/js/JSDOMWrapper.h \
Source/WebCore/testing/FastMallocStatistics.h \
Source/WebCore/testing/MallocStatistics.h \
Source/WebCore/testing/Internals.cpp \
Source/WebCore/testing/Internals.h \
Source/WebCore/testing/InternalSettings.cpp \
......@@ -54,8 +54,8 @@ libWebCoreInternals_la_SOURCES = \
Source/WebCore/testing/js/WebCoreTestSupport.h
libwebcoreinternals_built_sources += \
DerivedSources/WebCore/JSFastMallocStatistics.cpp \
DerivedSources/WebCore/JSFastMallocStatistics.h \
DerivedSources/WebCore/JSMallocStatistics.cpp \
DerivedSources/WebCore/JSMallocStatistics.h \
DerivedSources/WebCore/JSInternals.cpp \
DerivedSources/WebCore/JSInternals.h \
DerivedSources/WebCore/JSInternalSettings.cpp \
......
......@@ -112,7 +112,7 @@ class PerfTest(object):
return False
_description_regex = re.compile(r'^Description: (?P<description>.*)$', re.IGNORECASE)
_result_classes = ['Time', 'JS Heap', 'FastMalloc']
_result_classes = ['Time', 'JS Heap', 'Malloc']
_result_class_regex = re.compile(r'^(?P<resultclass>' + r'|'.join(_result_classes) + '):')
_statistics_keys = ['avg', 'median', 'stdev', 'min', 'max', 'unit']
_score_regex = re.compile(r'^(?P<key>' + r'|'.join(_statistics_keys) + r')\s+(?P<value>[0-9\.]+)\s*(?P<unit>.*)')
......
......@@ -123,7 +123,7 @@ stdev 15000 bytes
min 811000 bytes
max 848000 bytes
FastMalloc:
Malloc:
avg 532000 bytes
median 529000 bytes
stdev 13000 bytes
......@@ -274,13 +274,13 @@ max 548000 bytes
'median= 1101.0 ms, stdev= 11.0 ms, min= 1080.0 ms, max= 1120.0 ms',
'RESULT Parser: memory-test: JSHeap= 832000.0 bytes',
'median= 829000.0 bytes, stdev= 15000.0 bytes, min= 811000.0 bytes, max= 848000.0 bytes',
'RESULT Parser: memory-test: FastMalloc= 532000.0 bytes',
'RESULT Parser: memory-test: Malloc= 532000.0 bytes',
'median= 529000.0 bytes, stdev= 13000.0 bytes, min= 511000.0 bytes, max= 548000.0 bytes',
'', '']))
results = runner.load_output_json()[0]['results']
self.assertEqual(results['Parser/memory-test'], {'min': 1080.0, 'max': 1120.0, 'median': 1101.0, 'stdev': 11.0, 'avg': 1100.0, 'unit': 'ms'})
self.assertEqual(results['Parser/memory-test:JSHeap'], {'min': 811000.0, 'max': 848000.0, 'median': 829000.0, 'stdev': 15000.0, 'avg': 832000.0, 'unit': 'bytes'})
self.assertEqual(results['Parser/memory-test:FastMalloc'], {'min': 511000.0, 'max': 548000.0, 'median': 529000.0, 'stdev': 13000.0, 'avg': 532000.0, 'unit': 'bytes'})
self.assertEqual(results['Parser/memory-test:Malloc'], {'min': 511000.0, 'max': 548000.0, 'median': 529000.0, 'stdev': 13000.0, 'avg': 532000.0, 'unit': 'bytes'})
def _test_run_with_json_output(self, runner, filesystem, upload_suceeds=True, expected_exit_code=0):
filesystem.write_text_file(runner._base_path + '/inspector/pass.html', 'some content')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment