alexcrichton opened PR #3241 from traps-binary
to main
:
This commit moves the
traps
field ofFunctionInfo
into a section of
the compiled artifact produced by Cranelift. This section is quite large
and when previously encoded/decoded withbincode
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.
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
alexcrichton updated PR #3241 from traps-binary
to main
.
alexcrichton requested peterhuene for a review on PR #3241.
alexcrichton updated PR #3241 from traps-binary
to main
.
peterhuene submitted PR review.
peterhuene submitted PR review.
peterhuene created PR review comment:
Nit: rename this function and one changed below to
lookup_trap_code
?
alexcrichton updated PR #3241 from traps-binary
to main
.
alexcrichton merged PR #3241.
Last updated: Dec 23 2024 at 12:05 UTC