Title: [277669] trunk/Source/_javascript_Core
Revision
277669
Author
[email protected]
Date
2021-05-18 12:46:49 -0700 (Tue, 18 May 2021)

Log Message

Unreviewed, reverting r276655.
https://bugs.webkit.org/show_bug.cgi?id=225930

caused a 2% PLT regression

Reverted changeset:

"StructureStubInfo and PolymorphicAccess should account for
their non-GC memory"
https://bugs.webkit.org/show_bug.cgi?id=225113
https://trac.webkit.org/changeset/276655

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (277668 => 277669)


--- trunk/Source/_javascript_Core/ChangeLog	2021-05-18 19:03:20 UTC (rev 277668)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-05-18 19:46:49 UTC (rev 277669)
@@ -1,3 +1,17 @@
+2021-05-18  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r276655.
+        https://bugs.webkit.org/show_bug.cgi?id=225930
+
+        caused a 2% PLT regression
+
+        Reverted changeset:
+
+        "StructureStubInfo and PolymorphicAccess should account for
+        their non-GC memory"
+        https://bugs.webkit.org/show_bug.cgi?id=225113
+        https://trac.webkit.org/changeset/276655
+
 2021-05-18  Keith Miller  <[email protected]>
 
         Temporarily revert r276592 as it breaks some native apps

Modified: trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp (277668 => 277669)


--- trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2021-05-18 19:03:20 UTC (rev 277668)
+++ trunk/Source/_javascript_Core/bytecode/CodeBlock.cpp	2021-05-18 19:46:49 UTC (rev 277669)
@@ -1034,8 +1034,6 @@
 {
     size_t size = sizeof(JITData);
     size += m_stubInfos.estimatedAllocationSizeInBytes();
-    for (StructureStubInfo* stub : m_stubInfos)
-        size += stub->extraMemoryInBytes();
     size += m_addICs.estimatedAllocationSizeInBytes();
     size += m_mulICs.estimatedAllocationSizeInBytes();
     size += m_negICs.estimatedAllocationSizeInBytes();

Modified: trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp (277668 => 277669)


--- trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp	2021-05-18 19:03:20 UTC (rev 277668)
+++ trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.cpp	2021-05-18 19:46:49 UTC (rev 277669)
@@ -387,20 +387,6 @@
 
 DEFINE_VISIT_AGGREGATE(PolymorphicAccess);
 
-size_t PolymorphicAccess::extraMemoryInBytes() const
-{
-    size_t size = 0;
-    size += m_list.sizeInBytes();
-    // FIXME: Account for the size of the various access cases.
-    size += m_list.size() * sizeof(AccessCase);
-    if (m_stubRoutine)
-        size += sizeof(JITStubRoutine) + m_stubRoutine->code().size();
-    if (m_watchpoints)
-        size += sizeof(WatchpointsOnStructureStubInfo) + m_watchpoints->extraMemoryInBytes();
-    size += m_weakReferences.byteSize();
-    return size;
-}
-
 void PolymorphicAccess::dump(PrintStream& out) const
 {
     out.print(RawPointer(this), ":[");

Modified: trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.h (277668 => 277669)


--- trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.h	2021-05-18 19:03:20 UTC (rev 277668)
+++ trunk/Source/_javascript_Core/bytecode/PolymorphicAccess.h	2021-05-18 19:46:49 UTC (rev 277669)
@@ -157,8 +157,6 @@
 
     // If this returns false then we are requesting a reset of the owning StructureStubInfo.
     bool visitWeak(VM&) const;
-
-    size_t extraMemoryInBytes() const;
     
     // This returns true if it has marked everything it will ever marked. This can be used as an
     // optimization to then avoid calling this method again during the fixpoint.

Modified: trunk/Source/_javascript_Core/bytecode/StructureStubClearingWatchpoint.cpp (277668 => 277669)


--- trunk/Source/_javascript_Core/bytecode/StructureStubClearingWatchpoint.cpp	2021-05-18 19:03:20 UTC (rev 277668)
+++ trunk/Source/_javascript_Core/bytecode/StructureStubClearingWatchpoint.cpp	2021-05-18 19:46:49 UTC (rev 277669)
@@ -106,11 +106,6 @@
     return &WTF::get<StructureTransitionStructureStubClearingWatchpoint>(holderRef->addWatchpoint(ObjectPropertyCondition()));
 }
 
-size_t WatchpointsOnStructureStubInfo::extraMemoryInBytes() const
-{
-    return m_watchpoints.estimatedAllocationSizeInBytes();
-}
-
 void AdaptiveValueStructureStubClearingWatchpoint::handleFire(VM&, const FireDetail&)
 {
     if (!m_holder->isValid())

Modified: trunk/Source/_javascript_Core/bytecode/StructureStubClearingWatchpoint.h (277668 => 277669)


--- trunk/Source/_javascript_Core/bytecode/StructureStubClearingWatchpoint.h	2021-05-18 19:03:20 UTC (rev 277668)
+++ trunk/Source/_javascript_Core/bytecode/StructureStubClearingWatchpoint.h	2021-05-18 19:46:49 UTC (rev 277669)
@@ -104,8 +104,6 @@
     StructureStubInfo* stubInfo() const { return m_stubInfo; }
 
     bool isValid() const;
-
-    size_t extraMemoryInBytes() const;
     
 private:
     CodeBlock* m_codeBlock;
@@ -112,7 +110,7 @@
     StructureStubInfo* m_stubInfo;
     // FIXME: use less memory for the entries in this Bag:
     // https://bugs.webkit.org/show_bug.cgi?id=202380
-    Bag<Node> m_watchpoints;
+    Bag<WTF::Variant<StructureTransitionStructureStubClearingWatchpoint, AdaptiveValueStructureStubClearingWatchpoint>> m_watchpoints;
 };
 
 } // namespace JSC

Modified: trunk/Source/_javascript_Core/bytecode/StructureStubInfo.cpp (277668 => 277669)


--- trunk/Source/_javascript_Core/bytecode/StructureStubInfo.cpp	2021-05-18 19:03:20 UTC (rev 277668)
+++ trunk/Source/_javascript_Core/bytecode/StructureStubInfo.cpp	2021-05-18 19:46:49 UTC (rev 277669)
@@ -355,19 +355,6 @@
     resetByGC = true;
 }
 
-size_t StructureStubInfo::extraMemoryInBytes()
-{
-    size_t extraMemory = 0;
-    // Cacheable Identifier never owns extra memory because UIDs are owned by the unique string table.
-    {
-        auto locker = holdLock(m_bufferedStructuresLock);
-        extraMemory += m_bufferedStructures.capacity() * sizeof(BufferedStructure);
-    }
-    if (cacheType() == CacheType::Stub)
-        extraMemory += u.stub->extraMemoryInBytes();
-    return extraMemory;
-}
-
 template<typename Visitor>
 bool StructureStubInfo::propagateTransitions(Visitor& visitor)
 {

Modified: trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h (277668 => 277669)


--- trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h	2021-05-18 19:03:20 UTC (rev 277668)
+++ trunk/Source/_javascript_Core/bytecode/StructureStubInfo.h	2021-05-18 19:46:49 UTC (rev 277669)
@@ -98,9 +98,6 @@
     // Check if the stub has weak references that are dead. If it does, then it resets itself,
     // either entirely or just enough to ensure that those dead pointers don't get used anymore.
     void visitWeakReferences(const ConcurrentJSLockerBase&, CodeBlock*);
-
-    // Computes the non-GC memory owned by this object in bytes, recursively requesting the non-GC memory size of owned objects.
-    size_t extraMemoryInBytes();
     
     // This returns true if it has marked everything that it will ever mark.
     template<typename Visitor> bool propagateTransitions(Visitor&);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to