Stream: git-wasmtime

Topic: wasmtime / PR #1260 Refactor address_transform.rs to use ...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 09 2020 at 14:03):

yurydelendik opened PR #1260 from refactor-addr-transform to master:

The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 11 2020 at 20:35):

yurydelendik updated PR #1260 from refactor-addr-transform to master:

The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 14 2020 at 14:07):

yurydelendik updated PR #1260 from refactor-addr-transform to master:

The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 14 2020 at 14:08):

yurydelendik requested fitzgen for a review on PR #1260.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2020 at 17:42):

fitzgen submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2020 at 17:42):

fitzgen created PR Review Comment:

I wonder if we could make this a u32 in practice? Do we ever have to process Wasm files larger than 4GiB?

This would let us shave off half the overhead on 64-bit platforms.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2020 at 17:42):

fitzgen created PR Review Comment:

Rather than having our index be a BTreeMap<WasmAddress, Box<[RangeIndex]>, which implies a bunch of allocated boxed slices that are all relatively small and potentially contribute to internal and/or external memory fragmentation, we should be able to save some memory by doing:

index_ranges: Vec<RangeIndex>,
// A map from the wasm address to the range within `index_ranges` for the associated wasm address.
index: BTreeMap<WasmAddress, std::ops::Range<usize>>,

Also if we can get away with it, we could make it a Range<u32> for extra savings.

To do this, rather than inserting sorted_ranges into the index here, we would do something like:

let start = all_ranges.len();
let end = start + sorted_ranges.len();
index_ranges.extend(sorted_ranges);
index.insert(position, start..end);

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2020 at 17:42):

fitzgen created PR Review Comment:

And the same here?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2020 at 17:42):

fitzgen created PR Review Comment:

Should this be (WasmAddress, RangeIndex)?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 16 2020 at 17:42):

fitzgen submitted PR Review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 23 2020 at 15:51):

yurydelendik updated PR #1260 from refactor-addr-transform to master:

The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 23 2020 at 17:51):

yurydelendik updated PR #1260 from refactor-addr-transform to master:

The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 23 2020 at 20:34):

yurydelendik updated PR #1260 from refactor-addr-transform to master:

The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 23 2020 at 20:37):

yurydelendik updated PR #1260 from refactor-addr-transform to master:

The crates/debug/src/transform/address_transform.rs is unoptimized in terms of data structures. This PR refactors this file to remove creation of intermediate in-heap structures, thus improves overall performance of the DWARF transformation.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 23 2020 at 21:36):

yurydelendik merged PR #1260.


Last updated: Nov 22 2024 at 16:03 UTC