Commit c63e1b9e authored by barraclough@apple.com's avatar barraclough@apple.com

2009-04-17 Gavin Barraclough <barraclough@apple.com>

        Reviewed by Geoff Garen.

        On x86_64, make all JIT-code allocations from a new heap, managed
        by FixedVMPoolAllocator.  This class allocates a single large (2Gb)
        pool of virtual memory from which all further allocations take place.
        Since all JIT code is allocated from this pool, we can continue to
        safely assume (as is already asserted) that it will always be possible
        to link any JIT-code to JIT-code jumps and calls.

        * JavaScriptCore.xcodeproj/project.pbxproj:
            Add new file.
        * jit/ExecutableAllocatorFixedVMPool.cpp: Added.
        (JSC::FreeListEntry::FreeListEntry):
        (JSC::AVLTreeAbstractorForFreeList::get_less):
        (JSC::AVLTreeAbstractorForFreeList::set_less):
        (JSC::AVLTreeAbstractorForFreeList::get_greater):
        (JSC::AVLTreeAbstractorForFreeList::set_greater):
        (JSC::AVLTreeAbstractorForFreeList::get_balance_factor):
        (JSC::AVLTreeAbstractorForFreeList::set_balance_factor):
        (JSC::AVLTreeAbstractorForFreeList::null):
        (JSC::AVLTreeAbstractorForFreeList::compare_key_key):
        (JSC::AVLTreeAbstractorForFreeList::compare_key_node):
        (JSC::AVLTreeAbstractorForFreeList::compare_node_node):
        (JSC::sortFreeListEntriesByPointer):
        (JSC::sortCommonSizedAllocations):
        (JSC::FixedVMPoolAllocator::release):
        (JSC::FixedVMPoolAllocator::reuse):
        (JSC::FixedVMPoolAllocator::addToFreeList):
        (JSC::FixedVMPoolAllocator::coalesceFreeSpace):
        (JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
        (JSC::FixedVMPoolAllocator::alloc):
        (JSC::FixedVMPoolAllocator::free):
        (JSC::ExecutableAllocator::intializePageSize):
        (JSC::ExecutablePool::systemAlloc):
        (JSC::ExecutablePool::systemRelease):
            The new 2Gb heap class!
        * jit/ExecutableAllocatorPosix.cpp:
            Disable use of this implementation on x86_64.
        * wtf/AVLTree.h:
            Add missing variable initialization.
        (WTF::::remove):



git-svn-id: svn://svn.chromium.org/blink/trunk@42638 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent d8eb6ed6
2009-04-17 Gavin Barraclough <barraclough@apple.com>
Reviewed by Geoff Garen.
On x86_64, make all JIT-code allocations from a new heap, managed
by FixedVMPoolAllocator. This class allocates a single large (2Gb)
pool of virtual memory from which all further allocations take place.
Since all JIT code is allocated from this pool, we can continue to
safely assume (as is already asserted) that it will always be possible
to link any JIT-code to JIT-code jumps and calls.
* JavaScriptCore.xcodeproj/project.pbxproj:
Add new file.
* jit/ExecutableAllocatorFixedVMPool.cpp: Added.
(JSC::FreeListEntry::FreeListEntry):
(JSC::AVLTreeAbstractorForFreeList::get_less):
(JSC::AVLTreeAbstractorForFreeList::set_less):
(JSC::AVLTreeAbstractorForFreeList::get_greater):
(JSC::AVLTreeAbstractorForFreeList::set_greater):
(JSC::AVLTreeAbstractorForFreeList::get_balance_factor):
(JSC::AVLTreeAbstractorForFreeList::set_balance_factor):
(JSC::AVLTreeAbstractorForFreeList::null):
(JSC::AVLTreeAbstractorForFreeList::compare_key_key):
(JSC::AVLTreeAbstractorForFreeList::compare_key_node):
(JSC::AVLTreeAbstractorForFreeList::compare_node_node):
(JSC::sortFreeListEntriesByPointer):
(JSC::sortCommonSizedAllocations):
(JSC::FixedVMPoolAllocator::release):
(JSC::FixedVMPoolAllocator::reuse):
(JSC::FixedVMPoolAllocator::addToFreeList):
(JSC::FixedVMPoolAllocator::coalesceFreeSpace):
(JSC::FixedVMPoolAllocator::FixedVMPoolAllocator):
(JSC::FixedVMPoolAllocator::alloc):
(JSC::FixedVMPoolAllocator::free):
(JSC::ExecutableAllocator::intializePageSize):
(JSC::ExecutablePool::systemAlloc):
(JSC::ExecutablePool::systemRelease):
The new 2Gb heap class!
* jit/ExecutableAllocatorPosix.cpp:
Disable use of this implementation on x86_64.
* wtf/AVLTree.h:
Add missing variable initialization.
(WTF::::remove):
2009-04-17 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
......@@ -125,6 +125,7 @@
86CC85A30EE79B7400288682 /* JITCall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86CC85A20EE79B7400288682 /* JITCall.cpp */; };
86CC85C40EE7A89400288682 /* JITPropertyAccess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86CC85C30EE7A89400288682 /* JITPropertyAccess.cpp */; };
86CCEFDE0F413F8900FD7F9E /* JITCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 86CCEFDD0F413F8900FD7F9E /* JITCode.h */; };
86DB64640F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86DB64630F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp */; };
86EAC4950F93E8D1008EC948 /* RegexCompiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EAC48D0F93E8D1008EC948 /* RegexCompiler.cpp */; };
86EAC4960F93E8D1008EC948 /* RegexCompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EAC48E0F93E8D1008EC948 /* RegexCompiler.h */; };
86EAC4970F93E8D1008EC948 /* RegexInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86EAC48F0F93E8D1008EC948 /* RegexInterpreter.cpp */; };
......@@ -615,6 +616,8 @@
86CC85A20EE79B7400288682 /* JITCall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITCall.cpp; sourceTree = "<group>"; };
86CC85C30EE7A89400288682 /* JITPropertyAccess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITPropertyAccess.cpp; sourceTree = "<group>"; };
86CCEFDD0F413F8900FD7F9E /* JITCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITCode.h; sourceTree = "<group>"; };
86DB645F0F954E9100D7D921 /* ExecutableAllocatorWin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutableAllocatorWin.cpp; sourceTree = "<group>"; };
86DB64630F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutableAllocatorFixedVMPool.cpp; sourceTree = "<group>"; };
86EAC48D0F93E8D1008EC948 /* RegexCompiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegexCompiler.cpp; path = yarr/RegexCompiler.cpp; sourceTree = "<group>"; };
86EAC48E0F93E8D1008EC948 /* RegexCompiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegexCompiler.h; path = yarr/RegexCompiler.h; sourceTree = "<group>"; };
86EAC48F0F93E8D1008EC948 /* RegexInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegexInterpreter.cpp; path = yarr/RegexInterpreter.cpp; sourceTree = "<group>"; };
......@@ -1011,7 +1014,9 @@
86CCEFDD0F413F8900FD7F9E /* JITCode.h */,
A7B48DB60EE74CFC00DCBDB6 /* ExecutableAllocator.cpp */,
A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */,
86DB64630F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp */,
A782F1A40EEC9FA20036273F /* ExecutableAllocatorPosix.cpp */,
86DB645F0F954E9100D7D921 /* ExecutableAllocatorWin.cpp */,
1429D92D0ED22D7000B89619 /* JIT.cpp */,
1429D92E0ED22D7000B89619 /* JIT.h */,
86A90ECF0EE7D51F00AB350D /* JITArithmetic.cpp */,
......@@ -2153,6 +2158,7 @@
86EAC4950F93E8D1008EC948 /* RegexCompiler.cpp in Sources */,
86EAC4970F93E8D1008EC948 /* RegexInterpreter.cpp in Sources */,
86EAC4990F93E8D1008EC948 /* RegexJIT.cpp in Sources */,
86DB64640F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -27,7 +27,7 @@
#include "ExecutableAllocator.h"
#if ENABLE(ASSEMBLER)
#if ENABLE(ASSEMBLER) && !(PLATFORM(MAC) && PLATFORM(X86_64))
#include <sys/mman.h>
#include <unistd.h>
......
......@@ -764,7 +764,7 @@ AVLTree<Abstractor, maxDepth, BSet>::remove(key k)
handle h = abs.root;
handle parent = null(), child;
int cmp, cmp_shortened_sub_with_path;
int cmp, cmp_shortened_sub_with_path = 0;
for (;;) {
if (h == null())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment