alexcrichton opened PR #3235 from data-in-obj
to main
:
This commit moves existing allocations of
Box<[u8]>
stored separately
from compilation's final ELF image into the ELF image itself. The goal
of this commit is to reduce the amount of data whichbincode
will need
to process in the future. DWARF debugging information and wasm data
segments can be quite large, and they're relatively rarely read, so
there's typically no need to copy them around. Instead by moving them
into the ELF image this opens up the opportunity in the future to
eliminate copies and use data directly as-found in the image itself.For information accessed possibly-multiple times, such as the wasm data
ranges, the indexes of the data within the ELF image are computed when
aCompiledModule
is created. These indexes are then used to directly
index into the image without having to root around in the ELF file each
time they're accessed.One other change located here is that the symbolication context
previously cloned the debug information into it to adhere to the
'static
lifetime safely, but this isn't actually ever used in
wasmtime
right now so the unsafety around this has been removed and
instead borrowed data is returned (no more clones, yay!).cc #3230
alexcrichton updated PR #3235 from data-in-obj
to main
.
alexcrichton updated PR #3235 from data-in-obj
to main
.
alexcrichton requested peterhuene for a review on PR #3235.
alexcrichton updated PR #3235 from data-in-obj
to main
.
alexcrichton merged PR #3235.
Last updated: Dec 23 2024 at 12:05 UTC