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

[mono][interp] Fix arg alignment issues when mixing with compiled code #85153

Merged
merged 10 commits into from
May 8, 2023

Conversation

BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Apr 21, 2023

No description provided.

@ghost
Copy link

ghost commented Apr 21, 2023

Tagging subscribers to this area: @BrzVlad, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: BrzVlad
Assignees: BrzVlad
Labels:

area-Codegen-Interpreter-mono

Milestone: -

@kg
Copy link
Member

kg commented Apr 30, 2023

I don't know how to push to your PR, but try ee96093 to update the jiterpreter and turn it all back on. I did some basic testing in AOT mode (the affected part, I think) and it seems to work now. You'll want to revert the changes to the threshold + stats options in options-def before merging (I lowered the threshold to make sure we actually exercise it during test runs)

@BrzVlad BrzVlad force-pushed the fix-interp-simd-alignment branch 2 times, most recently from 7f53ee9 to 45ee68a Compare May 5, 2023 12:49
@BrzVlad BrzVlad marked this pull request as ready for review May 6, 2023 05:19
@@ -95,7 +95,7 @@ DEFINE_BOOL(jiterpreter_call_resume_enabled, "jiterpreter-call-resume-enabled",
// stats for options like estimateHeat, but raises overhead.
DEFINE_BOOL(jiterpreter_disable_heuristic, "jiterpreter-disable-heuristic", FALSE, "Always insert trace entry points for more accurate statistics")
// Automatically prints stats at app exit or when jiterpreter_dump_stats is called
DEFINE_BOOL(jiterpreter_stats_enabled, "jiterpreter-stats-enabled", FALSE, "Automatically print jiterpreter statistics")
DEFINE_BOOL(jiterpreter_stats_enabled, "jiterpreter-stats-enabled", TRUE, "Automatically print jiterpreter statistics")
Copy link
Member

Choose a reason for hiding this comment

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

The changes to options-def can be reverted now that the tests passed on CI

Copy link
Member

@kg kg left a comment

Choose a reason for hiding this comment

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

Everything looks good to me, once options-def is reverted

@BrzVlad BrzVlad force-pushed the fix-interp-simd-alignment branch from d503577 to c5c55ab Compare May 8, 2023 06:26
It makes no sense to inline this big method into callers.
…jit calls from interp

The previous code wasn't handling alignment of simd types.
We stop computing the arguments on the fly since it's getting too expensive doing the alignment checks. We directly use `imethod->arg_offsets` instead which is computed once during the first call, while also ensuring consistency with the calculation.
@BrzVlad BrzVlad force-pushed the fix-interp-simd-alignment branch from c5c55ab to edfc973 Compare May 8, 2023 07:39
@BrzVlad BrzVlad force-pushed the fix-interp-simd-alignment branch from edfc973 to 4724c3e Compare May 8, 2023 10:38
@BrzVlad BrzVlad merged commit c25522a into dotnet:main May 8, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jun 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants