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

Fix regression in jiterpreter trace generation #99083

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Conversation

kg
Copy link
Member

@kg kg commented Feb 28, 2024

Should fix some or all of dotnet/perf-autofiling-issues#29881

When I migrated the jiterpreter to a new branch target scanning pass I failed to filter the branch target tables it generates properly. This combined with an existing bug in the cfg code meant that traces in large methods ended up having big branch dispatch tables at the top where most of the branch targets were never hit, eating up a valuable chunk of the trace's 4KB limit.

This PR adds appropriate filtering in both the scanning pass and the cfg so that the dispatch table is as small as possible.

… have much larger back branch dispatch tables than necessary
@ghost
Copy link

ghost commented Feb 28, 2024

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Should fix some or all of dotnet/perf-autofiling-issues#29881

When I migrated the jiterpreter to a new branch target scanning pass I failed to filter the branch target tables it generates properly. This combined with an existing bug in the cfg code meant that traces in large methods ended up having big branch dispatch tables at the top where most of the branch targets were never hit, eating up a valuable chunk of the trace's 4KB limit.

This PR adds appropriate filtering in both the scanning pass and the cfg so that the dispatch table is as small as possible.

Author: kg
Assignees: -
Labels:

arch-wasm, area-Codegen-Interpreter-mono

Milestone: -

@ghost ghost assigned kg Feb 28, 2024
@kg kg merged commit 233b110 into dotnet:main Feb 29, 2024
33 of 36 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants