Title: [184448] trunk/Source
- Revision
- 184448
- Author
- [email protected]
- Date
- 2015-05-17 23:26:10 -0700 (Sun, 17 May 2015)
Log Message
Do not use fastMallocGoodSize anywhere
https://bugs.webkit.org/show_bug.cgi?id=145103
Reviewed by Michael Saboff.
Source/_javascript_Core:
* assembler/AssemblerBuffer.h:
(JSC::AssemblerData::AssemblerData):
(JSC::AssemblerData::grow):
Source/WTF:
It is silly we see fastMallocGoodSize in profiles, it does absolutely nothing.
This patch keeps fastMallocGoodSize() around for older code linking
with newer WebKit, but remove any use of it inside WebKit.
* wtf/FastMalloc.cpp:
(WTF::fastMallocGoodSize):
* wtf/FastMalloc.h:
* wtf/Vector.h:
(WTF::VectorBufferBase::allocateBuffer):
(WTF::VectorBufferBase::tryAllocateBuffer):
(WTF::VectorBufferBase::reallocateBuffer):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (184447 => 184448)
--- trunk/Source/_javascript_Core/ChangeLog 2015-05-18 06:23:31 UTC (rev 184447)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-05-18 06:26:10 UTC (rev 184448)
@@ -1,5 +1,16 @@
2015-05-17 Benjamin Poulain <[email protected]>
+ Do not use fastMallocGoodSize anywhere
+ https://bugs.webkit.org/show_bug.cgi?id=145103
+
+ Reviewed by Michael Saboff.
+
+ * assembler/AssemblerBuffer.h:
+ (JSC::AssemblerData::AssemblerData):
+ (JSC::AssemblerData::grow):
+
+2015-05-17 Benjamin Poulain <[email protected]>
+
[JSC] Make StringRecursionChecker faster in the simple cases without any recursion
https://bugs.webkit.org/show_bug.cgi?id=145102
Modified: trunk/Source/_javascript_Core/assembler/AssemblerBuffer.h (184447 => 184448)
--- trunk/Source/_javascript_Core/assembler/AssemblerBuffer.h 2015-05-18 06:23:31 UTC (rev 184447)
+++ trunk/Source/_javascript_Core/assembler/AssemblerBuffer.h 2015-05-18 06:26:10 UTC (rev 184448)
@@ -69,7 +69,7 @@
AssemblerData(unsigned initialCapacity)
{
- m_capacity = fastMallocGoodSize(initialCapacity);
+ m_capacity = initialCapacity;
m_buffer = static_cast<char*>(fastMalloc(m_capacity));
}
@@ -101,7 +101,7 @@
void grow(unsigned extraCapacity = 0)
{
- m_capacity = fastMallocGoodSize(m_capacity + m_capacity / 2 + extraCapacity);
+ m_capacity = m_capacity + m_capacity / 2 + extraCapacity;
m_buffer = static_cast<char*>(fastRealloc(m_buffer, m_capacity));
}
Modified: trunk/Source/WTF/ChangeLog (184447 => 184448)
--- trunk/Source/WTF/ChangeLog 2015-05-18 06:23:31 UTC (rev 184447)
+++ trunk/Source/WTF/ChangeLog 2015-05-18 06:26:10 UTC (rev 184448)
@@ -1,3 +1,23 @@
+2015-05-17 Benjamin Poulain <[email protected]>
+
+ Do not use fastMallocGoodSize anywhere
+ https://bugs.webkit.org/show_bug.cgi?id=145103
+
+ Reviewed by Michael Saboff.
+
+ It is silly we see fastMallocGoodSize in profiles, it does absolutely nothing.
+
+ This patch keeps fastMallocGoodSize() around for older code linking
+ with newer WebKit, but remove any use of it inside WebKit.
+
+ * wtf/FastMalloc.cpp:
+ (WTF::fastMallocGoodSize):
+ * wtf/FastMalloc.h:
+ * wtf/Vector.h:
+ (WTF::VectorBufferBase::allocateBuffer):
+ (WTF::VectorBufferBase::tryAllocateBuffer):
+ (WTF::VectorBufferBase::reallocateBuffer):
+
2015-05-15 Dan Bernstein <[email protected]>
Build fix for some versions of clang.
Modified: trunk/Source/WTF/wtf/FastMalloc.cpp (184447 => 184448)
--- trunk/Source/WTF/wtf/FastMalloc.cpp 2015-05-18 06:23:31 UTC (rev 184447)
+++ trunk/Source/WTF/wtf/FastMalloc.cpp 2015-05-18 06:26:10 UTC (rev 184448)
@@ -222,7 +222,6 @@
size_t fastMallocGoodSize(size_t size)
{
- // FIXME: This is non-helpful; fastMallocGoodSize will be removed soon.
return size;
}
Modified: trunk/Source/WTF/wtf/FastMalloc.h (184447 => 184448)
--- trunk/Source/WTF/wtf/FastMalloc.h 2015-05-18 06:23:31 UTC (rev 184447)
+++ trunk/Source/WTF/wtf/FastMalloc.h 2015-05-18 06:26:10 UTC (rev 184448)
@@ -56,6 +56,8 @@
WTF_EXPORT_PRIVATE void fastAlignedFree(void*);
WTF_EXPORT_PRIVATE size_t fastMallocSize(const void*);
+
+// FIXME: This is non-helpful; fastMallocGoodSize will be removed soon.
WTF_EXPORT_PRIVATE size_t fastMallocGoodSize(size_t);
WTF_EXPORT_PRIVATE void releaseFastMallocFreeMemory();
Modified: trunk/Source/WTF/wtf/Vector.h (184447 => 184448)
--- trunk/Source/WTF/wtf/Vector.h 2015-05-18 06:23:31 UTC (rev 184447)
+++ trunk/Source/WTF/wtf/Vector.h 2015-05-18 06:26:10 UTC (rev 184448)
@@ -264,7 +264,7 @@
ASSERT(newCapacity);
if (newCapacity > std::numeric_limits<unsigned>::max() / sizeof(T))
CRASH();
- size_t sizeToAllocate = fastMallocGoodSize(newCapacity * sizeof(T));
+ size_t sizeToAllocate = newCapacity * sizeof(T);
m_capacity = sizeToAllocate / sizeof(T);
m_buffer = static_cast<T*>(fastMalloc(sizeToAllocate));
}
@@ -275,7 +275,7 @@
if (newCapacity > std::numeric_limits<unsigned>::max() / sizeof(T))
return false;
- size_t sizeToAllocate = fastMallocGoodSize(newCapacity * sizeof(T));
+ size_t sizeToAllocate = newCapacity * sizeof(T);
T* newBuffer;
if (tryFastMalloc(sizeToAllocate).getValue(newBuffer)) {
m_capacity = sizeToAllocate / sizeof(T);
@@ -295,7 +295,7 @@
ASSERT(shouldReallocateBuffer(newCapacity));
if (newCapacity > std::numeric_limits<size_t>::max() / sizeof(T))
CRASH();
- size_t sizeToAllocate = fastMallocGoodSize(newCapacity * sizeof(T));
+ size_t sizeToAllocate = newCapacity * sizeof(T);
m_capacity = sizeToAllocate / sizeof(T);
m_buffer = static_cast<T*>(fastRealloc(m_buffer, sizeToAllocate));
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes