Title: [277963] trunk/Source
Revision
277963
Author
keith_mil...@apple.com
Date
2021-05-24 12:29:38 -0700 (Mon, 24 May 2021)

Log Message

Unreviewed, revert r276610 because it causes a 1% PLT regression.

Source/_javascript_Core:

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::visitChildren):
(JSC::CodeBlock::JITData::size const): Deleted.
* bytecode/CodeBlock.h:
* jit/JITCodeMap.h:
(JSC::JITCodeMap::memorySize const): Deleted.

Source/WTF:

* wtf/Bag.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (277962 => 277963)


--- trunk/Source/_javascript_Core/ChangeLog	2021-05-24 18:58:39 UTC (rev 277962)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-05-24 19:29:38 UTC (rev 277963)
@@ -1,3 +1,14 @@
+2021-05-24  Keith Miller  <keith_mil...@apple.com>
+
+        Unreviewed, revert r276610 because it causes a 1% PLT regression.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::visitChildren):
+        (JSC::CodeBlock::JITData::size const): Deleted.
+        * bytecode/CodeBlock.h:
+        * jit/JITCodeMap.h:
+        (JSC::JITCodeMap::memorySize const): Deleted.
+
 2021-05-24  Chris Dumez  <cdu...@apple.com>
 
         Drop CheckedLock / CheckedCondition aliases

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (277962 => 277963)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2021-05-24 18:58:39 UTC (rev 277962)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2021-05-24 19:29:38 UTC (rev 277963)
@@ -984,14 +984,6 @@
         extraMemory += m_metadata->sizeInBytes();
     if (m_jitCode && !m_jitCode->isShared())
         extraMemory += m_jitCode->size();
-#if ENABLE(JIT)
-    if (m_jitData)
-        extraMemory += m_jitData->size(locker);
-#endif
-    extraMemory += m_argumentValueProfiles.size() * sizeof(ValueProfile);
-    extraMemory += m_functionDecls.size() * sizeof(decltype(*m_functionDecls.data()));
-    extraMemory += m_functionExprs.size() * sizeof(decltype(*m_functionExprs.data()));
-
     visitor.reportExtraMemoryVisited(extraMemory);
 
     stronglyVisitStrongReferences(locker, visitor);
@@ -1029,28 +1021,6 @@
 template bool CodeBlock::shouldVisitStrongly(const ConcurrentJSLocker&, AbstractSlotVisitor&);
 template bool CodeBlock::shouldVisitStrongly(const ConcurrentJSLocker&, SlotVisitor&);
 
-#if ENABLE(JIT)
-size_t CodeBlock::JITData::size(const ConcurrentJSLocker&) const
-{
-    size_t size = sizeof(JITData);
-    size += m_stubInfos.estimatedAllocationSizeInBytes();
-    size += m_addICs.estimatedAllocationSizeInBytes();
-    size += m_mulICs.estimatedAllocationSizeInBytes();
-    size += m_negICs.estimatedAllocationSizeInBytes();
-    size += m_subICs.estimatedAllocationSizeInBytes();
-    size += m_byValInfos.estimatedAllocationSizeInBytes();
-    size += m_callLinkInfos.estimatedAllocationSizeInBytes();
-    size += m_switchJumpTables.size() * sizeof(decltype(*m_switchJumpTables.data()));
-    size += m_stringSwitchJumpTables.size() * sizeof(decltype(*m_stringSwitchJumpTables.data()));
-    // FIXME: account for m_calleeSaveRegisters but it's not a big deal since it's a fixed size and small.
-    if (m_pcToCodeOriginMap)
-        size += m_pcToCodeOriginMap->memorySize();
-    if (m_jitCodeMap)
-        size += m_jitCodeMap.memorySize();
-    return size;
-}
-#endif
-
 bool CodeBlock::shouldJettisonDueToWeakReference(VM& vm)
 {
     if (!JITCode::isOptimizingJIT(jitType()))

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.h (277962 => 277963)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.h	2021-05-24 18:58:39 UTC (rev 277962)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.h	2021-05-24 19:29:38 UTC (rev 277963)
@@ -270,8 +270,6 @@
     struct JITData {
         WTF_MAKE_STRUCT_FAST_ALLOCATED;
 
-        size_t size(const ConcurrentJSLocker&) const;
-
         Bag<StructureStubInfo> m_stubInfos;
         Bag<JITAddIC> m_addICs;
         Bag<JITMulIC> m_mulICs;

Modified: trunk/Source/_javascript_Core/jit/JITCodeMap.h (277962 => 277963)


--- trunk/Source/_javascript_Core/jit/JITCodeMap.h	2021-05-24 18:58:39 UTC (rev 277962)
+++ trunk/Source/_javascript_Core/jit/JITCodeMap.h	2021-05-24 19:29:38 UTC (rev 277963)
@@ -58,8 +58,6 @@
 
     explicit operator bool() const { return m_size; }
 
-    size_t memorySize() const { return sizeof(CodeLocationLabel<JSEntryPtrTag>) * m_size + sizeof(BytecodeIndex) * m_size; }
-
 private:
     CodeLocationLabel<JSEntryPtrTag>* codeLocations() const
     {

Modified: trunk/Source/WTF/ChangeLog (277962 => 277963)


--- trunk/Source/WTF/ChangeLog	2021-05-24 18:58:39 UTC (rev 277962)
+++ trunk/Source/WTF/ChangeLog	2021-05-24 19:29:38 UTC (rev 277963)
@@ -1,3 +1,9 @@
+2021-05-24  Keith Miller  <keith_mil...@apple.com>
+
+        Unreviewed, revert r276610 because it causes a 1% PLT regression.
+
+        * wtf/Bag.h:
+
 2021-05-24  Chris Dumez  <cdu...@apple.com>
 
         Drop CheckedLock / CheckedCondition aliases

Modified: trunk/Source/WTF/wtf/Bag.h (277962 => 277963)


--- trunk/Source/WTF/wtf/Bag.h	2021-05-24 18:58:39 UTC (rev 277962)
+++ trunk/Source/WTF/wtf/Bag.h	2021-05-24 19:29:38 UTC (rev 277963)
@@ -139,16 +139,6 @@
         return result;
     }
 
-    // Note: if the contents of the bag have allocated bytes that won't be accounted for here.
-    size_t estimatedAllocationSizeInBytes() const
-    {
-        size_t result = 0;
-        for (auto node : *this) {
-            UNUSED_PARAM(node);
-            result += sizeof(Node) + sizeof(T);
-        }
-        return result;
-    }
 
     iterator end() const { return iterator(); }
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to