Remove VTableSpectrum
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Nov 2013 22:47:50 +0000 (22:47 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Nov 2013 22:47:50 +0000 (22:47 +0000)
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

17 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/GNUmakefile.list.am
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/heap/Heap.cpp
Source/JavaScriptCore/heap/Heap.h
Source/JavaScriptCore/heap/MarkedBlock.cpp
Source/JavaScriptCore/heap/SlotVisitor.cpp
Source/JavaScriptCore/heap/SlotVisitor.h
Source/JavaScriptCore/heap/VTableSpectrum.cpp [deleted file]
Source/JavaScriptCore/heap/VTableSpectrum.h [deleted file]
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WebKit/blackberry/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/AboutDataEnableFeatures.in

index c5f8a21..44ac6a6 100644 (file)
@@ -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
index 961b7a4..cf962a1 100644 (file)
@@ -1,3 +1,26 @@
+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
index 82a0560..8706e4e 100644 (file)
@@ -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 \
index daa167f..8df9d0e 100644 (file)
     <ClCompile Include="..\heap\MarkStack.cpp" />\r
     <ClCompile Include="..\heap\SlotVisitor.cpp" />\r
     <ClCompile Include="..\heap\SuperRegion.cpp" />\r
-    <ClCompile Include="..\heap\VTableSpectrum.cpp" />\r
     <ClCompile Include="..\heap\Weak.cpp" />\r
     <ClCompile Include="..\heap\WeakBlock.cpp" />\r
     <ClCompile Include="..\heap\WeakHandleOwner.cpp" />\r
     <ClInclude Include="..\heap\SuperRegion.h" />\r
     <ClInclude Include="..\heap\TinyBloomFilter.h" />\r
     <ClInclude Include="..\heap\UnconditionalFinalizer.h" />\r
-    <ClInclude Include="..\heap\VTableSpectrum.h" />\r
     <ClInclude Include="..\heap\Weak.h" />\r
     <ClInclude Include="..\heap\WeakBlock.h" />\r
     <ClInclude Include="..\heap\WeakHandleOwner.h" />\r
index 4e4e52f..0d31d35 100644 (file)
     <ClCompile Include="..\heap\SuperRegion.cpp">\r
       <Filter>heap</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="..\heap\VTableSpectrum.cpp">\r
-      <Filter>heap</Filter>\r
-    </ClCompile>\r
     <ClCompile Include="..\heap\Weak.cpp">\r
       <Filter>heap</Filter>\r
     </ClCompile>\r
     <ClInclude Include="..\heap\UnconditionalFinalizer.h">\r
       <Filter>heap</Filter>\r
     </ClInclude>\r
-    <ClInclude Include="..\heap\VTableSpectrum.h">\r
-      <Filter>heap</Filter>\r
-    </ClInclude>\r
     <ClInclude Include="..\heap\Weak.h">\r
       <Filter>heap</Filter>\r
     </ClInclude>\r
index b4f4936..83b50c9 100644 (file)
                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 */; };
                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>"; };
                                C2DF442E1707AC0100A5CA96 /* SuperRegion.h */,
                                141448CC13A1783700F5BA1A /* TinyBloomFilter.h */,
                                0F5F08CE146C762F000472A9 /* UnconditionalFinalizer.h */,
-                               0FC815121405118600CFA603 /* VTableSpectrum.cpp */,
-                               0FC815141405118D00CFA603 /* VTableSpectrum.h */,
                                1ACF7376171CA6FB00C9BB1E /* Weak.cpp */,
                                142E3133134FF0A600AFADB5 /* Weak.h */,
                                14E84F9914EE1ACC00D6D5D4 /* WeakBlock.cpp */,
                                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 */,
                                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 */,
index 18f79c1..354427e 100644 (file)
@@ -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)
index 9b5d1db..51be58c 100644 (file)
@@ -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;
index 1e563a4..e639f12 100644 (file)
@@ -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();
 }
index 68d894e..cda2b79 100644 (file)
@@ -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));
     
index a8aa66b..733e9c1 100644 (file)
@@ -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*);
 
diff --git a/Source/JavaScriptCore/heap/VTableSpectrum.cpp b/Source/JavaScriptCore/heap/VTableSpectrum.cpp
deleted file mode 100644 (file)
index 0581ca4..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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
diff --git a/Source/JavaScriptCore/heap/VTableSpectrum.h b/Source/JavaScriptCore/heap/VTableSpectrum.h
deleted file mode 100644 (file)
index a50a04f..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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
index c29e5c3..acb5a9e 100644 (file)
@@ -1,3 +1,12 @@
+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.
index effaaf1..b2b2479 100644 (file)
 #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)
index 245e668..ed659ea 100644 (file)
@@ -1,3 +1,12 @@
+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
index c52267a..e9ac44d 100644 (file)
@@ -174,7 +174,6 @@ SCRIPTED_SPEECH
 SHADOW_DOM
 SHARED_WORKERS
 SHARED_WORKER_PROCESS
-SIMPLE_HEAP_PROFILING
 SMOOTH_SCROLLING
 SPEECH_SYNTHESIS
 SPELLCHECK