Skip to content

Comments

Debugging: avoid re-patching code on single-step update when state doesn't change.#12638

Merged
alexcrichton merged 1 commit intobytecodealliance:mainfrom
cfallin:debugging-single-step-opt
Feb 23, 2026
Merged

Debugging: avoid re-patching code on single-step update when state doesn't change.#12638
alexcrichton merged 1 commit intobytecodealliance:mainfrom
cfallin:debugging-single-step-opt

Conversation

@cfallin
Copy link
Member

@cfallin cfallin commented Feb 23, 2026

When the setter for the single-step flag is given an enable boolean 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).

…esn't change.

When the setter for the single-step flag is given an `enable` boolean
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).
@cfallin cfallin requested a review from a team as a code owner February 23, 2026 07:41
@cfallin cfallin requested review from pchickey and removed request for a team February 23, 2026 07:41
@cfallin cfallin changed the title Debugging: avoid re-patching code on single-step update when state do… Debugging: avoid re-patching code on single-step update when state doesn't change. Feb 23, 2026
@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Feb 23, 2026
@alexcrichton alexcrichton added this pull request to the merge queue Feb 23, 2026
Merged via the queue into bytecodealliance:main with commit 2842552 Feb 23, 2026
45 checks passed
@cfallin cfallin deleted the debugging-single-step-opt branch February 23, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants