edgeerrol87 / Disasmo

VS2019 Add-in. Click on any method or class to see what .NET Core's JIT generates for them (ASM).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disasmo

VS2019 Add-in. Click on any method or class to see what .NET Core's JIT generates for them (ASM).

demo

The Add-in targets .NET Core contributors so it assumes you already have CoreCLR local repo. If you don't have it, the steps to obtain and configure it are:

git clone git@github.com:dotnet/coreclr.git
cd coreclr
build release skiptests
build debug skiptests

We have to build it twice because we need mostly release files and a debug version of clrjit.dll. For more details visit viewing-jit-dumps.md. The Add-in basically follows steps mentioned in the doc above:

dotnet restore
dotnet publish -r win-x64 -c Release
set COMPlus_JitDisasm=%method%
ConsoleApp123.exe

In order to be able to disasm any method (even unused) the add-in injects a small line to the app's Main():

System.Runtime.CompilerServices.RuntimeHelpers.PrepareMethod(%methodHandle%);

However, you can use BenchmarkDotNet-style disassembler without any local CoreCLR, just enable it in "Settings/Use BDN disasm".

Known Issues

  • Only .NET Core Console applications are supported
  • I only tested it for .NET Core 3.0 apps
  • Multi-target projects are not supported
  • Generic methods are not supported
  • Resharper hides Roslyn actions by default (Uncheck "Do not show Visual Studio Light Bulb").

3rd party dependencies

About

VS2019 Add-in. Click on any method or class to see what .NET Core's JIT generates for them (ASM).

License:MIT License


Languages

Language:C# 100.0%