search for: memmgr

Displaying 20 results from an estimated 51 matches for "memmgr".

2020 May 26
2
[ORC JIT][MLIR] GDBRegistrationListener "second attempt to perform debug registration" assert
Referring to the log messages from my previous mail… I confused myself (and probably others) by reading the “Adding MemMgr 0x55555959f440“ message as “Registering MemMgr 0x55555959f440”. Thus the address mismatch made no sense. How could we be registering a `MemMgr` address/key that does not match once we arrive in `notifyObjectLoaded` method? Answer: Because the registrations is NOT coming from RTDyldObjectLinking...
2020 May 21
2
[ORC JIT][MLIR] GDBRegistrationListener "second attempt to perform debug registration" assert
...ectInfo const&) const (__args#2=..., >> __args#1=..., __args#0=<optimized out>, this=0x5555594e09b8) at >> /usr/include/c++/7/bits/std_function.h:706 >> >> #6 llvm::orc::RTDyldObjectLinkingLayer::onObjLoad (this=<optimized out>, >> K=3, R=..., Obj=..., MemMgr=0x5555591c4160, >> LoadedObjInfo=std::unique_ptr<llvm::RuntimeDyld::LoadedObjectInfo> = {...}, >> >> Resolved=std::map with 8 elements = {...}, InternalSymbols=std::set >> with 0 elements) >> >> at >> /localdisk/adstraw/ngraph/build/mlir_proje...
2012 Sep 24
0
[LLVMdev] [llvm-commits] Fwd: Re: [PATCH] Fix for bug in JIT exception table allocation
...t; > SavedBufferBegin = BufferBegin; > > > > SavedBufferEnd = BufferEnd; > > > > SavedCurBufferPtr = CurBufferPtr; > > > > + uint8_t *FrameRegister; > > > > > > > > - BufferBegin = CurBufferPtr = > > > > MemMgr->startExceptionTable(F.getFunction(), > > > > - ActualSize); > > > > - BufferEnd = BufferBegin+ActualSize; > > > > - EmittedFunctions[F.getFunction()].ExceptionTable = BufferBegin; > > &gt...
2015 Jul 23
2
[LLVMdev] ORC and relocations
...LoadedFtor = DoNothingOnNotifyLoaded> class ObjectLinkingLayer : public ObjectLinkingLayerBase { private: template <typename MemoryManagerPtrT, typename SymbolResolverPtrT> class ConcreteLinkedObjectSet : public LinkedObjectSet { public: ConcreteLinkedObjectSet(MemoryManagerPtrT MemMgr, SymbolResolverPtrT Resolver) : LinkedObjectSet(*MemMgr, *Resolver), MemMgr(std::move(MemMgr)), Resolver(std::move(Resolver)) { } void Finalize() override { State = Finalizing; RTDyld->resolveRelocations(); RTDyld->registerEHFra...
2015 Jul 23
0
[LLVMdev] ORC and relocations
...gLayer : public ObjectLinkingLayerBase { > > private: > > > > template <typename MemoryManagerPtrT, typename SymbolResolverPtrT> > > class ConcreteLinkedObjectSet : public LinkedObjectSet { > > public: > > ConcreteLinkedObjectSet(MemoryManagerPtrT MemMgr, > > SymbolResolverPtrT Resolver) > > : LinkedObjectSet(*MemMgr, *Resolver), MemMgr(std::move(MemMgr)), > > Resolver(std::move(Resolver)) { } > > > > void Finalize() override { > > State = Finalizing; > >...
2015 Jul 23
2
[LLVMdev] ORC and relocations
...LoadedFtor = DoNothingOnNotifyLoaded> class ObjectLinkingLayer : public ObjectLinkingLayerBase { private: template <typename MemoryManagerPtrT, typename SymbolResolverPtrT> class ConcreteLinkedObjectSet : public LinkedObjectSet { public: ConcreteLinkedObjectSet(MemoryManagerPtrT MemMgr, SymbolResolverPtrT Resolver) : LinkedObjectSet(*MemMgr, *Resolver), MemMgr(std::move(MemMgr)), Resolver(std::move(Resolver)) { } void Finalize() override { State = Finalizing; RTDyld->resolveRelocations(); RTDyld->registerEHFra...
2015 Jul 24
0
[LLVMdev] ORC and relocations
...gLayer : public ObjectLinkingLayerBase { > > private: > > > > template <typename MemoryManagerPtrT, typename SymbolResolverPtrT> > > class ConcreteLinkedObjectSet : public LinkedObjectSet { > > public: > > ConcreteLinkedObjectSet(MemoryManagerPtrT MemMgr, > > SymbolResolverPtrT Resolver) > > : LinkedObjectSet(*MemMgr, *Resolver), MemMgr(std::move(MemMgr)), > > Resolver(std::move(Resolver)) { } > > > > void Finalize() override { > > State = Finalizing; > >...
2020 May 20
2
[ORC JIT][MLIR] GDBRegistrationListener "second attempt to perform debug registration" assert
...File const&, llvm::RuntimeDyld::LoadedObjectInfo const&) const (__args#2=..., __args#1=..., __args#0=<optimized out>, this=0x5555594e09b8) at /usr/include/c++/7/bits/std_function.h:706 #6 llvm::orc::RTDyldObjectLinkingLayer::onObjLoad (this=<optimized out>, K=3, R=..., Obj=..., MemMgr=0x5555591c4160, LoadedObjInfo=std::unique_ptr<llvm::RuntimeDyld::LoadedObjectInfo> = {...}, Resolved=std::map with 8 elements = {...}, InternalSymbols=std::set with 0 elements) at /localdisk/adstraw/ngraph/build/mlir_project/llvm-project/llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkin...
2015 Mar 20
2
[LLVMdev] LLVM Exception Handling
...g triple = llvm::sys::getProcessTriple(); Mod->setTargetTriple(triple); llvm::Function* f = Mod->getFunction("exec"); llvm::TargetOptions Opts; Opts.NoFramePointerElim = true; // Build engine with JIT std::unique_ptr<llvm::RTDyldMemoryManager> MemMgr(new llvm::SectionMemoryManager()); std::string err; llvm::EngineBuilder factory(std::move(Mod)); factory.setErrorStr(&err); factory.setEngineKind(llvm::EngineKind::JIT); factory.setTargetOptions(Opts); factory.setMCJITMemoryManager(std::move(MemMgr)); llvm::...
2018 Sep 18
2
suggested bug fix in RTDyldObjectLinkingLayer
...yldObjectLinkingLayer.h (working copy) @@ -175,7 +175,7 @@ } ~ConcreteLinkedObject() override { - if (this->Parent.NotifyFreed) + if (this->Parent.NotifyFreed && ObjForNotify.getBinary()) this->Parent.NotifyFreed(K, *ObjForNotify.getBinary()); MemMgr->deregisterEHFrames();
2012 Aug 21
2
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
...onEngine/JIT/JITEmitter.cpp (revision 162311) +++ lib/ExecutionEngine/JIT/JITEmitter.cpp (working copy) @@ -974,14 +974,24 @@ SavedBufferBegin = BufferBegin; SavedBufferEnd = BufferEnd; SavedCurBufferPtr = CurBufferPtr; + uint8_t *FrameRegister; - BufferBegin = CurBufferPtr = MemMgr->startExceptionTable(F.getFunction(), - ActualSize); - BufferEnd = BufferBegin+ActualSize; - EmittedFunctions[F.getFunction()].ExceptionTable = BufferBegin; - uint8_t *EhStart; - uint8_t *FrameRegister = DE->EmitDwarfTabl...
2016 Sep 30
2
Bug in 3.9.0 RTDyldMemoryManager.cpp
...to EH frames not being deregistered due to a (typo?) mistake in RTDyldMemoryManager.cpp: void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) override { * registerEHFramesInProcess(Addr, Size);* } ..I overrode the function to call deregister instead of register in my own MemMgr and all's now well. The crash manifests itself as a seg fault when a process causes an exception after JITted code has been removed. Cheers, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160930/...
2012 Aug 22
1
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
On Aug 21, 2012, at 2:12 PM, Michael Muller <mmuller at enduden.com> wrote: > > Hi, I found a bug in the code that generates exception tables, I've attached > what I think is the correct fix. > > When you run out of space writing to a buffer, the buffer management code > simply stops writing at the end of the buffer. It is the responsibility of > the caller to
2007 Dec 11
0
[LLVMdev] Exception handling in JIT
...===------------------------------------------------------------------- > ---===// > // JIT lazy compilation code. > // > @@ -275,6 +290,71 @@ > // JITEmitter code. > // > namespace { > + > + class DwarfJITEmitter : public DwarfEmitter { > + JITMemoryManager *MemMgr; > + const TargetData& TD; > + TargetMachine &TM; > + MachineCodeEmitter& MCE; > + const MRegisterInfo* RI; > + > + public: > + DwarfJITEmitter(MachineCodeEmitter &mce, const TargetData& td, > + TargetMachine& tm) :...
2007 Dec 12
3
[LLVMdev] Exception handling in JIT
...------------------------------ >> ---===// >> // JIT lazy compilation code. >> // >> @@ -275,6 +290,71 @@ >> // JITEmitter code. >> // >> namespace { >> + >> + class DwarfJITEmitter : public DwarfEmitter { >> + JITMemoryManager *MemMgr; >> + const TargetData& TD; >> + TargetMachine &TM; >> + MachineCodeEmitter& MCE; >> + const MRegisterInfo* RI; >> + >> + public: >> + DwarfJITEmitter(MachineCodeEmitter &mce, const TargetData& td, >> +...
2007 Dec 10
2
[LLVMdev] Exception handling in JIT
Hi everyone, Here's a patch that enables exception handling when jitting. I've copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need to factorize it, but the functionality is there and I'm very happy with it :) lli should now be able to execute the output from llvm-gcc when using exceptions (the UnwindInst instruction is not involved in this patch). Just add the
2012 Aug 23
0
[LLVMdev] [PATCH] Fix for bug in JIT exception table allocation (no test yet)
Eric Christopher wrote: > > On Aug 21, 2012, at 2:12 PM, Michael Muller <mmuller at enduden.com> wrote: > > > > > Hi, I found a bug in the code that generates exception tables, I've attached > > what I think is the correct fix. > > > > When you run out of space writing to a buffer, the buffer management code > > simply stops writing at the
2008 Mar 30
3
[LLVMdev] Being able to know the jitted code-size before emitting
Hi everyone, vmkit requires to know the size of a jitted method before emitting the method. This allows to allocate the correct size for the method. The attached patch creates this functionality when the flag SizedMemoryCode is on. In order to implement this functionality, i had to virtualize some MachineCodeEmitter functions. Is it OK to commit the patch? Thanks, Nicolas --------------
2008 Apr 01
2
[LLVMdev] Being able to know the jitted code-size before emitting
...itJumpTableInfo(MachineJumpTableInfo *MJTI); >> void emitJumpTableInfo(MachineJumpTableInfo *MJTI); >> @@ -469,19 +476,47 @@ >> >> >> void JITEmitter::startFunction(MachineFunction &F) { >> - uintptr_t ActualSize; >> - BufferBegin = CurBufferPtr = MemMgr- >> >>> startFunctionBody(F.getFunction(), >>> >> - ActualSize); >> - BufferEnd = BufferBegin+ActualSize; >> + MMI->BeginFunction(&F); >> >> - // Ensure the constant...
2008 Mar 31
0
[LLVMdev] Being able to know the jitted code-size before emitting
...Pool *MCP); > void initJumpTableInfo(MachineJumpTableInfo *MJTI); > void emitJumpTableInfo(MachineJumpTableInfo *MJTI); > @@ -469,19 +476,47 @@ > > > void JITEmitter::startFunction(MachineFunction &F) { > - uintptr_t ActualSize; > - BufferBegin = CurBufferPtr = MemMgr- > >startFunctionBody(F.getFunction(), > - ActualSize); > - BufferEnd = BufferBegin+ActualSize; > + MMI->BeginFunction(&F); > > - // Ensure the constant pool/jump table info is at least 4-byte > aligned. &g...