WebKit Bugzilla
Attachment 341127 Details for
Bug 185914
: Speed up JetStream/base64
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for landing
blah.patch (text/plain), 23.42 KB, created by
Filip Pizlo
on 2018-05-23 14:05:35 PDT
(
hide
)
Description:
patch for landing
Filename:
MIME Type:
Creator:
Filip Pizlo
Created:
2018-05-23 14:05:35 PDT
Size:
23.42 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 232108) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,35 @@ >+2018-05-23 Filip Pizlo <fpizlo@apple.com> >+ >+ Speed up JetStream/base64 >+ https://bugs.webkit.org/show_bug.cgi?id=185914 >+ >+ Reviewed by Michael Saboff. >+ >+ Make allocation fast paths ALWAYS_INLINE. >+ >+ This is a 1% speed-up on SunSpider, mostly because of base64. It also speeds up pdfjs by >+ ~6%. >+ >+ * CMakeLists.txt: >+ * JavaScriptCore.xcodeproj/project.pbxproj: >+ * heap/AllocatorInlines.h: >+ (JSC::Allocator::allocate const): >+ * heap/CompleteSubspace.cpp: >+ (JSC::CompleteSubspace::allocateNonVirtual): Deleted. >+ * heap/CompleteSubspace.h: >+ * heap/CompleteSubspaceInlines.h: Added. >+ (JSC::CompleteSubspace::allocateNonVirtual): >+ * heap/FreeListInlines.h: >+ (JSC::FreeList::allocate): >+ * heap/IsoSubspace.cpp: >+ (JSC::IsoSubspace::allocateNonVirtual): Deleted. >+ * heap/IsoSubspace.h: >+ (JSC::IsoSubspace::allocatorForNonVirtual): >+ * heap/IsoSubspaceInlines.h: Added. >+ (JSC::IsoSubspace::allocateNonVirtual): >+ * runtime/JSCellInlines.h: >+ * runtime/VM.h: >+ > 2018-05-22 Yusuke Suzuki <utatane.tea@gmail.com> > > [JSC] Clean up stringGetByValStubGenerator >Index: Source/JavaScriptCore/CMakeLists.txt >=================================================================== >--- Source/JavaScriptCore/CMakeLists.txt (revision 232104) >+++ Source/JavaScriptCore/CMakeLists.txt (working copy) >@@ -490,6 +490,7 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEA > heap/AlignedMemoryAllocator.h > heap/AllocationFailureMode.h > heap/Allocator.h >+ heap/AllocatorInlines.h > heap/AllocatorForMode.h > heap/BlockDirectory.h > heap/BlockDirectoryInlines.h >@@ -500,6 +501,7 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEA > heap/CollectionScope.h > heap/CollectorPhase.h > heap/CompleteSubspace.h >+ heap/CompleteSubspaceInlines.h > heap/ConstraintConcurrency.h > heap/ConstraintParallelism.h > heap/ConstraintVolatility.h >@@ -533,10 +535,12 @@ set(JavaScriptCore_PRIVATE_FRAMEWORK_HEA > heap/IncrementalSweeper.h > heap/IsoCellSet.h > heap/IsoSubspace.h >+ heap/IsoSubspaceInlines.h > heap/IsoSubspacePerVM.h > heap/LargeAllocation.h > heap/ListableHandler.h > heap/LocalAllocator.h >+ heap/LocalAllocatorInlines.h > heap/LockDuringMarking.h > heap/MachineStackMarker.h > heap/MarkStack.h >Index: Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj >=================================================================== >--- Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (revision 232104) >+++ Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj (working copy) >@@ -394,9 +394,9 @@ > 0F725CAA1C503DED00AD943A /* B3PureCSE.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F725CA61C503DED00AD943A /* B3PureCSE.h */; }; > 0F725CB01C506D3B00AD943A /* B3FoldPathConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F725CAE1C506D3B00AD943A /* B3FoldPathConstants.h */; }; > 0F74B93B1F89614800B935D3 /* PrototypeKey.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F74B93A1F89614500B935D3 /* PrototypeKey.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 0F75A060200D260B0038E2CF /* LocalAllocatorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A05A200D25F00038E2CF /* LocalAllocatorInlines.h */; }; >+ 0F75A060200D260B0038E2CF /* LocalAllocatorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A05A200D25F00038E2CF /* LocalAllocatorInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F75A061200D26180038E2CF /* LocalAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A057200D25F00038E2CF /* LocalAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 0F75A062200D261D0038E2CF /* AllocatorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A05D200D25F10038E2CF /* AllocatorInlines.h */; }; >+ 0F75A062200D261D0038E2CF /* AllocatorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A05D200D25F10038E2CF /* AllocatorInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F75A063200D261F0038E2CF /* Allocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A054200D25EF0038E2CF /* Allocator.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F75A0662013E4F10038E2CF /* JITAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F75A0652013E4EF0038E2CF /* JITAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0F766D2C15A8CC3A008F363E /* JITStubRoutineSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F766D2A15A8CC34008F363E /* JITStubRoutineSet.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -546,6 +546,8 @@ > 0FD0E5F01E46BF250006AB08 /* RegisterState.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD0E5EF1E46BF230006AB08 /* RegisterState.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0FD0E5F21E46C8AF0006AB08 /* CollectingScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD0E5F11E46C8AD0006AB08 /* CollectingScope.h */; }; > 0FD2C92416D01EE900C7803F /* StructureInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD2C92316D01EE900C7803F /* StructureInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 0FD2FD9420B52BDE00F09441 /* CompleteSubspaceInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD2FD9320B52BDD00F09441 /* CompleteSubspaceInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 0FD2FD9520B52BE200F09441 /* IsoSubspaceInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD2FD9220B52BDC00F09441 /* IsoSubspaceInlines.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 0FD3C82814115D4F00FD81CB /* DFGDriver.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3C82214115D0E00FD81CB /* DFGDriver.h */; }; > 0FD3E4021B618AAF00C80E1E /* DFGAdaptiveInferredPropertyValueWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3E4001B618AAF00C80E1E /* DFGAdaptiveInferredPropertyValueWatchpoint.h */; }; > 0FD3E40A1B618B6600C80E1E /* ObjectPropertyCondition.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD3E4041B618B6600C80E1E /* ObjectPropertyCondition.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -2705,6 +2707,8 @@ > 0FD0E5EF1E46BF230006AB08 /* RegisterState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterState.h; sourceTree = "<group>"; }; > 0FD0E5F11E46C8AD0006AB08 /* CollectingScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CollectingScope.h; sourceTree = "<group>"; }; > 0FD2C92316D01EE900C7803F /* StructureInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureInlines.h; sourceTree = "<group>"; }; >+ 0FD2FD9220B52BDC00F09441 /* IsoSubspaceInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IsoSubspaceInlines.h; sourceTree = "<group>"; }; >+ 0FD2FD9320B52BDD00F09441 /* CompleteSubspaceInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CompleteSubspaceInlines.h; sourceTree = "<group>"; }; > 0FD3C82014115CF800FD81CB /* DFGDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDriver.cpp; path = dfg/DFGDriver.cpp; sourceTree = "<group>"; }; > 0FD3C82214115D0E00FD81CB /* DFGDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDriver.h; path = dfg/DFGDriver.h; sourceTree = "<group>"; }; > 0FD3E3FF1B618AAF00C80E1E /* DFGAdaptiveInferredPropertyValueWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGAdaptiveInferredPropertyValueWatchpoint.cpp; path = dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp; sourceTree = "<group>"; }; >@@ -5635,6 +5639,7 @@ > 0FD0E5E61E43D3470006AB08 /* CollectorPhase.h */, > 0FDCE1271FAFA859006F3901 /* CompleteSubspace.cpp */, > 0FDCE1281FAFA859006F3901 /* CompleteSubspace.h */, >+ 0FD2FD9320B52BDD00F09441 /* CompleteSubspaceInlines.h */, > 146B14DB12EB5B12001BEC1B /* ConservativeRoots.cpp */, > 149DAAF212EB559D0083B12B /* ConservativeRoots.h */, > 0F41545A1FD20B1F001B58F6 /* ConstraintConcurrency.h */, >@@ -5710,6 +5715,7 @@ > 0FB4677B1FDDA6D8003FCB09 /* IsoCellSetInlines.h */, > 0FDCE12C1FAFB4DE006F3901 /* IsoSubspace.cpp */, > 0FDCE12B1FAFB4DE006F3901 /* IsoSubspace.h */, >+ 0FD2FD9220B52BDC00F09441 /* IsoSubspaceInlines.h */, > 0F5E0FE62086AD470097F0DE /* IsoSubspacePerVM.cpp */, > 0F5E0FE52086AD460097F0DE /* IsoSubspacePerVM.h */, > 0F766D2915A8CC34008F363E /* JITStubRoutineSet.cpp */, >@@ -8315,6 +8321,7 @@ > 0F4C91661C29F4F2004341A6 /* B3OriginDump.h in Headers */, > 0FEC85261BDACDAC0080FF74 /* B3PatchpointSpecial.h in Headers */, > 0FEC85281BDACDAC0080FF74 /* B3PatchpointValue.h in Headers */, >+ 0FD2FD9520B52BE200F09441 /* IsoSubspaceInlines.h in Headers */, > 799EF7C41C56ED96002B0534 /* B3PCToOriginMap.h in Headers */, > 0FEC852A1BDACDAC0080FF74 /* B3PhaseScope.h in Headers */, > 0F37308D1C0BD29100052BFA /* B3PhiChildren.h in Headers */, >@@ -8949,6 +8956,7 @@ > BC18C4140E16F5CD00B34460 /* JavaScriptCore.h in Headers */, > BC18C4150E16F5CD00B34460 /* JavaScriptCorePrefix.h in Headers */, > 1429D9300ED22D7000B89619 /* JIT.h in Headers */, >+ 0FD2FD9420B52BDE00F09441 /* CompleteSubspaceInlines.h in Headers */, > FE1220271BE7F58C0039E6F2 /* JITAddGenerator.h in Headers */, > 0F75A0662013E4F10038E2CF /* JITAllocator.h in Headers */, > FE3A06B21C10CB8900390FDD /* JITBitAndGenerator.h in Headers */, >Index: Source/JavaScriptCore/heap/AllocatorInlines.h >=================================================================== >--- Source/JavaScriptCore/heap/AllocatorInlines.h (revision 232104) >+++ Source/JavaScriptCore/heap/AllocatorInlines.h (working copy) >@@ -30,7 +30,7 @@ > > namespace JSC { > >-inline void* Allocator::allocate(GCDeferralContext* context, AllocationFailureMode mode) const >+ALWAYS_INLINE void* Allocator::allocate(GCDeferralContext* context, AllocationFailureMode mode) const > { > return m_localAllocator->allocate(context, mode); > } >Index: Source/JavaScriptCore/heap/CompleteSubspace.cpp >=================================================================== >--- Source/JavaScriptCore/heap/CompleteSubspace.cpp (revision 232104) >+++ Source/JavaScriptCore/heap/CompleteSubspace.cpp (working copy) >@@ -57,13 +57,6 @@ void* CompleteSubspace::allocate(VM& vm, > return allocateNonVirtual(vm, size, deferralContext, failureMode); > } > >-void* CompleteSubspace::allocateNonVirtual(VM& vm, size_t size, GCDeferralContext* deferralContext, AllocationFailureMode failureMode) >-{ >- if (Allocator allocator = allocatorForNonVirtual(size, AllocatorForMode::AllocatorIfExists)) >- return allocator.allocate(deferralContext, failureMode); >- return allocateSlow(vm, size, deferralContext, failureMode); >-} >- > Allocator CompleteSubspace::allocatorForSlow(size_t size) > { > size_t index = MarkedSpace::sizeClassToIndex(size); >Index: Source/JavaScriptCore/heap/CompleteSubspace.h >=================================================================== >--- Source/JavaScriptCore/heap/CompleteSubspace.h (revision 232104) >+++ Source/JavaScriptCore/heap/CompleteSubspace.h (working copy) >@@ -43,17 +43,17 @@ public: > Allocator allocatorForNonVirtual(size_t, AllocatorForMode); > > void* allocate(VM&, size_t, GCDeferralContext*, AllocationFailureMode) override; >- JS_EXPORT_PRIVATE void* allocateNonVirtual(VM&, size_t, GCDeferralContext*, AllocationFailureMode); >+ void* allocateNonVirtual(VM&, size_t, GCDeferralContext*, AllocationFailureMode); > > static ptrdiff_t offsetOfAllocatorForSizeStep() { return OBJECT_OFFSETOF(CompleteSubspace, m_allocatorForSizeStep); } > > Allocator* allocatorForSizeStep() { return &m_allocatorForSizeStep[0]; } > > private: >- Allocator allocatorForSlow(size_t); >+ JS_EXPORT_PRIVATE Allocator allocatorForSlow(size_t); > > // These slow paths are concerned with large allocations and allocator creation. >- void* allocateSlow(VM&, size_t, GCDeferralContext*, AllocationFailureMode); >+ JS_EXPORT_PRIVATE void* allocateSlow(VM&, size_t, GCDeferralContext*, AllocationFailureMode); > void* tryAllocateSlow(VM&, size_t, GCDeferralContext*); > > std::array<Allocator, MarkedSpace::numSizeClasses> m_allocatorForSizeStep; >Index: Source/JavaScriptCore/heap/CompleteSubspaceInlines.h >=================================================================== >--- Source/JavaScriptCore/heap/CompleteSubspaceInlines.h (nonexistent) >+++ Source/JavaScriptCore/heap/CompleteSubspaceInlines.h (working copy) >@@ -0,0 +1,38 @@ >+/* >+ * Copyright (C) 2018 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. >+ */ >+ >+#pragma once >+ >+namespace JSC { >+ >+ALWAYS_INLINE void* CompleteSubspace::allocateNonVirtual(VM& vm, size_t size, GCDeferralContext* deferralContext, AllocationFailureMode failureMode) >+{ >+ if (Allocator allocator = allocatorForNonVirtual(size, AllocatorForMode::AllocatorIfExists)) >+ return allocator.allocate(deferralContext, failureMode); >+ return allocateSlow(vm, size, deferralContext, failureMode); >+} >+ >+} // namespace JSC >+ >Index: Source/JavaScriptCore/heap/FreeListInlines.h >=================================================================== >--- Source/JavaScriptCore/heap/FreeListInlines.h (revision 232104) >+++ Source/JavaScriptCore/heap/FreeListInlines.h (working copy) >@@ -31,7 +31,7 @@ > namespace JSC { > > template<typename Func> >-HeapCell* FreeList::allocate(const Func& slowPath) >+ALWAYS_INLINE HeapCell* FreeList::allocate(const Func& slowPath) > { > unsigned remaining = m_remaining; > if (remaining) { >Index: Source/JavaScriptCore/heap/IsoSubspace.cpp >=================================================================== >--- Source/JavaScriptCore/heap/IsoSubspace.cpp (revision 232104) >+++ Source/JavaScriptCore/heap/IsoSubspace.cpp (working copy) >@@ -63,14 +63,6 @@ void* IsoSubspace::allocate(VM& vm, size > return allocateNonVirtual(vm, size, deferralContext, failureMode); > } > >-void* IsoSubspace::allocateNonVirtual(VM&, size_t size, GCDeferralContext* deferralContext, AllocationFailureMode failureMode) >-{ >- RELEASE_ASSERT(size == this->size()); >- Allocator allocator = allocatorForNonVirtual(size, AllocatorForMode::MustAlreadyHaveAllocator); >- void* result = allocator.allocate(deferralContext, failureMode); >- return result; >-} >- > void IsoSubspace::didResizeBits(size_t blockIndex) > { > m_cellSets.forEach( >Index: Source/JavaScriptCore/heap/IsoSubspace.h >=================================================================== >--- Source/JavaScriptCore/heap/IsoSubspace.h (revision 232104) >+++ Source/JavaScriptCore/heap/IsoSubspace.h (working copy) >@@ -45,7 +45,7 @@ public: > Allocator allocatorForNonVirtual(size_t, AllocatorForMode); > > void* allocate(VM&, size_t, GCDeferralContext*, AllocationFailureMode) override; >- JS_EXPORT_PRIVATE void* allocateNonVirtual(VM&, size_t, GCDeferralContext*, AllocationFailureMode); >+ void* allocateNonVirtual(VM&, size_t, GCDeferralContext*, AllocationFailureMode); > > private: > friend class IsoCellSet; >@@ -61,7 +61,7 @@ private: > SentinelLinkedList<IsoCellSet, BasicRawSentinelNode<IsoCellSet>> m_cellSets; > }; > >-inline Allocator IsoSubspace::allocatorForNonVirtual(size_t size, AllocatorForMode) >+ALWAYS_INLINE Allocator IsoSubspace::allocatorForNonVirtual(size_t size, AllocatorForMode) > { > RELEASE_ASSERT(size == this->size()); > return Allocator(&m_localAllocator); >Index: Source/JavaScriptCore/heap/IsoSubspaceInlines.h >=================================================================== >--- Source/JavaScriptCore/heap/IsoSubspaceInlines.h (nonexistent) >+++ Source/JavaScriptCore/heap/IsoSubspaceInlines.h (working copy) >@@ -0,0 +1,39 @@ >+/* >+ * Copyright (C) 2018 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. >+ */ >+ >+#pragma once >+ >+namespace JSC { >+ >+ALWAYS_INLINE void* IsoSubspace::allocateNonVirtual(VM&, size_t size, GCDeferralContext* deferralContext, AllocationFailureMode failureMode) >+{ >+ RELEASE_ASSERT(size == this->size()); >+ Allocator allocator = allocatorForNonVirtual(size, AllocatorForMode::MustAlreadyHaveAllocator); >+ void* result = allocator.allocate(deferralContext, failureMode); >+ return result; >+} >+ >+} // namespace JSC >+ >Index: Source/JavaScriptCore/runtime/JSCellInlines.h >=================================================================== >--- Source/JavaScriptCore/runtime/JSCellInlines.h (revision 232104) >+++ Source/JavaScriptCore/runtime/JSCellInlines.h (working copy) >@@ -25,14 +25,19 @@ > > #pragma once > >+#include "AllocatorInlines.h" >+#include "CompleteSubspaceInlines.h" > #include "CPU.h" > #include "CallFrame.h" > #include "DeferGC.h" >+#include "FreeListInlines.h" > #include "Handle.h" >+#include "IsoSubspaceInlines.h" > #include "JSCast.h" > #include "JSDestructibleObject.h" > #include "JSObject.h" > #include "JSString.h" >+#include "LocalAllocatorInlines.h" > #include "MarkedBlock.h" > #include "Structure.h" > #include "Symbol.h" >Index: Source/JavaScriptCore/runtime/JSString.cpp >=================================================================== >--- Source/JavaScriptCore/runtime/JSString.cpp (revision 232104) >+++ Source/JavaScriptCore/runtime/JSString.cpp (working copy) >@@ -295,7 +295,7 @@ void JSRopeString::resolveRope(ExecState > // we would likely have to place all of the constituent StringImpls into the > // Vector before performing any concatenation, but by working backwards we likely > // only fill the queue with the number of substrings at any given level in a >-// rope-of-ropes.) >+// rope-of-ropes.) > void JSRopeString::resolveRopeSlowCase8(LChar* buffer) const > { > LChar* position = buffer + length(); // We will be working backwards over the rope. >Index: Source/JavaScriptCore/runtime/VM.h >=================================================================== >--- Source/JavaScriptCore/runtime/VM.h (revision 232104) >+++ Source/JavaScriptCore/runtime/VM.h (working copy) >@@ -950,7 +950,7 @@ inline Heap* WeakSet::heap() const > extern "C" void sanitizeStackForVMImpl(VM*); > #endif > >-void sanitizeStackForVM(VM*); >+JS_EXPORT_PRIVATE void sanitizeStackForVM(VM*); > void logSanitizeStack(VM*); > > } // namespace JSC >Index: Source/WTF/ChangeLog >=================================================================== >--- Source/WTF/ChangeLog (revision 232104) >+++ Source/WTF/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >+2018-05-23 Filip Pizlo <fpizlo@apple.com> >+ >+ Speed up JetStream/base64 >+ https://bugs.webkit.org/show_bug.cgi?id=185914 >+ >+ Reviewed by Michael Saboff. >+ >+ Make Vector<>::append ALWAYS_INLINE. >+ >+ * wtf/Vector.h: >+ (WTF::Vector::append): >+ (WTF::minCapacity>::expandCapacity): >+ (WTF::minCapacity>::append): >+ (WTF::minCapacity>::tryAppend): >+ > 2018-05-22 Mark Lam <mark.lam@apple.com> > > StringImpl utf8 conversion should not fail silently. >Index: Source/WTF/wtf/Vector.h >=================================================================== >--- Source/WTF/wtf/Vector.h (revision 232104) >+++ Source/WTF/wtf/Vector.h (working copy) >@@ -758,7 +758,7 @@ public: > > void clear() { shrinkCapacity(0); } > >- void append(ValueType&& value) { append<ValueType>(std::forward<ValueType>(value)); } >+ ALWAYS_INLINE void append(ValueType&& value) { append<ValueType>(std::forward<ValueType>(value)); } > template<typename U> void append(U&&); > template<typename... Args> void constructAndAppend(Args&&...); > template<typename... Args> bool tryConstructAndAppend(Args&&...); >@@ -1032,7 +1032,7 @@ void Vector<T, inlineCapacity, OverflowH > } > > template<typename T, size_t inlineCapacity, typename OverflowHandler, size_t minCapacity> >-T* Vector<T, inlineCapacity, OverflowHandler, minCapacity>::expandCapacity(size_t newMinCapacity, T* ptr) >+NEVER_INLINE T* Vector<T, inlineCapacity, OverflowHandler, minCapacity>::expandCapacity(size_t newMinCapacity, T* ptr) > { > if (ptr < begin() || ptr >= end()) { > expandCapacity(newMinCapacity); >@@ -1244,7 +1244,7 @@ void Vector<T, inlineCapacity, OverflowH > > template<typename T, size_t inlineCapacity, typename OverflowHandler, size_t minCapacity> > template<typename U> >-void Vector<T, inlineCapacity, OverflowHandler, minCapacity>::append(const U* data, size_t dataSize) >+ALWAYS_INLINE void Vector<T, inlineCapacity, OverflowHandler, minCapacity>::append(const U* data, size_t dataSize) > { > size_t newSize = m_size + dataSize; > if (newSize > capacity()) { >@@ -1261,7 +1261,7 @@ void Vector<T, inlineCapacity, OverflowH > > template<typename T, size_t inlineCapacity, typename OverflowHandler, size_t minCapacity> > template<typename U> >-bool Vector<T, inlineCapacity, OverflowHandler, minCapacity>::tryAppend(const U* data, size_t dataSize) >+ALWAYS_INLINE bool Vector<T, inlineCapacity, OverflowHandler, minCapacity>::tryAppend(const U* data, size_t dataSize) > { > size_t newSize = m_size + dataSize; > if (newSize > capacity()) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185914
:
341091
|
341116
|
341125
| 341127