Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clr-interp] Refactor passing of configuration environment variables #114300

Merged
merged 3 commits into from
Apr 8, 2025

Conversation

BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Apr 5, 2025

This PR adds a InterpConfigValues class that holds all interpreter configuration knobs, in a similar fashion to RyuJIT's JitConfigValues. Support for method sets was not currently added, meaning that we can pass a single method currently and the match happens by comparing the name only, without support for regex like wildcards.

Added DOTNET_InterpDump which selects the method to have its compilation information dumped.
Added DOTNET_InterpHalt which facilitates breaking whenever the method in question starts executing.

@Copilot Copilot bot review requested due to automatic review settings April 5, 2025 13:55
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 5, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.

Files not reviewed (2)
  • src/coreclr/interpreter/CMakeLists.txt: Language not supported
  • src/coreclr/interpreter/intops.def: Language not supported

@teo-tsirpanis teo-tsirpanis added area-CodeGen-Interpreter-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Apr 5, 2025
Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

BrzVlad added 3 commits April 8, 2025 10:13
This flag adds a `INTOP_BREAKPOINT` instruction at the beginning of the method. This opcode calls the `InterpBreakpoint` method. In order to make use of this debug option, you need to add a breakpoint to this method.

An alternative would be to use special instructions to trigger a trap in the debugger, but there is no clean cross platform way to do this currently. Using `__builtin_debugtrap()` on arm64 doesn't allow for step/continue, you would need to set the PC register manually to the next instruction in order to exit the trap, making it a pain to use.
@BrzVlad BrzVlad force-pushed the feature-clr-interp5 branch from 0f12db7 to cdaacbb Compare April 8, 2025 07:14
@BrzVlad BrzVlad merged commit 548aadc into dotnet:main Apr 8, 2025
98 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants