BenchmarkDotNet: `DisassemblyDiagnoser` does not work in `InProcessEmitToolchain`

Trying to use DisassemblyDiagnoser with InProcessEmitToolchain, I get an error:

// ! InProcessEmitExecutor, exception: System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
   at BenchmarkDotNet.Disassemblers.ClrMdV2Disassembler.AttachAndDisassemble(Settings settings)
   at BenchmarkDotNet.Disassemblers.SameArchitectureDisassembler.Disassemble(DiagnoserActionParameters parameters)
   at BenchmarkDotNet.Diagnosers.DisassemblyDiagnoser.Handle(HostSignal signal, DiagnoserActionParameters parameters)
   at BenchmarkDotNet.Diagnosers.CompositeDiagnoser.Handle(HostSignal signal, DiagnoserActionParameters parameters)
   at BenchmarkDotNet.Toolchains.InProcess.InProcessHost.SendSignal(HostSignal hostSignal)
   at BenchmarkDotNet.Engines.HostExtensions.AfterAll(IHost host)
   at BenchmarkDotNet.Toolchains.InProcess.Emit.Implementation.RunnableProgram.Run(BenchmarkId benchmarkId, Assembly partitionAssembly, BenchmarkCase benchmarkCase, IHost host)
   at BenchmarkDotNet.Toolchains.InProcess.Emit.InProcessEmitExecutor.ExecuteCore(IHost host, ExecuteParameters parameters)
Executable C:\Users\Tim\Documents\git\ProtoPromiseBenchmarks\AsynchronousBenchmarks\bin\Release\net6.0\001a3848-5fde-4a5d-a284-00d6519a2aaeEmitted.dll not found
ExitCode != 0 and no results reported
No Workload Results were obtained from the run.

The last version where it worked was 0.13.1. It seems ClrMdV2Disassembler broke this case in 0.13.2. @adamsitnik

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 21 (4 by maintainers)

Most upvoted comments

I have found and fixed this issue in ClrMD. It will be shipped in ClrMD 3 in the next week or two.

@timcassell I agree. Here are the end support dates of these runtimes: .NET Core 2.0: Oct 1, 2018 .NET Core 2.1: Aug 21, 2021 .NET Core 2.2: Dec 23, 2019 .NET Core 3.0: Mar 3, 2020

I feel like we have been supporting them long enough. Maybe it’s finally time to say goodbye. I’m not a fan of dropping old TFMs just because they are expired while we can support them for free. However, if this support requires too much effort, it doesn’t make sense to continue supporting them. If someone wants to measure the performance of these runtimes for archaeological purposes, they always can use the previous BenchmarkDotNet version.

Cool. You mentioned you will fix the other one? Will you send a PR? Or just mention what it should be here and they can both be fixed at the same time.

I’ll fix the issue in ClrMD and figure out dependencies in the next ClrMD release. I’m in the middle of some work, but I hopefully should have one out next week or the week after.

No but I’m happy to help if you get stuck. We didn’t remove any features, and the breaking changes were mostly around things that were broken due to changes in the GC_REGIONS feature in the runtime. Most usage of ClrMD won’t be affected by those changes at all. If you have migration problems, ping me.