<https://webkit.org/b/129984>
Made most of the functions called by the DeferGC RAII object inline
to avoid function call overhead.
Looks like ~1% progression on DYEB.
Reviewed by Geoffrey Garen.
* heap/Heap.cpp:
* heap/Heap.h:
(JSC::Heap::incrementDeferralDepth):
(JSC::Heap::decrementDeferralDepth):
(JSC::Heap::collectIfNecessaryOrDefer):
(JSC::Heap::decrementDeferralDepthAndGCIfNeeded):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@165355
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2014-03-09 Andreas Kling <akling@apple.com>
+
+ Inline the trivial parts of GC deferral.
+ <https://webkit.org/b/129984>
+
+ Made most of the functions called by the DeferGC RAII object inline
+ to avoid function call overhead.
+
+ Looks like ~1% progression on DYEB.
+
+ Reviewed by Geoffrey Garen.
+
+ * heap/Heap.cpp:
+ * heap/Heap.h:
+ (JSC::Heap::incrementDeferralDepth):
+ (JSC::Heap::decrementDeferralDepth):
+ (JSC::Heap::collectIfNecessaryOrDefer):
+ (JSC::Heap::decrementDeferralDepthAndGCIfNeeded):
+
2014-03-08 Mark Lam <mark.lam@apple.com>
32-bit x86 handleUncaughtException returns to wrong location after a stack overflow.
}
}
-bool Heap::collectIfNecessaryOrDefer()
-{
- if (isDeferred())
- return false;
-
- if (!shouldCollect())
- return false;
-
- collect();
- return true;
-}
-
void Heap::suspendCompilerThreads()
{
#if ENABLE(DFG_JIT)
m_objectSpace.forEachDeadCell<Zombify>(iterationScope);
}
-void Heap::incrementDeferralDepth()
-{
- RELEASE_ASSERT(m_deferralDepth < 100); // Sanity check to make sure this doesn't get ridiculous.
-
- m_deferralDepth++;
-}
-
-void Heap::decrementDeferralDepth()
-{
- RELEASE_ASSERT(m_deferralDepth >= 1);
-
- m_deferralDepth--;
-}
-
-void Heap::decrementDeferralDepthAndGCIfNeeded()
-{
- decrementDeferralDepth();
- collectIfNecessaryOrDefer();
-}
-
void Heap::writeBarrier(const JSCell* from)
{
#if ENABLE(GGC)
JSStack& stack();
- JS_EXPORT_PRIVATE void incrementDeferralDepth();
+ void incrementDeferralDepth();
void decrementDeferralDepth();
- JS_EXPORT_PRIVATE void decrementDeferralDepthAndGCIfNeeded();
+ void decrementDeferralDepthAndGCIfNeeded();
const HeapType m_heapType;
const size_t m_ramSize;
}
#endif
+
+inline void Heap::incrementDeferralDepth()
+{
+ RELEASE_ASSERT(m_deferralDepth < 100); // Sanity check to make sure this doesn't get ridiculous.
+ m_deferralDepth++;
+}
+
+inline void Heap::decrementDeferralDepth()
+{
+ RELEASE_ASSERT(m_deferralDepth >= 1);
+ m_deferralDepth--;
+}
+
+inline bool Heap::collectIfNecessaryOrDefer()
+{
+ if (isDeferred())
+ return false;
+
+ if (!shouldCollect())
+ return false;
+
+ collect();
+ return true;
+}
+
+inline void Heap::decrementDeferralDepthAndGCIfNeeded()
+{
+ decrementDeferralDepth();
+ collectIfNecessaryOrDefer();
+}
+
} // namespace JSC
#endif // Heap_h