LLVM 22.0.0git
|
Manages remote memory by making SPS-based EPC calls. More...
#include "llvm/ExecutionEngine/Orc/SimpleRemoteMemoryMapper.h"
Classes | |
struct | SymbolAddrs |
Public Member Functions | |
SimpleRemoteMemoryMapper (ExecutorProcessControl &EPC, SymbolAddrs SAs) | |
unsigned int | getPageSize () override |
void | reserve (size_t NumBytes, OnReservedFunction OnReserved) override |
Reserves memory in the remote process by calling a remote SPS-wrapper-function with signature. | |
char * | prepare (jitlink::LinkGraph &G, ExecutorAddr Addr, size_t ContentSize) override |
Provides working memory The LinkGraph parameter is included to allow implementations to allocate working memory from the LinkGraph's allocator, in which case it will be deallocated when the LinkGraph is destroyed. | |
void | initialize (AllocInfo &AI, OnInitializedFunction OnInitialized) override |
Initializes memory within a previously reserved region (applying protections and running any finalization actions) by calling a remote SPS-wrapper-function with signature. | |
void | deinitialize (ArrayRef< ExecutorAddr > Allocations, OnDeinitializedFunction OnDeInitialized) override |
Given a series of keys from previous initialize calls, deinitialize previously initialized memory regions (running dealloc actions, resetting permissions and decommitting if possible) by calling a remote SPS-wrapper-function with signature. | |
void | release (ArrayRef< ExecutorAddr > Reservations, OnReleasedFunction OnRelease) override |
Given a sequence of base addresses from previous reserve calls, release the underlying ranges (deinitializing any remaining regions within them) by calling a remote SPS-wrapper-function with signature. | |
Public Member Functions inherited from llvm::orc::MemoryMapper | |
virtual | ~MemoryMapper () |
Static Public Member Functions | |
static Expected< std::unique_ptr< SimpleRemoteMemoryMapper > > | Create (ExecutorProcessControl &EPC, SymbolAddrs SAs) |
Additional Inherited Members | |
Public Types inherited from llvm::orc::MemoryMapper | |
using | OnReservedFunction = unique_function<void(Expected<ExecutorAddrRange>)> |
using | OnInitializedFunction = unique_function<void(Expected<ExecutorAddr>)> |
using | OnDeinitializedFunction = unique_function<void(Error)> |
using | OnReleasedFunction = unique_function<void(Error)> |
Manages remote memory by making SPS-based EPC calls.
Definition at line 22 of file SimpleRemoteMemoryMapper.h.
llvm::orc::SimpleRemoteMemoryMapper::SimpleRemoteMemoryMapper | ( | ExecutorProcessControl & | EPC, |
SymbolAddrs | SAs ) |
Definition at line 16 of file SimpleRemoteMemoryMapper.cpp.
|
inlinestatic |
Definition at line 35 of file SimpleRemoteMemoryMapper.h.
|
overridevirtual |
Given a series of keys from previous initialize calls, deinitialize previously initialized memory regions (running dealloc actions, resetting permissions and decommitting if possible) by calling a remote SPS-wrapper-function with signature.
SPSError(SPSSequence<SPSExecutorAddr> Keys)
Implements llvm::orc::MemoryMapper.
Definition at line 71 of file SimpleRemoteMemoryMapper.cpp.
References llvm::cantFail(), and llvm::orc::Result.
|
inlineoverridevirtual |
Implements llvm::orc::MemoryMapper.
Definition at line 39 of file SimpleRemoteMemoryMapper.h.
|
overridevirtual |
Initializes memory within a previously reserved region (applying protections and running any finalization actions) by calling a remote SPS-wrapper-function with signature.
SPSExpected<SPSExecutorAddr>(SPSFinalizeRequest)
On success, returns a key that can be used to deinitialize the region.
Implements llvm::orc::MemoryMapper.
Definition at line 44 of file SimpleRemoteMemoryMapper.cpp.
References llvm::orc::MemoryMapper::AllocInfo::Actions, llvm::orc::tpctypes::FinalizeRequest::Actions, llvm::cantFail(), llvm::orc::MemoryMapper::AllocInfo::MappingBase, llvm::orc::Result, llvm::orc::MemoryMapper::AllocInfo::Segments, llvm::orc::tpctypes::FinalizeRequest::Segments, and std::swap().
|
overridevirtual |
Provides working memory The LinkGraph parameter is included to allow implementations to allocate working memory from the LinkGraph's allocator, in which case it will be deallocated when the LinkGraph is destroyed.
Implements llvm::orc::MemoryMapper.
Definition at line 39 of file SimpleRemoteMemoryMapper.cpp.
References G.
|
overridevirtual |
Given a sequence of base addresses from previous reserve calls, release the underlying ranges (deinitializing any remaining regions within them) by calling a remote SPS-wrapper-function with signature.
SPSError(SPSSequence<SPSExecutorAddr> Bases)
Implements llvm::orc::MemoryMapper.
Definition at line 88 of file SimpleRemoteMemoryMapper.cpp.
References llvm::cantFail(), and llvm::orc::Result.
|
overridevirtual |
Reserves memory in the remote process by calling a remote SPS-wrapper-function with signature.
SPSExpected<SPSExecutorAddr>(uint64_t Size).
On success, returns the base address of the reserved range.
Implements llvm::orc::MemoryMapper.
Definition at line 20 of file SimpleRemoteMemoryMapper.cpp.
References llvm::cantFail(), and llvm::orc::Result.