pub struct AllocatedArtifact {
frame_info_registered: bool,
frame_info_registration: Option<GlobalFrameInfoRegistration>,
finished_functions: BoxedSlice<LocalFunctionIndex, FunctionBodyPtr>,
finished_function_call_trampolines: BoxedSlice<SignatureIndex, VMTrampoline>,
finished_dynamic_function_trampolines: BoxedSlice<FunctionIndex, FunctionBodyPtr>,
signatures: BoxedSlice<SignatureIndex, VMSignatureHash>,
finished_function_lengths: BoxedSlice<LocalFunctionIndex, usize>,
function_max_stack_usage: BoxedSlice<LocalFunctionIndex, Option<usize>>,
vm_offsets: VMOffsets,
elf_image: Option<(usize, DebugInfoSource)>,
}Fields§
§frame_info_registered: bool§frame_info_registration: Option<GlobalFrameInfoRegistration>§finished_functions: BoxedSlice<LocalFunctionIndex, FunctionBodyPtr>§finished_function_call_trampolines: BoxedSlice<SignatureIndex, VMTrampoline>§finished_dynamic_function_trampolines: BoxedSlice<FunctionIndex, FunctionBodyPtr>§signatures: BoxedSlice<SignatureIndex, VMSignatureHash>§finished_function_lengths: BoxedSlice<LocalFunctionIndex, usize>§function_max_stack_usage: BoxedSlice<LocalFunctionIndex, Option<usize>>§vm_offsets: VMOffsetsPrecomputed VMOffsets for this artifact’s module, cloned by
Artifact::instantiate instead of recomputing on every call.
Safe to cache because VMOffsets::new(pointer_size, module_info)
is deterministic, module_info is immutable after compile (the
only mutable field name is not a VMOffsets input), and the
host’s pointer size is a runtime constant.
Built once in from_parts and in the deserialization path
(deserialize_object_native); VMOffsets::new was ~9% of
Instance::new time on profile traces of a per-request wasm
host calling Module::instantiate in a tight loop.
elf_image: Option<(usize, DebugInfoSource)>The base address the module’s code was loaded at, and the raw ELF
image bytes it was loaded from, when this artifact was built from a
native ELF image. Used to lazily build DWARF debug info for frame
symbolication. None for non-ELF artifacts.
Implementations§
Source§impl AllocatedArtifact
impl AllocatedArtifact
fn function_extents(&self) -> PrimaryMap<LocalFunctionIndex, FunctionExtent>
Auto Trait Implementations§
impl Freeze for AllocatedArtifact
impl RefUnwindSafe for AllocatedArtifact
impl Send for AllocatedArtifact
impl Sync for AllocatedArtifact
impl Unpin for AllocatedArtifact
impl UnwindSafe for AllocatedArtifact
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more