cranelift: Introduce a feature to enable trace logs#4484
cranelift: Introduce a feature to enable trace logs#4484bnjbvr merged 2 commits intobytecodealliance:mainfrom
trace logs#4484Conversation
|
To confirm, does this problem stem from the desire to enable trace logging for some modules in your program, but not the cranelift modules? In such a situation is the logging framework's implementation of "no, don't actually emit this trace log" for the cranelift crates too expensive? (I can certainly imagine that's true, just want to confirm) |
|
Also apologies for the broken CI, but if you rebase it should be back-to-green. |
Yes indeed.
Yes, specifically we create something that we feed the |
cfallin
left a comment
There was a problem hiding this comment.
Sorry, I left this hanging and missed it on my review queue. This looks good!
|
I think it needs a rebase again now that #4553 merged; happy to merge once rebased. |
|
This now passes CI and as there wasn't any pending comment, will merge. Thanks for the review! |
log::traceonly if the feature is enabled, following exactly what regalloc2 does. If downstream users set theirlog::max_leveltoTrace, they would pay the cost for the logging infrastructure, even if the logger eventually decides to throw away the logs' contents, so it's better overall to not call into the logging infra at all.With this change and those from other PRs, there's no more meaningful difference between a Wasmtime embedding setting the log's max level to trace or above.