class SimpleRemoteEPC
Declaration
class SimpleRemoteEPC : public ExecutorProcessControl,
public SimpleRemoteEPCTransportClient { /* full declaration omitted */ };
Description
ExecutorProcessControl supports interaction with a JIT target process.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:31
Inherits from: ExecutorProcessControl, SimpleRemoteEPCTransportClient
Member Variables
- private std::mutex SimpleRemoteEPCMutex
- private std::condition_variable DisconnectCV
- private bool Disconnected = false
- private llvm::Error DisconnectErr = Error::success()
- private std::unique_ptr<SimpleRemoteEPCTransport> T
- private std::unique_ptr<jitlink::JITLinkMemoryManager> OwnedMemMgr
- private std::unique_ptr<MemoryAccess> OwnedMemAccess
- private std::unique_ptr<EPCGenericDylibManager> DylibMgr
- private llvm::orc::ExecutorAddr RunAsMainAddr
- private uint64_t NextSeqNo = 0
- private llvm::orc::SimpleRemoteEPC:: PendingCallWrapperResultsMap PendingCallWrapperResults
Inherited from ExecutorProcessControl:
- protected SSP
- protected D
- protected ES = nullptr
- protected TargetTriple
- protected PageSize = 0
- protected JDI
- protected MemAccess = nullptr
- protected MemMgr = nullptr
- protected BootstrapSymbols
Method Overview
- public template <typename TransportT, typename... TransportTCtorArgTs>static Expected<std::unique_ptr<SimpleRemoteEPC>> Create(std::unique_ptr<TaskDispatcher> D, llvm::orc::SimpleRemoteEPC::Setup S, TransportTCtorArgTs &&... TransportTCtorArgs)
- public SimpleRemoteEPC(llvm::orc::SimpleRemoteEPC &&)
- private SimpleRemoteEPC(std::shared_ptr<SymbolStringPool> SSP, std::unique_ptr<TaskDispatcher> D)
- public SimpleRemoteEPC(const llvm::orc::SimpleRemoteEPC &)
- public void callWrapperAsync(llvm::orc::ExecutorAddr WrapperFnAddr, llvm::orc::ExecutorProcessControl::IncomingWFRHandler OnComplete, ArrayRef<char> ArgBuffer)
- private static Expected<std::unique_ptr<MemoryAccess>> createDefaultMemoryAccess(llvm::orc::SimpleRemoteEPC & SREPC)
- private static Expected<std::unique_ptr<jitlink::JITLinkMemoryManager>> createDefaultMemoryManager(llvm::orc::SimpleRemoteEPC & SREPC)
- public llvm::Error disconnect()
- private uint64_t getNextSeqNo()
- private void handleCallWrapper(uint64_t RemoteSeqNo, llvm::orc::ExecutorAddr TagAddr, llvm::orc::SimpleRemoteEPCArgBytesVector ArgBytes)
- public void handleDisconnect(llvm::Error Err)
- private llvm::Error handleHangup(llvm::orc::SimpleRemoteEPCArgBytesVector ArgBytes)
- public Expected<llvm::orc::SimpleRemoteEPCTransportClient::HandleMessageAction> handleMessage(llvm::orc::SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, llvm::orc::ExecutorAddr TagAddr, llvm::orc::SimpleRemoteEPCArgBytesVector ArgBytes)
- private llvm::Error handleResult(uint64_t SeqNo, llvm::orc::ExecutorAddr TagAddr, llvm::orc::SimpleRemoteEPCArgBytesVector ArgBytes)
- private llvm::Error handleSetup(uint64_t SeqNo, llvm::orc::ExecutorAddr TagAddr, llvm::orc::SimpleRemoteEPCArgBytesVector ArgBytes)
- public Expected<tpctypes::DylibHandle> loadDylib(const char * DylibPath)
- public Expected<std::vector<tpctypes::LookupResult>> lookupSymbols(ArrayRef<llvm::orc::ExecutorProcessControl::LookupRequest> Request)
- private void releaseSeqNo(uint64_t SeqNo)
- public Expected<int32_t> runAsMain(llvm::orc::ExecutorAddr MainFnAddr, ArrayRef<std::string> Args)
- private llvm::Error sendMessage(llvm::orc::SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, llvm::orc::ExecutorAddr TagAddr, ArrayRef<char> ArgBytes)
- private llvm::Error setup(llvm::orc::SimpleRemoteEPC::Setup S)
- public ~SimpleRemoteEPC()
Inherited from SimpleRemoteEPCTransportClient:
Inherited from ExecutorProcessControl:
- public callSPSWrapper
- public callSPSWrapperAsync
- public callSPSWrapperAsync
- public callWrapper
- public callWrapperAsync
- public callWrapperAsync
- public callWrapperAsync
- public disconnect
- public getBootstrapSymbols
- public getBootstrapSymbolsMap
- public getDispatcher
- public getExecutionSession
- public getJITDispatchInfo
- public getMemMgr
- public getMemoryAccess
- public getPageSize
- public getSymbolStringPool
- public getTargetTriple
- public intern
- public loadDylib
- public lookupSymbols
- public runAsMain
Methods
¶template <typename TransportT,
typename... TransportTCtorArgTs>
static Expected<std::unique_ptr<SimpleRemoteEPC>>
Create(
std::unique_ptr<TaskDispatcher> D,
llvm::orc::SimpleRemoteEPC::Setup S,
TransportTCtorArgTs&&... TransportTCtorArgs)
template <typename TransportT,
typename... TransportTCtorArgTs>
static Expected<std::unique_ptr<SimpleRemoteEPC>>
Create(
std::unique_ptr<TaskDispatcher> D,
llvm::orc::SimpleRemoteEPC::Setup S,
TransportTCtorArgTs&&... TransportTCtorArgs)
Description
Create a SimpleRemoteEPC using the given transport type and args.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:51
Templates
- TransportT
- TransportTCtorArgTs
Parameters
- std::unique_ptr<TaskDispatcher> D
- llvm::orc::SimpleRemoteEPC::Setup S
- TransportTCtorArgTs&&... TransportTCtorArgs
¶SimpleRemoteEPC(llvm::orc::SimpleRemoteEPC&&)
SimpleRemoteEPC(llvm::orc::SimpleRemoteEPC&&)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:68
Parameters
¶SimpleRemoteEPC(
std::shared_ptr<SymbolStringPool> SSP,
std::unique_ptr<TaskDispatcher> D)
SimpleRemoteEPC(
std::shared_ptr<SymbolStringPool> SSP,
std::unique_ptr<TaskDispatcher> D)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:93
Parameters
- std::shared_ptr<SymbolStringPool> SSP
- std::unique_ptr<TaskDispatcher> D
¶SimpleRemoteEPC(const llvm::orc::SimpleRemoteEPC&)
SimpleRemoteEPC(const llvm::orc::SimpleRemoteEPC&)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:66
Parameters
- const llvm::orc::SimpleRemoteEPC&
¶void callWrapperAsync(
llvm::orc::ExecutorAddr WrapperFnAddr,
llvm::orc::ExecutorProcessControl::
IncomingWFRHandler OnComplete,
ArrayRef<char> ArgBuffer)
void callWrapperAsync(
llvm::orc::ExecutorAddr WrapperFnAddr,
llvm::orc::ExecutorProcessControl::
IncomingWFRHandler OnComplete,
ArrayRef<char> ArgBuffer)
Description
Run a wrapper function in the executor. The given WFRHandler will be called on the result when it is returned. The wrapper function should be callable as: {.cpp}
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:80
Parameters
- llvm::orc::ExecutorAddr WrapperFnAddr
- llvm::orc::ExecutorProcessControl:: IncomingWFRHandler OnComplete
- ArrayRef<char> ArgBuffer
¶static Expected<std::unique_ptr<MemoryAccess>>
createDefaultMemoryAccess(
llvm::orc::SimpleRemoteEPC& SREPC)
static Expected<std::unique_ptr<MemoryAccess>>
createDefaultMemoryAccess(
llvm::orc::SimpleRemoteEPC& SREPC)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:100
Parameters
- llvm::orc::SimpleRemoteEPC& SREPC
¶static Expected<std::unique_ptr<
jitlink::JITLinkMemoryManager>>
createDefaultMemoryManager(
llvm::orc::SimpleRemoteEPC& SREPC)
static Expected<std::unique_ptr<
jitlink::JITLinkMemoryManager>>
createDefaultMemoryManager(
llvm::orc::SimpleRemoteEPC& SREPC)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:98
Parameters
- llvm::orc::SimpleRemoteEPC& SREPC
¶llvm::Error disconnect()
llvm::Error disconnect()
Description
Disconnect from the target process. This should be called after the JIT session is shut down.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:84
¶uint64_t getNextSeqNo()
uint64_t getNextSeqNo()
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:115
¶void handleCallWrapper(
uint64_t RemoteSeqNo,
llvm::orc::ExecutorAddr TagAddr,
llvm::orc::SimpleRemoteEPCArgBytesVector
ArgBytes)
void handleCallWrapper(
uint64_t RemoteSeqNo,
llvm::orc::ExecutorAddr TagAddr,
llvm::orc::SimpleRemoteEPCArgBytesVector
ArgBytes)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:111
Parameters
- uint64_t RemoteSeqNo
- llvm::orc::ExecutorAddr TagAddr
- llvm::orc::SimpleRemoteEPCArgBytesVector ArgBytes
¶void handleDisconnect(llvm::Error Err)
void handleDisconnect(llvm::Error Err)
Description
Handle a disconnection from the underlying transport. No further messages should be sent to handleMessage after this is called. Err may contain an Error value indicating unexpected disconnection. This allows clients to log such errors, but no attempt should be made at recovery (which should be handled inside the transport class, if it is supported at all).
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:90
Parameters
- llvm::Error Err
¶llvm::Error handleHangup(
llvm::orc::SimpleRemoteEPCArgBytesVector
ArgBytes)
llvm::Error handleHangup(
llvm::orc::SimpleRemoteEPCArgBytesVector
ArgBytes)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:113
Parameters
¶Expected<
llvm::orc::SimpleRemoteEPCTransportClient::
HandleMessageAction>
handleMessage(
llvm::orc::SimpleRemoteEPCOpcode OpC,
uint64_t SeqNo,
llvm::orc::ExecutorAddr TagAddr,
llvm::orc::SimpleRemoteEPCArgBytesVector
ArgBytes)
Expected<
llvm::orc::SimpleRemoteEPCTransportClient::
HandleMessageAction>
handleMessage(
llvm::orc::SimpleRemoteEPCOpcode OpC,
uint64_t SeqNo,
llvm::orc::ExecutorAddr TagAddr,
llvm::orc::SimpleRemoteEPCArgBytesVector
ArgBytes)
Description
Handle receipt of a message. Returns an Error if the message cannot be handled, 'EndSession' if the client will not accept any further messages, and 'ContinueSession' otherwise.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:87
Parameters
- llvm::orc::SimpleRemoteEPCOpcode OpC
- uint64_t SeqNo
- llvm::orc::ExecutorAddr TagAddr
- llvm::orc::SimpleRemoteEPCArgBytesVector ArgBytes
¶llvm::Error handleResult(
uint64_t SeqNo,
llvm::orc::ExecutorAddr TagAddr,
llvm::orc::SimpleRemoteEPCArgBytesVector
ArgBytes)
llvm::Error handleResult(
uint64_t SeqNo,
llvm::orc::ExecutorAddr TagAddr,
llvm::orc::SimpleRemoteEPCArgBytesVector
ArgBytes)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:109
Parameters
- uint64_t SeqNo
- llvm::orc::ExecutorAddr TagAddr
- llvm::orc::SimpleRemoteEPCArgBytesVector ArgBytes
¶llvm::Error handleSetup(
uint64_t SeqNo,
llvm::orc::ExecutorAddr TagAddr,
llvm::orc::SimpleRemoteEPCArgBytesVector
ArgBytes)
llvm::Error handleSetup(
uint64_t SeqNo,
llvm::orc::ExecutorAddr TagAddr,
llvm::orc::SimpleRemoteEPCArgBytesVector
ArgBytes)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:105
Parameters
- uint64_t SeqNo
- llvm::orc::ExecutorAddr TagAddr
- llvm::orc::SimpleRemoteEPCArgBytesVector ArgBytes
¶Expected<tpctypes::DylibHandle> loadDylib(
const char* DylibPath)
Expected<tpctypes::DylibHandle> loadDylib(
const char* DylibPath)
Description
Load the dynamic library at the given path and return a handle to it. If LibraryPath is null this function will return the global handle for the target process.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:72
Parameters
- const char* DylibPath
¶Expected<std::vector<tpctypes::LookupResult>>
lookupSymbols(
ArrayRef<llvm::orc::ExecutorProcessControl::
LookupRequest> Request)
Expected<std::vector<tpctypes::LookupResult>>
lookupSymbols(
ArrayRef<llvm::orc::ExecutorProcessControl::
LookupRequest> Request)
Description
Search for symbols in the target process. The result of the lookup is a 2-dimentional array of target addresses that correspond to the lookup order. If a required symbol is not found then this method will return an error. If a weakly referenced symbol is not found then it be assigned a '0' value.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:75
Parameters
- ArrayRef<llvm::orc::ExecutorProcessControl:: LookupRequest> Request
¶void releaseSeqNo(uint64_t SeqNo)
void releaseSeqNo(uint64_t SeqNo)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:116
Parameters
- uint64_t SeqNo
¶Expected<int32_t> runAsMain(
llvm::orc::ExecutorAddr MainFnAddr,
ArrayRef<std::string> Args)
Expected<int32_t> runAsMain(
llvm::orc::ExecutorAddr MainFnAddr,
ArrayRef<std::string> Args)
Description
Run function with a main-like signature.
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:77
Parameters
- llvm::orc::ExecutorAddr MainFnAddr
- ArrayRef<std::string> Args
¶llvm::Error sendMessage(
llvm::orc::SimpleRemoteEPCOpcode OpC,
uint64_t SeqNo,
llvm::orc::ExecutorAddr TagAddr,
ArrayRef<char> ArgBytes)
llvm::Error sendMessage(
llvm::orc::SimpleRemoteEPCOpcode OpC,
uint64_t SeqNo,
llvm::orc::ExecutorAddr TagAddr,
ArrayRef<char> ArgBytes)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:102
Parameters
- llvm::orc::SimpleRemoteEPCOpcode OpC
- uint64_t SeqNo
- llvm::orc::ExecutorAddr TagAddr
- ArrayRef<char> ArgBytes
¶llvm::Error setup(
llvm::orc::SimpleRemoteEPC::Setup S)
llvm::Error setup(
llvm::orc::SimpleRemoteEPC::Setup S)
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:107
Parameters
¶~SimpleRemoteEPC()
~SimpleRemoteEPC()
Declared at: llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h:70