PureWhiteWu commented on issue #4252:
Sorry for this late fix.
r? @alexcrichton @cfallin
github-actions[bot] commented on issue #4252:
Subscribe to Label Action
cc @peterhuene
<details>
This issue or pull request has been labeled: "wasmtime:api", "wasmtime:config", "wasmtime:docs"Thus the following users have been cc'd because of the following labels:
- peterhuene: wasmtime:api
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
github-actions[bot] commented on issue #4252:
Label Messager: wasmtime:config
It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:
[ ] If you added a new
Config
method, you wrote extensive documentation for
it.<details>
Our documentation should be of the following form:
```text
Short, simple summary sentence.More details. These details can be multiple paragraphs. There should be
information about not just the method, but its parameters and results as
well.Is this method fallible? If so, when can it return an error?
Can this method panic? If so, when does it panic?
Example
Optional example here.
```</details>
[ ] If you added a new
Config
method, or modified an existing one, you
ensured that this configuration is exercised by the fuzz targets.<details>
For example, if you expose a new strategy for allocating the next instance
slot inside the pooling allocator, you should ensure that at least one of our
fuzz targets exercises that new strategy.Often, all that is required of you is to ensure that there is a knob for this
configuration option in [wasmtime_fuzzing::Config
][fuzzing-config] (or one
of its nestedstruct
s).Rarely, this may require authoring a new fuzz target to specifically test this
configuration. See [our docs on fuzzing][fuzzing-docs] for more details.</details>
[ ] If you are enabling a configuration option by default, make sure that it
has been fuzzed for at least two weeks before turning it on by default.[fuzzing-config]: https://github.com/bytecodealliance/wasmtime/blob/ca0e8d0a1d8cefc0496dba2f77a670571d8fdcab/crates/fuzzing/src/generators.rs#L182-L194
[fuzzing-docs]: https://docs.wasmtime.dev/contributing-fuzzing.html
<details>
To modify this label's message, edit the <code>.github/label-messager/wasmtime-config.md</code> file.
To add new label messages or remove existing label messages, edit the
<code>.github/label-messager.json</code> configuration file.</details>
github-actions[bot] commented on issue #4252:
Subscribe to Label Action
cc @fitzgen, @peterhuene
<details>
This issue or pull request has been labeled: "fuzzing", "wasmtime:c-api"Thus the following users have been cc'd because of the following labels:
- fitzgen: fuzzing
- peterhuene: wasmtime:c-api
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
PureWhiteWu commented on issue #4252:
@alexcrichton Thanks for your review and suggestions!
It's too late now for me, so I need to complete these changes tomorrow.
PureWhiteWu commented on issue #4252:
Config::profiler could defer creation of the profiling agent to Engine-construction. This would actually also remove the Arc around it since there's no more need to clone it.
This has been done.
Config::cache_config_load could defer its I/O to Engine::new.
For this part, I think the entire
CacheConfig
needs to be refactored. I think a separateCache
struct should be used instead of usingCacheConfig
as both the config and cache itself.This may be not be a minor change, so I will think this may need another pr. I've also submitted a tracking issue #4257 for this.
Size normalization in methods like Config::{static,dynamic}_memory_guard_size could instead happen in Engine::new instead of as a side effect of calling the configuration method.
I don't think defer these things to
Engine::new
can bring us gain, but will make these associated code dispersed, so I didn't change this.And for the
CompilerBuilder
part I think this should also be implemented in another PR. And here's the tracking issue #4258.
PureWhiteWu commented on issue #4252:
Thank you for your patient instructions and review!
Last updated: Nov 22 2024 at 16:03 UTC