|
LLVM 24.0.0git
|
#include "llvm/ExecutionEngine/Orc/MemoryMapper.h"
Public Member Functions | |
| SharedMemoryMapper (ExecutionSession &ES, SharedMemoryMapBindings B, size_t PageSize) | |
| unsigned int | getPageSize () override |
| void | reserve (size_t NumBytes, OnReservedFunction OnReserved) override |
| Reserves address space in executor process. | |
| 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 |
| Ensures executor memory is synchronized with working copy memory, sends functions to be called after initilization and before deinitialization and applies memory protections Returns a unique address identifying the allocation. | |
| void | deinitialize (ArrayRef< ExecutorAddr > Allocations, OnDeinitializedFunction OnDeInitialized) override |
| Runs previously specified deinitialization actions Executor addresses returned by initialize should be passed. | |
| void | release (ArrayRef< ExecutorAddr > Reservations, OnReleasedFunction OnRelease) override |
| Release address space acquired through reserve() | |
| ~SharedMemoryMapper () override | |
| Public Member Functions inherited from llvm::orc::MemoryMapper | |
| virtual | ~MemoryMapper () |
Static Public Member Functions | |
| static Expected< std::unique_ptr< SharedMemoryMapper > > | Create (ExecutionSession &ES, SharedMemoryMapBindings B) |
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)> |
Definition at line 135 of file MemoryMapper.h.
| llvm::orc::SharedMemoryMapper::SharedMemoryMapper | ( | ExecutionSession & | ES, |
| SharedMemoryMapBindings | B, | ||
| size_t | PageSize ) |
Definition at line 197 of file MemoryMapper.cpp.
References llvm_unreachable, and llvm::move().
|
override |
Definition at line 406 of file MemoryMapper.cpp.
|
static |
Definition at line 207 of file MemoryMapper.cpp.
References llvm::sys::Process::getPageSize(), llvm::inconvertibleErrorCode(), and llvm::make_error().
|
overridevirtual |
Runs previously specified deinitialization actions Executor addresses returned by initialize should be passed.
Implements llvm::orc::MemoryMapper.
Definition at line 354 of file MemoryMapper.cpp.
|
inlineoverridevirtual |
Implements llvm::orc::MemoryMapper.
Definition at line 143 of file MemoryMapper.h.
|
overridevirtual |
Ensures executor memory is synchronized with working copy memory, sends functions to be called after initilization and before deinitialization and applies memory protections Returns a unique address identifying the allocation.
This address should be passed to deinitialize to run deallocation actions (and reset permissions where possible).
Implements llvm::orc::MemoryMapper.
Definition at line 322 of file MemoryMapper.cpp.
References llvm::orc::MemoryMapper::AllocInfo::Actions, llvm::orc::tpctypes::SharedMemoryFinalizeRequest::Actions, llvm::orc::tpctypes::SharedMemorySegFinalizeRequest::Addr, assert(), llvm::sampleprof::Base, llvm::orc::Finalize, llvm::orc::MemoryMapper::AllocInfo::MappingBase, llvm::orc::tpctypes::SharedMemorySegFinalizeRequest::RAG, llvm::orc::MemoryMapper::AllocInfo::Segments, llvm::orc::tpctypes::SharedMemoryFinalizeRequest::Segments, and llvm::orc::tpctypes::SharedMemorySegFinalizeRequest::Size.
|
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 311 of file MemoryMapper.cpp.
References assert(), G, and llvm::Offset.
|
overridevirtual |
Release address space acquired through reserve()
Implements llvm::orc::MemoryMapper.
Definition at line 360 of file MemoryMapper.cpp.
References llvm::sampleprof::Base, llvm::errnoAsErrorCode(), llvm::errorCodeToError(), llvm::inconvertibleErrorCode(), llvm::joinErrors(), llvm::make_error(), llvm::mapWindowsError(), llvm::orc::Result, Size, and llvm::Error::success().
|
overridevirtual |
Reserves address space in executor process.
Implements llvm::orc::MemoryMapper.
Definition at line 221 of file MemoryMapper.cpp.
References llvm::Data, llvm::errnoAsErrorCode(), llvm::errorCodeToError(), llvm::BLAKE3::hash(), llvm::inconvertibleErrorCode(), llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key, llvm::make_error(), llvm::mapWindowsError(), llvm::orc::Result, and uint64_t.