Proposal: PMI asm diffs using SuperPMI
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- csharp
- Domain
- cli, performance, tooling
Research direction
Start by reviewing the existing jit-diff diff --pmi flow and the SuperPMI asm-diff mode. Trace how PMI collection, MC cleanup and merging, CODE.MCH, DIFF.MCL, and jit-analyze fit together. Done means a --superpmi mode performs the proposed baseline/diff runs, emits reusable artifacts, and analyzes only differing methods.
Written by the indexing model from the issue text.
Description
We now have jit-diff diff --pmi to use PMI for generating assembly code across a specified corpus of code, and analyzing the diffs assuming both baseline and diff compiler asm code is generated. This proposal is to introduce a mode to user SuperPMI to achieve the same results, but hopefully faster, eliminating incorrect diffs, and allowing for easier re-JIT of interesting methods.
I propose we add a --superpmi option, such that you would use jit-diff diff --pmi --superpmi. This specifies to still use PMI, but to accelerate it using SuperPMI. In this mode, you would be required to specify both a baseline and diff compiler (SuperPMI asm diffs require both). These steps would be executed:
- Run PMI over the specified corpus of code using the baseline compiler, in SuperPMI collection mode. We would not be generating textual asm output during this run.
- Do all the MC file cleanup and merging to create a single CODE.MCH file.
- Run SuperPMI in asm diff mode, passing both the baseline and diff JIT, and the CODE.MCH file, generating a DIFF.MCL file identifying all the functions that differ.
- If there are any diffs, generate textual ASM output (using
COMPlus_JitDisasm) by running SuperPMI over just the DIFF.MCL methods, once for the baseline JIT, and once for the diff JIT. - Run
jit-analyzeover the resulting ASM, to generate the diff statistics.
The resulting CODE.MCH and DIFF.MCL can remain for subsequent re-use and further investigations.
Note that we could also have a jit-diff diff --superpmi (without --pmi) for doing a similar thing but for crossgen-based asm diffs.
@dotnet/jit-contrib
- Dominant language
- C#
- Stars
- 161
- Forks
- 69
- Avg merge
- 16d 28m
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/jitutils
-
Difficulty 2/5 1-2 days Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
:watch: Not Triaged aspnet-core/svc fundamentals/subsvc Source - Docs.ms
Difficulty 1/5 Under an hour Newbie friendliness 85/100
dotnet/AspNetCore.Docs#37785 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Azure/azure-sdk-tools#17204 ·
Maintainers usually reply within 1 day
-
Проблема с Dotnet RUOpenarea-tutorials needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dotnet/website-feedback#1779 ·
-
[Bug] SwipeControl in Execute mode with more than one item replaces the whole UI with an error panelPossibly taken A pull request linked to this issue is open or already merged. Openbug needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
microsoft/microsoft-ui-reactor#1344 ·
Maintainers usually reply within 1 day