Stream: git-wasmtime

Topic: wasmtime / PR #5541 bench-api: Always get a `Config` from...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2023 at 20:12):

alexcrichton opened PR #5541 from fix-bench-api to main:

This commit fixes an issue that I ran into just now where benchmarking one *.so with --engine-flags was giving wildly unexpected results comparing to something without --engine-flags. The root cause here appears to that when specifying --engine-flags the CLI parsing code is used to create a Config and when omitted a Config::new instance is created. The main difference between these is that for the CLI caching is enabled by default and for Config::new it is not. Coupled with the fact that caching doesn't really work for the main branch this ended up giving wild results.

The fix here is to first always use the CLI parsing code to create a Config to ensure that a config is consistently created. Next the --disable-cache flag is unconditionally passed to the CLI parsing to ensure that compilation actually happens.

Once applied this enables comparing an engine without flags and an engine with flags which provides consistent results.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2023 at 20:12):

alexcrichton requested fitzgen for a review on PR #5541.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2023 at 20:21):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2023 at 20:21):

fitzgen created PR review comment:

Can we just do a null pointer and zero len for flags when not provided, always parse the Config from that resulting potentially-empty flags string, and then rely on https://github.com/bytecodealliance/wasmtime/pull/5542 for disabling the cache?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2023 at 20:21):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2023 at 20:30):

alexcrichton updated PR #5541 from fix-bench-api to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2023 at 20:34):

alexcrichton closed without merge PR #5541.


Last updated: Nov 22 2024 at 17:03 UTC