Stream: git-wasmtime

Topic: wasmtime / PR #12233 Add logging support for debugging IS...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 31 2025 at 06:53):

bongjunj opened PR #12233 from bongjunj:log-fired-isle-rules to bytecodealliance:main:

<!--
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
-->

resolves https://github.com/bytecodealliance/wasmtime/issues/11971

Run the following command to check:

RUST_LOG=cranelift_codegen::opts::generated_code=trace cargo run -p cranelift-tools --bin clif-util -- compile --target x86_64-unknown-linux-gnu --set opt_level=speed

Should print logs such as:

[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 23
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 17
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bor <OUT_DIR>/clif_opt.isle line 1304
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/bitops.isle line 48
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 23
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322

view this post on Zulip Wasmtime GitHub notifications bot (Dec 31 2025 at 06:53):

bongjunj requested cfallin for a review on PR #12233.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 31 2025 at 06:53):

bongjunj requested wasmtime-compiler-reviewers for a review on PR #12233.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 31 2025 at 06:54):

bongjunj edited PR #12233:

<!--
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
-->

resolves https://github.com/bytecodealliance/wasmtime/issues/11971

Run the following command to check:

RUST_LOG=cranelift_codegen::opts::generated_code=trace cargo run -p cranelift-tools --bin clif-util -- compile --target x86_64-unknown-linux-gnu --set opt_level=speed <input.clif>

Should print logs such as:

[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 23
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 17
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bor <OUT_DIR>/clif_opt.isle line 1304
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/bitops.isle line 48
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 23
[2025-12-31T06:48:33Z DEBUG cranelift_codegen::opts::generated_code] ISLE bnot <OUT_DIR>/clif_opt.isle line 1322

view this post on Zulip Wasmtime GitHub notifications bot (Dec 31 2025 at 08:50):

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

Subscribe to Label Action

cc @cfallin, @fitzgen

<details>
This issue or pull request has been labeled: "cranelift", "isle"

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 (Jan 03 2026 at 00:47):

cfallin submitted PR review:

Thanks! Happy to merge with the one question below answered/addressed. This will definitely be helpful tracing rule applications!

view this post on Zulip Wasmtime GitHub notifications bot (Jan 03 2026 at 00:47):

cfallin created PR review comment:

I don't think we need the #[cfg(feature = "trace-log")] here, since we are already conditionalizing this bit of codegen on the trace-log feature via the emit_logging option, right?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 04 2026 at 04:50):

bongjunj updated PR #12233.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 04 2026 at 04:54):

bongjunj submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 04 2026 at 04:54):

bongjunj created PR review comment:

No, the feature guard is unnecessary as you pointed out, and the test below demonstrates you can safely remove the guard.

> RUST_LOG=cranelift_codegen::opts::generated_code=trace cargo run -p cranelift-tools --bin clif-util -- co
mpile --target x86_64-unknown-linux-gnu --set opt_level=speed ../../keccak-no-opts.clif 2>&1 | head -n10
...
[2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 25
[2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 5
[2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 25
[2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 5
[2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 25
[2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 5
[2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 25
[2026-01-04T04:52:21Z DEBUG cranelift_codegen::opts::generated_code] ISLE simplify src/opts/remat.isle line 5

> cargo run -p cranelift-tools --bin clif-util -- compile --target x86_64-unknown-linux-gnu --set opt_level
=speed ../../data/clif/keccak-no-opts.clif 2>&1 | head -n10

[No output]

view this post on Zulip Wasmtime GitHub notifications bot (Jan 04 2026 at 04:54):

bongjunj edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 04 2026 at 04:55):

bongjunj edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 06 2026 at 18:52):

cfallin commented on PR #12233:

@bongjunj it looks like this fails on Windows (see this CI job) because the paths have backslashes, and when embedding those into strings, they become (ill-formed) escapes. Could you address by either replacing \ with / or by properly escaping somehow?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 07 2026 at 02:30):

bongjunj updated PR #12233.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 07 2026 at 02:37):

bongjunj commented on PR #12233:

I have changed the string embedding from Display trait to Debug trait, as Debug trait can automatically escape and places quotes.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 07 2026 at 03:20):

bongjunj edited a comment on PR #12233:

I have changed the string embedding from Display trait to Debug trait, as Debug trait can automatically place escapes and quotes.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 07 2026 at 10:01):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 07 2026 at 10:25):

cfallin merged PR #12233.


Last updated: Jan 09 2026 at 13:15 UTC