search for: allocatecodesection

Displaying 12 results from an estimated 12 matches for "allocatecodesection".

2013 Oct 01
2
[LLVMdev] JITMemoryManager
...>GetNumCodeSlabs(); } virtual unsigned GetNumDataSlabs() { return mgr()->GetNumDataSlabs(); } virtual unsigned GetNumStubSlabs() { return mgr()->GetNumStubSlabs(); } /* * From RTDyldMemoryManager */ virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, unsigned SectionID) { return mgr()->allocateCodeSection(Size, Alignment, SectionID); } #if HAVE_LLVM >= 0x0303 virtual uint8_t *allocateDataSection(ui...
2017 Feb 27
2
How to catch EXCEPTION_ACCESS_VIOLATION exceptions on win64
LLVM3.8 version. https://bugs.llvm.org//show_bug.cgi?id=24233. The example can catch exception. But I use my own code for testing, CustomEHMemoryManager allocated memory address is very large, allocateCodeSection, allocateDataSection assigned address (more than 32 bit address space) is getting smaller and smaller. Cause registerEHFrames to fail. 3.9.1 or 4.0.0 version has been supported on win x64? Or how to solve this problem? haifeng.qin at wellintech.com 发件人: haifeng.qin at wellintech.com 发送时间: 201...
2013 Oct 02
0
[LLVMdev] JITMemoryManager
...ual unsigned GetNumDataSlabs() { > return mgr()->GetNumDataSlabs(); > } > virtual unsigned GetNumStubSlabs() { > return mgr()->GetNumStubSlabs(); > } > > /* > * From RTDyldMemoryManager > */ > virtual uint8_t *allocateCodeSection(uintptr_t Size, > unsigned Alignment, > unsigned SectionID) { > return mgr()->allocateCodeSection(Size, Alignment, SectionID); > } > #if HAVE_LLVM >= 0x0303 > virtual uint8_...
2013 Oct 02
3
[LLVMdev] JITMemoryManager
...t; return mgr()->GetNumDataSlabs(); >> } >> virtual unsigned GetNumStubSlabs() { >> return mgr()->GetNumStubSlabs(); >> } >> >> /* >> * From RTDyldMemoryManager >> */ >> virtual uint8_t *allocateCodeSection(uintptr_t Size, >> unsigned Alignment, >> unsigned SectionID) { >> return mgr()->allocateCodeSection(Size, Alignment, SectionID); >> } >> #if HAVE_LLVM >= 0x0303 >...
2018 Nov 02
4
JIT-Client for Shared Memory
Hello everyone, I want to use the LLVM to write a JIT client, that works with shared memory. Currently I proceed as following: I wrote an own class that inherits "RTDyldMemoryManager". The functions "allocateCodeSection" and "allocateDataSection" are allocating local non-shared memory. I store there addresses in a std::vector. When the function "notifyObjectLoaded" is invoked, I allocate the shared memory - I'm getting the size from the local non-shared memory - and apply the address m...
2014 Jan 03
2
[LLVMdev] Making LLVM safer in out-of-memory situations
...haps I'm missing something regarding your particular scenario. > In any event, there are good reasons why a memory manager (particularly for local use) might want to know the total size before allocation begins. We subclass RTDyldMemoryManager interface to implement allocateDataSection and allocateCodeSection. As you know, when RuntimeDyld loads a module, it calls one of these methods for each section. I want that all sections of a module are allocated in one block. One reason is efficiency, another is that 32-bit relocations fail when the blocks are too far from each other. So we compute the total siz...
2014 Sep 18
5
[LLVMdev] VEX prefixes for JIT in llvm 3.5
Hi Matt, Philip, You could get the data you want by recording the addresses returned by the allocateCodeSection and allocateDataSection methods on your RTDyldMemoryManager, then disassembling those sections after you've called resolveRelocations. That's a little unsatisfying though. For one thing, unless you very carefully maintain the association with the original object via back-channels there will...
2017 Feb 16
2
How to catch EXCEPTION_ACCESS_VIOLATION exceptions on win64
For help: Llvm generated instruction calls a function (extern), the function will have a SEH exception (EXCEPTION_ACCESS_VIOLATION), But JIT can not capture the exception of the EXCEPTION_ACCESS_VIOLATION. I saw Bug 24233. EXCEPTION_ACCESS_VIOLATION exception cannot be captured after modification. How to catch EXCEPTION_ACCESS_VIOLATION exceptions on win64 ? haifeng.qin at wellintech.com
2018 Nov 12
2
JIT-Client for Shared Memory
...t;> >>> I want to use the LLVM to write a JIT client, that works with shared >>> memory. Currently I proceed as following: >>> >>> >>> >>> I wrote an own class that inherits "*RTDyldMemoryManager*". The >>> functions "*allocateCodeSection*" and "*allocateDataSection*" are >>> allocating local non-shared memory. I store there addresses in a >>> std::vector. >>> >>> When the function "*notifyObjectLoaded*" is invoked, I allocate the >>> shared memory - I'm getti...
2013 Dec 20
3
[LLVMdev] Making LLVM safer in out-of-memory situations
>> To increase stability for us we have already moved the main part of the compilation to a separate process that may crash in case of an error without doing much harm, i.e. does not crash the database. > Were there any interesting challenges that arose during this process? > This seems to be an approach many folks are either taking or > considering. If there are things we could
2017 May 07
2
[cfe-dev] JIT doens't resolve address - Resolve obj-Addresses?
...basis (there is no easy way to do it per-function) by using a custom memory manager, rather than SectionMemoryManager. There are two ways to go about this: (1) The easy way (only valid for shared-memory on the same machine) is to allocate the sections directly out of shared memory (by overriding allocateCodeSection/allocateDataSection). (2) The hard way (which is general enough to allow you to copy the relocated bytes to remote machines) is three part: (a) Allocate the sections locally (e.g. using malloc, or inheriting from SectionMemoryManager and capturing the allocation details) (b) Override the notifyO...
2014 Sep 17
2
[LLVMdev] VEX prefixes for JIT in llvm 3.5
Great stuff; thanks both! I'm also looking to turn my MCJIT conversion spike into our main use case. The only thing I'm missing is the ability to get a post-linked copy of the generated assembly. In JIT I used JITEventListener's NotifyFunctionEmitted and used a MCDisassembler to disassemble the stream (with my own custom annotators), and redirected the output to the relevant place