Title: [167397] trunk/Source/_javascript_Core
- Revision
- 167397
- Author
- fpi...@apple.com
- Date
- 2014-04-16 16:30:02 -0700 (Wed, 16 Apr 2014)
Log Message
Allocate the data section on the heap again for FTL on ARM64
https://bugs.webkit.org/show_bug.cgi?id=130156
Patch by Juergen Ributzka <juer...@apple.com> on 2014-04-16
Reviewed by Geoffrey Garen and Filip Pizlo.
* ftl/FTLCompile.cpp:
(JSC::FTL::mmAllocateDataSection):
* ftl/FTLDataSection.cpp:
(JSC::FTL::DataSection::DataSection):
(JSC::FTL::DataSection::~DataSection):
* ftl/FTLDataSection.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (167396 => 167397)
--- trunk/Source/_javascript_Core/ChangeLog 2014-04-16 23:07:49 UTC (rev 167396)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-04-16 23:30:02 UTC (rev 167397)
@@ -1,3 +1,17 @@
+2014-04-16 Juergen Ributzka <juer...@apple.com>
+
+ Allocate the data section on the heap again for FTL on ARM64
+ https://bugs.webkit.org/show_bug.cgi?id=130156
+
+ Reviewed by Geoffrey Garen and Filip Pizlo.
+
+ * ftl/FTLCompile.cpp:
+ (JSC::FTL::mmAllocateDataSection):
+ * ftl/FTLDataSection.cpp:
+ (JSC::FTL::DataSection::DataSection):
+ (JSC::FTL::DataSection::~DataSection):
+ * ftl/FTLDataSection.h:
+
2014-04-16 Mark Lam <mark....@apple.com>
Crash in CodeBlock::setOptimizationThresholdBasedOnCompilationResult() when the debugger activates.
Modified: trunk/Source/_javascript_Core/ftl/FTLCompile.cpp (167396 => 167397)
--- trunk/Source/_javascript_Core/ftl/FTLCompile.cpp 2014-04-16 23:07:49 UTC (rev 167396)
+++ trunk/Source/_javascript_Core/ftl/FTLCompile.cpp 2014-04-16 23:30:02 UTC (rev 167397)
@@ -79,11 +79,14 @@
UNUSED_PARAM(sectionID);
UNUSED_PARAM(isReadOnly);
+ // Allocate the GOT in the code section to make it reachable for all code.
+ if (!strcmp(sectionName, "__got"))
+ return mmAllocateCodeSection(opaqueState, size, alignment, sectionID, sectionName);
+
State& state = *static_cast<State*>(opaqueState);
-
- RefPtr<DataSection> section = adoptRef(new DataSection(
- state.graph.m_vm, state.graph.m_codeBlock, size, alignment));
-
+
+ RefPtr<DataSection> section = adoptRef(new DataSection(size, alignment));
+
if (!strcmp(sectionName, "__llvm_stackmaps"))
state.stackmapsSection = section;
else {
@@ -94,7 +97,7 @@
state.compactUnwindSize = size;
}
}
-
+
return bitwise_cast<uint8_t*>(section->base());
}
Modified: trunk/Source/_javascript_Core/ftl/FTLDataSection.cpp (167396 => 167397)
--- trunk/Source/_javascript_Core/ftl/FTLDataSection.cpp 2014-04-16 23:07:49 UTC (rev 167396)
+++ trunk/Source/_javascript_Core/ftl/FTLDataSection.cpp 2014-04-16 23:30:02 UTC (rev 167397)
@@ -34,30 +34,9 @@
namespace JSC { namespace FTL {
-#if CPU(ARM64)
-// FIXME: We should undo this once we fix relocation issues.
-// https://bugs.webkit.org/show_bug.cgi?id=129756
-static const bool useExecutableMemory = true;
-#else
-static const bool useExecutableMemory = false;
-#endif
-
-DataSection::DataSection(VM& vm, CodeBlock* codeBlock, size_t size, unsigned alignment)
+DataSection::DataSection(size_t size, unsigned alignment)
: m_size(size)
{
- if (useExecutableMemory) {
- RELEASE_ASSERT(alignment < jitAllocationGranule);
-
- RefPtr<ExecutableMemoryHandle> result =
- vm.executableAllocator.allocate(
- vm, size, codeBlock, JITCompilationMustSucceed);
- m_base = result->start();
- m_size = result->sizeInBytes();
-
- m_allocationBase = result.release().leakRef();
- return;
- }
-
RELEASE_ASSERT(WTF::bitCount(alignment) == 1);
const unsigned nativeAlignment = 8;
@@ -76,10 +55,7 @@
DataSection::~DataSection()
{
- if (useExecutableMemory)
- static_cast<ExecutableMemoryHandle*>(m_allocationBase)->deref();
- else
- fastFree(m_allocationBase);
+ fastFree(m_allocationBase);
}
} } // namespace JSC::FTL
Modified: trunk/Source/_javascript_Core/ftl/FTLDataSection.h (167396 => 167397)
--- trunk/Source/_javascript_Core/ftl/FTLDataSection.h 2014-04-16 23:07:49 UTC (rev 167396)
+++ trunk/Source/_javascript_Core/ftl/FTLDataSection.h 2014-04-16 23:30:02 UTC (rev 167397)
@@ -36,7 +36,7 @@
class DataSection : public RefCounted<DataSection> {
public:
- DataSection(VM&, CodeBlock*, size_t, unsigned alignment);
+ DataSection(size_t, unsigned alignment);
~DataSection();
void* base() { return m_base; }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes