Commit fae0111e authored by morrita@chromium.org's avatar morrita@chromium.org

Remove internals.profiler

Nobody uses this anymore.

R=haraken@chromium.org, tkent@chromium.org
BUG=263316

Review URL: https://codereview.chromium.org/705363003

git-svn-id: svn://svn.chromium.org/blink/trunk@185159 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 1d0b10b6
......@@ -474,7 +474,6 @@ crbug.com/307777 [ Android ] editing/style/query-typing-style.html [ Timeout Pas
crbug.com/307777 [ Android ] fast/borders/negative-border-width.html [ Timeout Pass ]
crbug.com/307777 [ Android ] fast/doctypes/005-case-preserving.html [ Timeout Pass ]
crbug.com/307777 [ Android ] fast/harness/check-layout-error-no-attributes.html [ Timeout Pass ]
crbug.com/307777 [ Android ] fast/harness/internals-profilers-heap.html [ Timeout Pass ]
crbug.com/307777 [ Android ] fast/harness/override-preferences-2.html [ Timeout Pass ]
crbug.com/307777 [ Android ] fast/history/forward-during-load.html [ Timeout Pass ]
crbug.com/307777 [ Android ] fast/history/history-back-forward-within-subframe-hash.html [ Timeout Pass ]
......
<html>
<head>
</head>
<body>
<div id="target"></div>
<script>
testRunner.dumpAsText();
window.internals.profilers.startHeapProfiling("test");
target.innerHTML += "<div><div>Hello</div></div>";
var text = window.internals.profilers.getHeapProfile();
window.internals.profilers.stopHeapProfiling();
target.innerHTML = "PASS";
</script>
</body>
</html>
......@@ -312,8 +312,6 @@ source_set("testing") {
"$bindings_core_v8_output_dir/V8UnionTypesTest.h",
"$bindings_core_v8_output_dir/V8Internals.cpp",
"$bindings_core_v8_output_dir/V8Internals.h",
"$bindings_core_v8_output_dir/V8InternalProfilers.cpp",
"$bindings_core_v8_output_dir/V8InternalProfilers.h",
"$bindings_core_v8_output_dir/V8InternalSettings.cpp",
"$bindings_core_v8_output_dir/V8InternalSettings.h",
"$bindings_core_v8_output_dir/V8InternalSettingsGenerated.cpp",
......
......@@ -771,8 +771,6 @@
'<(bindings_core_v8_output_dir)/V8UnionTypesTest.h',
'<(bindings_core_v8_output_dir)/V8Internals.cpp',
'<(bindings_core_v8_output_dir)/V8Internals.h',
'<(bindings_core_v8_output_dir)/V8InternalProfilers.cpp',
'<(bindings_core_v8_output_dir)/V8InternalProfilers.h',
'<(bindings_core_v8_output_dir)/V8InternalSettings.cpp',
'<(bindings_core_v8_output_dir)/V8InternalSettings.h',
'<(bindings_core_v8_output_dir)/V8InternalSettingsGenerated.cpp',
......
......@@ -3453,7 +3453,6 @@
'testing/DictionaryTest.idl',
'testing/GarbageCollectedScriptWrappable.idl',
'testing/GCObservation.idl',
'testing/InternalProfilers.idl',
'testing/InternalSettings.idl',
'testing/LayerRect.idl',
'testing/LayerRectList.idl',
......@@ -3488,8 +3487,6 @@
'testing/GarbageCollectedScriptWrappable.h',
'testing/GCObservation.cpp',
'testing/GCObservation.h',
'testing/InternalProfilers.cpp',
'testing/InternalProfilers.h',
'testing/InternalSettings.cpp',
'testing/InternalSettings.h',
'testing/Internals.cpp',
......
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
* OWNER OR 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.
*/
#include "config.h"
#include "core/testing/InternalProfilers.h"
#include "public/platform/Platform.h"
#include "wtf/text/CString.h"
#include "wtf/text/WTFString.h"
#include <algorithm>
namespace blink {
InternalProfilers::InternalProfilers()
{
}
void InternalProfilers::startHeapProfiling(const String& prefix)
{
blink::Platform::current()->startHeapProfiling(prefix);
}
void InternalProfilers::stopHeapProfiling()
{
blink::Platform::current()->stopHeapProfiling();
}
void InternalProfilers::dumpHeapProfiling(const String& reason)
{
blink::Platform::current()->dumpHeapProfiling(reason);
}
String InternalProfilers::getHeapProfile()
{
String text = blink::Platform::current()->getHeapProfile();
// Only return the first line which contains total numbers
// because whole dump is too big and too noisy to process in JavaScript.
return text.substring(0, text.find('\n'));
}
}
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
* OWNER OR 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 InternalProfilers_h
#define InternalProfilers_h
#include "bindings/core/v8/ScriptWrappable.h"
#include "platform/heap/Handle.h"
#include "wtf/Forward.h"
#include "wtf/PassRefPtr.h"
#include "wtf/RefCounted.h"
namespace blink {
class InternalProfilers final : public GarbageCollected<InternalProfilers>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
InternalProfilers();
static InternalProfilers* create()
{
return new InternalProfilers();
}
void startHeapProfiling(const String& prefix);
void stopHeapProfiling();
void dumpHeapProfiling(const String& reason);
String getHeapProfile();
void trace(Visitor*) { }
};
} // namespace blink
#endif // InternalProfilers_h
/*
* Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * 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.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
* OWNER OR 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.
*/
[
GarbageCollected,
] interface InternalProfilers {
void startHeapProfiling(DOMString prefix);
void stopHeapProfiling();
void dumpHeapProfiling(DOMString reason);
DOMString getHeapProfile();
};
......@@ -119,7 +119,6 @@
#include "core/rendering/compositing/RenderLayerCompositor.h"
#include "core/testing/DictionaryTest.h"
#include "core/testing/GCObservation.h"
#include "core/testing/InternalProfilers.h"
#include "core/testing/InternalSettings.h"
#include "core/testing/LayerRect.h"
#include "core/testing/LayerRectList.h"
......@@ -274,13 +273,6 @@ InternalRuntimeFlags* Internals::runtimeFlags() const
return m_runtimeFlags.get();
}
InternalProfilers* Internals::profilers()
{
if (!m_profilers)
m_profilers = InternalProfilers::create();
return m_profilers.get();
}
unsigned Internals::workerThreadCount() const
{
return WorkerThread::workerThreadCount();
......@@ -2195,7 +2187,6 @@ ScriptPromise Internals::promiseCheckOverload(ScriptState* scriptState, Location
void Internals::trace(Visitor* visitor)
{
visitor->trace(m_runtimeFlags);
visitor->trace(m_profilers);
}
void Internals::setValueForUser(Element* element, const String& value)
......
......@@ -57,7 +57,6 @@ class ExecutionContext;
class GCObservation;
class HTMLElement;
class HTMLMediaElement;
class InternalProfilers;
class InternalRuntimeFlags;
class InternalSettings;
class Iterator;
......@@ -208,7 +207,6 @@ public:
InternalSettings* settings() const;
InternalRuntimeFlags* runtimeFlags() const;
InternalProfilers* profilers();
unsigned workerThreadCount() const;
void setDeviceProximity(Document*, const String& eventType, double value, double min, double max, ExceptionState&);
......@@ -347,7 +345,6 @@ private:
DocumentMarker* markerAt(Node*, const String& markerType, unsigned index, ExceptionState&);
Member<InternalRuntimeFlags> m_runtimeFlags;
Member<InternalProfilers> m_profilers;
};
} // namespace blink
......
......@@ -155,7 +155,6 @@
[TypeChecking=Interface] boolean isPageBoxVisible(Document document, long pageNumber);
readonly attribute InternalSettings settings;
readonly attribute InternalProfilers profilers;
readonly attribute InternalRuntimeFlags runtimeFlags;
readonly attribute unsigned long workerThreadCount;
......
......@@ -277,15 +277,6 @@ public:
// discardable.
virtual WebDiscardableMemory* allocateAndLockDiscardableMemory(size_t bytes) { return 0; }
// A wrapper for tcmalloc's HeapProfilerStart();
virtual void startHeapProfiling(const WebString& /*prefix*/) { }
// A wrapper for tcmalloc's HeapProfilerStop();
virtual void stopHeapProfiling() { }
// A wrapper for tcmalloc's HeapProfilerDump()
virtual void dumpHeapProfiling(const WebString& /*reason*/) { }
// A wrapper for tcmalloc's GetHeapProfile()
virtual WebString getHeapProfile() { return WebString(); }
static const size_t noDecodedImageByteLimit = static_cast<size_t>(-1);
// Returns the maximum amount of memory a decoded image should be allowed.
......
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