Move trap information to a section of the compiled image (#3241)
This commit moves the `traps` field of `FunctionInfo` into a section of the compiled artifact produced by Cranelift. This section is quite large and when previously encoded/decoded with `bincode` this can take quite some time to process. Traps are expected to be relatively rare and it's not necessarily the right tradeoff to spend so much time serializing/deserializing this data, so this commit offloads the section into a custom-encoded binary format located elsewhere in the compiled image. This is similar to #3240 in its goal which is to move very large pieces of metadata to their own sections to avoid decoding anything when we load a precompiled modules. This also has a small benefit that it's slightly more efficient storage for the trap information too, but that's a negligible benefit. This is part of #3230 to make loading modules fast.
This commit is contained in:
@@ -30,6 +30,7 @@ mod module;
|
||||
mod module_environ;
|
||||
pub mod obj;
|
||||
mod stack_map;
|
||||
mod trap_encoding;
|
||||
mod tunables;
|
||||
mod vmoffsets;
|
||||
|
||||
@@ -39,6 +40,7 @@ pub use crate::compilation::*;
|
||||
pub use crate::module::*;
|
||||
pub use crate::module_environ::*;
|
||||
pub use crate::stack_map::StackMap;
|
||||
pub use crate::trap_encoding::*;
|
||||
pub use crate::tunables::Tunables;
|
||||
pub use crate::vmoffsets::*;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user