Stream: git-wasmtime

Topic: wasmtime / PR #13495 Copying collector: Store most tracin...


view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 13:48):

fitzgen opened PR #13495 from fitzgen:wasmtime-inline-trace-info-in-object-header to bytecodealliance:main:

We have a number of available bits inside the VMGcHeader. This commit uses them to bitpack the following type:

pub enum InlineTraceInfo {
    /// The trace info is not encoded inline. Look it up from `TraceInfos`.
    OutOfLine,

    /// Inline trace info for an array type.
    Array {
        /// Whether the array's elements are GC references that need tracing.
        elems_are_gc_refs: bool,
    },

    /// Inline trace info for a struct, exception, or externref type.
    Struct {
        /// A bitmap where the `i`th bit is set iff the `i`th `u32` in the
        /// object's data (after the header) is a `VMGcRef` that needs
        /// tracing. Only the lower 23 bits are meaningful.
        gc_ref_bitmap: u32,
    },
}

This allows us to encode the majority of objects' GC edges inline in the GC object header, avoiding the need to perform expensive hash map lookups in the common case.

This results in a 7-8% speed up on splay.wasm in Sightglass:

execution :: cycles :: benchmarks/splay/splay.wasm

  Δ = 5858240.88 ± 445613.91 (confidence = 99%)

  inline-trace-info.dylib (-Ccollector=copying -Wgc,function-references) is 1.07x to 1.08x faster than main.dylib (-Ccollector=copying -Wgc,function-references)!

  [77193983 79604574.70 88386948] inline-trace-info.dylib (-Ccollector=copying -Wgc,function-references)
  [83057364 85462815.58 92545612] main.dylib (-Ccollector=copying -Wgc,function-references)

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 13:48):

fitzgen requested cfallin for a review on PR #13495.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 13:48):

fitzgen requested wasmtime-compiler-reviewers for a review on PR #13495.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 13:48):

fitzgen requested wasmtime-core-reviewers for a review on PR #13495.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 14:39):

fitzgen updated PR #13495.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 17:36):

:thumbs_up: alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 19:31):

github-actions[bot] added the label wasmtime:api on PR #13495.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 19:31):

github-actions[bot] added the label wasmtime:ref-types on PR #13495.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 19:31):

github-actions[bot] commented on PR #13495:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:ref-types"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 21:26):

fitzgen updated PR #13495.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 21:27):

fitzgen has enabled auto merge for PR #13495.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 21:58):

fitzgen added PR #13495 Copying collector: Store most tracing info inline in the object header to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 22:14):

fitzgen updated PR #13495.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 22:14):

fitzgen removed PR #13495 Copying collector: Store most tracing info inline in the object header from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 22:14):

fitzgen has enabled auto merge for PR #13495.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 22:27):

fitzgen added PR #13495 Copying collector: Store most tracing info inline in the object header to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 22:51):

:check: fitzgen merged PR #13495.

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2026 at 22:51):

fitzgen removed PR #13495 Copying collector: Store most tracing info inline in the object header from the merge queue.


Last updated: Jun 01 2026 at 09:49 UTC