search for: notifyobjectload

Displaying 20 results from an estimated 28 matches for "notifyobjectload".

Did you mean: notifyobjectloaded
2020 May 26
2
[ORC JIT][MLIR] GDBRegistrationListener "second attempt to perform debug registration" assert
...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 RTDyldObjectLinkingLayer.cpp. I found this first by adding an additional debug statement (highlighted) thinking the `reinterpret_cast` may be at fault for the key mismatch. I never saw this print and I then realized my “Adding” vs....
2020 May 21
2
[ORC JIT][MLIR] GDBRegistrationListener "second attempt to perform debug registration" assert
...144d8 >> "/localdisk/adstraw/ngraph/build/mlir_project/llvm-project/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp", >> line=line at entry=164, >> >> function=function at entry=0x7ffff1d15520 <(anonymous >> namespace)::GDBJITRegistrationListener::notifyObjectLoaded(unsigned long, >> llvm::object::ObjectFile const&, llvm::RuntimeDyld::LoadedObjectInfo >> const&)::__PRETTY_FUNCTION__> "virtual void >> {anonymous}::GDBJITRegistrationListener::notifyObjectLoaded(llvm::JITEventListener::ObjectKey, >> const llvm::object::Ob...
2020 May 20
2
[ORC JIT][MLIR] GDBRegistrationListener "second attempt to perform debug registration" assert
...quot;", file=file at entry=0x7ffff1d144d8 "/localdisk/adstraw/ngraph/build/mlir_project/llvm-project/llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp", line=line at entry=164, function=function at entry=0x7ffff1d15520 <(anonymous namespace)::GDBJITRegistrationListener::notifyObjectLoaded(unsigned long, llvm::object::ObjectFile const&, llvm::RuntimeDyld::LoadedObjectInfo const&)::__PRETTY_FUNCTION__> "virtual void {anonymous}::GDBJITRegistrationListener::notifyObjectLoaded(llvm::JITEventListener::ObjectKey, const llvm::object::ObjectFile&, const llvm::RuntimeDy...
2018 Nov 02
4
JIT-Client for Shared Memory
...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 mapping. When the function "finalizeMemory" is invoked I copy the code from the local non-shared memory to the shared memory but only one time. So far so g...
2017 May 17
2
JIT - Resolve obj file without a main
...ed my SymbolResolver in this special case. Could you please tell me, if there is a way to allocate the memory for the codemodules more precise? I would like to allocate the memory for strings from a separated memory-pool. But how can I detect a string? The only moment I can do this is in "notifyObjectLoaded" via the names of the symbols. But than it is impossible for my to get the address of the symbols. I noticed that some strings are stored in .rdata, but this is no guarantee. Kind regards Björn From: Lang Hames <lhames at gmail.com> To: bjoern.gaier at horiba.com Cc: C...
2017 May 29
1
JIT - Resolve obj file without a main
...solve obj file without a main Hi Bjoern, Could you please tell me, if there is a way to allocate the memory for the codemodules more precise? I would like to allocate the memory for strings from a separated memory-pool. But how can I detect a string? The only moment I can do this is in "notifyObjectLoaded" via the names of the symbols. But than it is impossible for my to get the address of the symbols. I noticed that some strings are stored in .rdata, but this is no guarantee. There is no easy way to do this at the moment, any it will always be limited by what the object format allows (...
2018 Nov 12
2
JIT-Client for Shared Memory
...targeting – so I can only allocate it once, but how do I know how much >>> memory I’m going to need, when each sections requests the memory after each >>> other? >>> To work around this I first allocate the memory locally and count the >>> bytes it needed. After notifyObjectLoaded I can request the shared memory >>> and do the mapping. But this only covers one module. If I have two modules >>> for example, then I will end up having two shared memories, because the >>> second module will go through the same steps as the first one. But I want >&...
2017 Oct 11
2
Debugging JIT'ed code with ORC JIT?
HI Yichao, RTDyldObjectLinkingLayer has a NotifyObjectLoaded hook that you can use to call NotifyObjectEmitted on your GDBRegistrationListener. If code is going to be unloaded we would have to add an extra hook to call NotifyFreeingObject -- that seems totally reasonable to add. -- Lang. On Wed, Oct 11, 2017 at 10:44 AM, Yichao Yu <yyc1992 at gmail....
2015 Mar 25
2
[LLVMdev] MCJIT finalizeObject output to use in external process
...e of the intended use models for MCJIT. > > > > If you look at the source for ‘lli’ you’ll find an option called > “remote-mcjit” which does exactly this (for testing purposes). > > > > The key function (which in the lli case is called from lli’s > RemoteMemoryManager::notifyObjectLoaded method) is > ExecutionEngine::mapSectionAddress. This function tells MCJIT to reapply > relocations to the loaded object as if it were loaded at a different > address in memory than it actually is. The client is responsible for the > particulars of allocating memory in the remote pr...
2015 Mar 25
2
[LLVMdev] MCJIT finalizeObject output to use in external process
A need has arisen to generate code using MCJIT but not in the target process instead in a different process (and possibly even different machine though not in the scope). Reading through the tutorials and MCJIT design document, it seems like this is possible or was kept in mind during design of MCJIT. How do I achieve this? Are there examples? Dave -------------- next part -------------- An
2013 Nov 05
0
[LLVMdev] Android build patch
...than once would cause a crash. The changes that introduced multiple module support should have fixed that issue. It might be useful to set breakpoints in the memory manager you are using. During finalizeObject you are likely to see calls to finalizeMemory, getSymbolAddress, registerEHFrames and notifyObjectLoaded. I think registerEHFrames is the most likely source of the problem, particularly given that the debugger is also crashing. If that's the problem, you could probably get a little further (for experimental purposes at least) by just having the memory manager do nothing in response to that cal...
2017 May 07
2
[cfe-dev] JIT doens't resolve address - Resolve obj-Addresses?
...Section/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 notifyObjectLoaded method to allocate the final memory locations, then call RTDyldMemoryManager::mapSectionAddress to map each local allocation to its corresponding final address (c) Override finalizeMemory to copy the relocated bytes to their final addresses Hope this helps. Cheers, Lang. On Tue, May 2, 20...
2020 Apr 18
2
PerfJITEventListener needs perf-<pid>.map?
I'm trying to use PerfJITEventListener with llvm::orc::LLJITBuilder: 1. perf record -o /tmp/perf.data -- <my_binary_with_event_listener> 2. perf inject -j -v -i /tmp/perf.data -o /tmp/perf.data.jit *jit marker found: ~.debug/jit/llvm-IR-jit-20200417-3c2242/jit-149849.dump* *injecting: ~/.debug/jit/llvm-IR-jit-20200417-3c2242/jit-149849.dump* *write ELF image
2017 Sep 25
2
Clang/LLVM JIT - When to use "registerEHFrames()"
...bilities of LLVM. Most of my attempts were successfully but, I still fail miserably at exceptions. Doing research I found the function "registerEHFrames()" which should assist me supporting exceptions - but sadly the documentation I found wasn't helpful. I looked at into the "notifyObjectLoaded" function and discovered that there appear some symbol names starting with "$" - I expected them to be connected to my try and catch block. But what now? As usually, at this point I have there names, but can't get there address to register them with the "registerEHFram...
2017 Aug 24
1
Invalid Signature of orc::RTDyldObjectLinkingLayer::NotifyLoadedFtor
...andleT H,                     const RTDyldObjectLinkingLayer::ObjectPtr &Obj,                     const LoadedObjectInfo &Info) const {       M.UnfinalizedSections[H] = std::move(M.SectionsAllocatedSinceLastLoad);       M.SectionsAllocatedSinceLastLoad = SectionAddrSet();       M.MemMgr->notifyObjectLoaded(&M, *Obj->getBinary());     } OrcLazyJIT in lli on the other hand doesn't make use of the notification.It can however be reproducedthere too: diff --git a/tools/lli/OrcLazyJIT.h b/tools/lli/OrcLazyJIT.h index 47a2acc4d7e..41a7c99413b 100644 --- a/tools/lli/OrcLazyJIT.h +++ b/tools/ll...
2015 Mar 26
2
[LLVMdev] MCJIT finalizeObject output to use in external process
...e of the intended use models for MCJIT. > > > > If you look at the source for ‘lli’ you’ll find an option called > “remote-mcjit” which does exactly this (for testing purposes). > > > > The key function (which in the lli case is called from lli’s > RemoteMemoryManager::notifyObjectLoaded method) is > ExecutionEngine::mapSectionAddress. This function tells MCJIT to reapply > relocations to the loaded object as if it were loaded at a different > address in memory than it actually is. The client is responsible for the > particulars of allocating memory in the remote pr...
2017 Sep 27
0
Clang/LLVM JIT - When to use "registerEHFrames()"
...t > of my attempts were successfully but, I still fail miserably at > exceptions. Doing research I found the function "registerEHFrames()" > which should assist me supporting exceptions - but sadly the > documentation I found wasn't helpful. > I looked at into the "notifyObjectLoaded" function and discovered that > there appear some symbol names starting with "$" - I expected them to > be connected to my try and catch block. But what now? As usually, at > this point I have there names, but can't get there address to register > them with the &quo...
2013 Nov 05
4
[LLVMdev] Android build patch
I'm trying to build LLVM on Android rather than the other way around! Really just to see if it can be done. I worked out the first problem (my code was written for the old JIT and I'd missed something in updating to the MCJIT to make it work on ARM). It still doesn't work, but at this point I have no idea why and it'll be a while before I get to look at it again: the Android
2015 Mar 27
2
[LLVMdev] MCJIT finalizeObject output to use in external process
...e of the intended use models for MCJIT. > > > > If you look at the source for ‘lli’ you’ll find an option called > “remote-mcjit” which does exactly this (for testing purposes). > > > > The key function (which in the lli case is called from lli’s > RemoteMemoryManager::notifyObjectLoaded method) is > ExecutionEngine::mapSectionAddress. This function tells MCJIT to reapply > relocations to the loaded object as if it were loaded at a different > address in memory than it actually is. The client is responsible for the > particulars of allocating memory in the remote pr...
2017 Sep 28
2
Clang/LLVM JIT - When to use "registerEHFrames()"
...ilities of LLVM. Most of my attempts were successfully but, I still fail miserably at exceptions. Doing research I found the function "registerEHFrames()" which should assist me supporting exceptions - but sadly the documentation I found wasn't helpful. I looked at into the "notifyObjectLoaded" function and discovered that there appear some symbol names starting with "$" - I expected them to be connected to my try and catch block. But what now? As usually, at this point I have there names, but can't get there address to register them with the "registerEHFram...