Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Proposal: PMI asm diffs using SuperPMI

Open
#185 6 comments 1 reaction 0 assignees View on GitHub

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

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-analyze over 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/jitutils

All issues in dotnet/jitutils

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.