cfallin opened PR #12638 from cfallin:debugging-single-step-opt to bytecodealliance:main:
…esn't change.
When the setter for the single-step flag is given an
enableboolean that matches the existing state (i.e., enabling when already enabled or disabling when already disabled), we should not loop through and re-patch all breakpoint patch sites. This is an optimization, not required for correctness, but a rather obvious optimization to make (and important when building higher-level APIs for e.g. a single-step command that always set the flag).<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
cfallin requested pchickey for a review on PR #12638.
cfallin requested wasmtime-core-reviewers for a review on PR #12638.
cfallin edited PR #12638.
cfallin edited PR #12638:
When the setter for the single-step flag is given an
enableboolean that matches the existing state (i.e., enabling when already enabled or disabling when already disabled), we should not loop through and re-patch all breakpoint patch sites. This is an optimization, not required for correctness, but a rather obvious optimization to make (and important when building higher-level APIs for e.g. a single-step command that always set the flag).<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
github-actions[bot] added the label wasmtime:api on PR #12638.
alexcrichton submitted PR review.
alexcrichton added PR #12638 Debugging: avoid re-patching code on single-step update when state doesn't change. to the merge queue
alexcrichton merged PR #12638.
alexcrichton removed PR #12638 Debugging: avoid re-patching code on single-step update when state doesn't change. from the merge queue
Last updated: Feb 24 2026 at 04:36 UTC