Commit 5906583d authored by mhahnenberg@apple.com's avatar mhahnenberg@apple.com

Remove VTableSpectrum

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

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/Heap.cpp:
(JSC::Heap::lastChanceToFinalize):
* heap/Heap.h:
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::callDestructor):
* heap/SlotVisitor.cpp:
(JSC::visitChildren):
* heap/SlotVisitor.h:
* heap/VTableSpectrum.cpp: Removed.
* heap/VTableSpectrum.h: Removed.

Source/WebKit/blackberry:

* WebCoreSupport/AboutDataEnableFeatures.in:

Source/WTF:

* wtf/Platform.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159360 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fcd7ae95
......@@ -205,7 +205,6 @@ set(JavaScriptCore_SOURCES
heap/MarkedSpace.cpp
heap/SlotVisitor.cpp
heap/SuperRegion.cpp
heap/VTableSpectrum.cpp
heap/Weak.cpp
heap/WeakBlock.cpp
heap/WeakHandleOwner.cpp
......
2013-11-15 Mark Hahnenberg <mhahnenberg@apple.com>
Remove VTableSpectrum
https://bugs.webkit.org/show_bug.cgi?id=124427
Reviewed by Filip Pizlo.
* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/Heap.cpp:
(JSC::Heap::lastChanceToFinalize):
* heap/Heap.h:
* heap/MarkedBlock.cpp:
(JSC::MarkedBlock::callDestructor):
* heap/SlotVisitor.cpp:
(JSC::visitChildren):
* heap/SlotVisitor.h:
* heap/VTableSpectrum.cpp: Removed.
* heap/VTableSpectrum.h: Removed.
2013-11-14 Mark Hahnenberg <mhahnenberg@apple.com>
-dealloc callbacks from wrapped Objective-C objects can happen at bad times
......
......@@ -547,8 +547,6 @@ javascriptcore_sources += \
Source/JavaScriptCore/heap/SuperRegion.cpp \
Source/JavaScriptCore/heap/SuperRegion.h \
Source/JavaScriptCore/heap/UnconditionalFinalizer.h \
Source/JavaScriptCore/heap/VTableSpectrum.cpp \
Source/JavaScriptCore/heap/VTableSpectrum.h \
Source/JavaScriptCore/heap/Weak.cpp \
Source/JavaScriptCore/heap/Weak.h \
Source/JavaScriptCore/heap/WeakBlock.cpp \
......
......@@ -445,7 +445,6 @@
<ClCompile Include="..\heap\MarkStack.cpp" />
<ClCompile Include="..\heap\SlotVisitor.cpp" />
<ClCompile Include="..\heap\SuperRegion.cpp" />
<ClCompile Include="..\heap\VTableSpectrum.cpp" />
<ClCompile Include="..\heap\Weak.cpp" />
<ClCompile Include="..\heap\WeakBlock.cpp" />
<ClCompile Include="..\heap\WeakHandleOwner.cpp" />
......@@ -972,7 +971,6 @@
<ClInclude Include="..\heap\SuperRegion.h" />
<ClInclude Include="..\heap\TinyBloomFilter.h" />
<ClInclude Include="..\heap\UnconditionalFinalizer.h" />
<ClInclude Include="..\heap\VTableSpectrum.h" />
<ClInclude Include="..\heap\Weak.h" />
<ClInclude Include="..\heap\WeakBlock.h" />
<ClInclude Include="..\heap\WeakHandleOwner.h" />
......
......@@ -261,9 +261,6 @@
<ClCompile Include="..\heap\SuperRegion.cpp">
<Filter>heap</Filter>
</ClCompile>
<ClCompile Include="..\heap\VTableSpectrum.cpp">
<Filter>heap</Filter>
</ClCompile>
<ClCompile Include="..\heap\Weak.cpp">
<Filter>heap</Filter>
</ClCompile>
......@@ -1667,9 +1664,6 @@
<ClInclude Include="..\heap\UnconditionalFinalizer.h">
<Filter>heap</Filter>
</ClInclude>
<ClInclude Include="..\heap\VTableSpectrum.h">
<Filter>heap</Filter>
</ClInclude>
<ClInclude Include="..\heap\Weak.h">
<Filter>heap</Filter>
</ClInclude>
......
......@@ -381,8 +381,6 @@
0FC712E317CD8793008CC93C /* JITToDFGDeferredCompilationCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC712E117CD878F008CC93C /* JITToDFGDeferredCompilationCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FC8150A14043BF500CFA603 /* WriteBarrierSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC8150914043BD200CFA603 /* WriteBarrierSupport.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FC8150B14043C0E00CFA603 /* WriteBarrierSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC8150814043BCA00CFA603 /* WriteBarrierSupport.cpp */; };
0FC815151405119B00CFA603 /* VTableSpectrum.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC815141405118D00CFA603 /* VTableSpectrum.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FC81516140511B500CFA603 /* VTableSpectrum.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC815121405118600CFA603 /* VTableSpectrum.cpp */; };
0FC97F33182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC97F2F182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.cpp */; };
0FC97F34182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC97F30182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
0FC97F35182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC97F31182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.cpp */; };
......@@ -1681,8 +1679,6 @@
0FC712E117CD878F008CC93C /* JITToDFGDeferredCompilationCallback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JITToDFGDeferredCompilationCallback.h; sourceTree = "<group>"; };
0FC8150814043BCA00CFA603 /* WriteBarrierSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WriteBarrierSupport.cpp; sourceTree = "<group>"; };
0FC8150914043BD200CFA603 /* WriteBarrierSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WriteBarrierSupport.h; sourceTree = "<group>"; };
0FC815121405118600CFA603 /* VTableSpectrum.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VTableSpectrum.cpp; sourceTree = "<group>"; };
0FC815141405118D00CFA603 /* VTableSpectrum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VTableSpectrum.h; sourceTree = "<group>"; };
0FC97F2F182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeBlockJettisoningWatchpoint.cpp; sourceTree = "<group>"; };
0FC97F30182020D7002C9B26 /* CodeBlockJettisoningWatchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeBlockJettisoningWatchpoint.h; sourceTree = "<group>"; };
0FC97F31182020D7002C9B26 /* ProfiledCodeBlockJettisoningWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProfiledCodeBlockJettisoningWatchpoint.cpp; sourceTree = "<group>"; };
......@@ -3080,8 +3076,6 @@
C2DF442E1707AC0100A5CA96 /* SuperRegion.h */,
141448CC13A1783700F5BA1A /* TinyBloomFilter.h */,
0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */,
0FC815121405118600CFA603 /* VTableSpectrum.cpp */,
0FC815141405118D00CFA603 /* VTableSpectrum.h */,
1ACF7376171CA6FB00C9BB1E /* Weak.cpp */,
142E3133134FF0A600AFADB5 /* Weak.h */,
14E84F9914EE1ACC00D6D5D4 /* WeakBlock.cpp */,
......@@ -4821,7 +4815,6 @@
BC18C4200E16F5CD00B34460 /* VM.h in Headers */,
FE4A332015BD2E07006F54F3 /* VMInspector.h in Headers */,
FE6617281774E03500495B00 /* VMStackBounds.h in Headers */,
0FC815151405119B00CFA603 /* VTableSpectrum.h in Headers */,
FED94F2F171E3E2300BE77A4 /* Watchdog.h in Headers */,
0F919D2615853CE3004A4E7D /* Watchpoint.h in Headers */,
142E313C134FF0A600AFADB5 /* Weak.h in Headers */,
......@@ -5695,7 +5688,6 @@
0F24E55817F74EDB00ABB217 /* ValueRecovery.cpp in Sources */,
E18E3A590DF9278C00D90B34 /* VM.cpp in Sources */,
FE4A331F15BD2E07006F54F3 /* VMInspector.cpp in Sources */,
0FC81516140511B500CFA603 /* VTableSpectrum.cpp in Sources */,
FED94F2E171E3E2300BE77A4 /* Watchdog.cpp in Sources */,
FED94F30171E3E2300BE77A4 /* WatchdogMac.cpp in Sources */,
0F919D2515853CE0004A4E7D /* Watchpoint.cpp in Sources */,
......
......@@ -295,11 +295,6 @@ void Heap::lastChanceToFinalize()
RELEASE_ASSERT(m_operationInProgress == NoOperation);
m_objectSpace.lastChanceToFinalize();
#if ENABLE(SIMPLE_HEAP_PROFILING)
m_slotVisitor.m_visitedTypeCounts.dump(WTF::dataFile(), "Visited Type Counts");
m_destroyedTypeCounts.dump(WTF::dataFile(), "Destroyed Type Counts");
#endif
}
void Heap::reportExtraMemoryCostSlowCase(size_t cost)
......
......@@ -265,10 +265,6 @@ namespace JSC {
GCIncomingRefCountedSet<ArrayBuffer> m_arrayBuffers;
size_t m_extraMemoryUsage;
#if ENABLE(SIMPLE_HEAP_PROFILING)
VTableSpectrum m_destroyedTypeCounts;
#endif
ProtectCountSet m_protectedValues;
Vector<Vector<ValueStringPair, 0, UnsafeVectorOverflow>* > m_tempSortingVectors;
OwnPtr<HashSet<MarkedArgumentBuffer*>> m_markListSet;
......
......@@ -59,10 +59,6 @@ inline void MarkedBlock::callDestructor(JSCell* cell)
if (cell->isZapped())
return;
#if ENABLE(SIMPLE_HEAP_PROFILING)
m_heap->m_destroyedTypeCounts.countVPtr(vptr);
#endif
cell->methodTableForDestruction()->destroy(cell);
cell->zap();
}
......
......@@ -75,9 +75,6 @@ void SlotVisitor::append(ConservativeRoots& conservativeRoots)
ALWAYS_INLINE static void visitChildren(SlotVisitor& visitor, const JSCell* cell)
{
StackStats::probe();
#if ENABLE(SIMPLE_HEAP_PROFILING)
m_visitedTypeCounts.count(cell);
#endif
ASSERT(Heap::isMarked(cell));
......
......@@ -90,10 +90,6 @@ public:
void reportExtraMemoryUsage(size_t size);
#if ENABLE(SIMPLE_HEAP_PROFILING)
VTableSpectrum m_visitedTypeCounts;
#endif
void addWeakReferenceHarvester(WeakReferenceHarvester*);
void addUnconditionalFinalizer(UnconditionalFinalizer*);
......
/*
* Copyright (C) 2011 Apple 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:
* 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 INC. ``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 INC. 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 "VTableSpectrum.h"
#include "JSObject.h"
#include "Structure.h"
#include <algorithm>
#include <stdio.h>
#include <wtf/Vector.h>
#if PLATFORM(MAC)
#include <dlfcn.h>
#endif
namespace JSC {
VTableSpectrum::VTableSpectrum()
{
}
VTableSpectrum::~VTableSpectrum()
{
}
void VTableSpectrum::countVPtr(void* vTablePointer)
{
add(vTablePointer);
}
void VTableSpectrum::count(JSCell* cell)
{
// FIXME: we need to change this class to count ClassInfos rather than vptrs
UNUSED_PARAM(cell);
}
void VTableSpectrum::dump(FILE* output, const char* comment)
{
fprintf(output, "%s:\n", comment);
Vector<KeyAndCount> list = buildList();
for (size_t index = list.size(); index-- > 0;) {
KeyAndCount item = list.at(index);
#if PLATFORM(MAC)
Dl_info info;
if (dladdr(item.key, &info)) {
const char* findResult = strrchr(info.dli_fname, '/');
const char* strippedFileName;
if (findResult)
strippedFileName = findResult + 1;
else
strippedFileName = info.dli_fname;
fprintf(output, " %s:%s(%p): %lu\n", strippedFileName, info.dli_sname, item.key, item.count);
continue;
}
#endif
fprintf(output, " %p: %lu\n", item.key, item.count);
}
fflush(output);
}
} // namespace JSC
/*
* Copyright (C) 2011 Apple 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:
* 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 INC. ``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 INC. 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 VTableSpectrum_h
#define VTableSpectrum_h
#include <stdio.h>
#include <wtf/Spectrum.h>
namespace JSC {
class JSCell;
class VTableSpectrum : Spectrum<void*> {
public:
VTableSpectrum();
~VTableSpectrum();
void countVPtr(void*);
JS_EXPORT_PRIVATE void count(JSCell*);
void dump(FILE* output, const char* comment);
};
} // namespace JSC
#endif // VTableSpectrum_h
2013-11-15 Mark Hahnenberg <mhahnenberg@apple.com>
Remove VTableSpectrum
https://bugs.webkit.org/show_bug.cgi?id=124427
Reviewed by Filip Pizlo.
* wtf/Platform.h:
2013-11-15 Jer Noble <jer.noble@apple.com>
MediaTime addition and subtraction operators have errors when the rhs is infinite.
......
......@@ -801,10 +801,6 @@
#define ENABLE_VERBOSE_VALUE_PROFILE 0
#endif
#if !defined(ENABLE_SIMPLE_HEAP_PROFILING)
#define ENABLE_SIMPLE_HEAP_PROFILING 0
#endif
/* Counts uses of write barriers using sampling counters. Be sure to also
set ENABLE_SAMPLING_COUNTERS to 1. */
#if !defined(ENABLE_WRITE_BARRIER_PROFILING)
......
2013-11-15 Mark Hahnenberg <mhahnenberg@apple.com>
Remove VTableSpectrum
https://bugs.webkit.org/show_bug.cgi?id=124427
Reviewed by Filip Pizlo.
* WebCoreSupport/AboutDataEnableFeatures.in:
2013-11-07 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
Changing MediaStreamDescriptor to MediaStreamPrivate
......
......@@ -174,7 +174,6 @@ SCRIPTED_SPEECH
SHADOW_DOM
SHARED_WORKERS
SHARED_WORKER_PROCESS
SIMPLE_HEAP_PROFILING
SMOOTH_SCROLLING
SPEECH_SYNTHESIS
SPELLCHECK
......
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