dotnet / runtimelab

This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.
MIT License
1.41k stars 197 forks source link

[NativeAOT-LLVM] GC stress and faster checked builds #2527

Closed SingleAccretion closed 6 months ago

SingleAccretion commented 7 months ago

Adds a JitGcStress compiler knob that will cause codegen to insert calls to a GC-triggering helper after each safe point in the method. This makes GC holes dramatically easier to reproduce. I've now used this successfully to root cause the problem in #2514. We should also consider enabling this on some of our tests, though this change does not do that.

I am also making two tweaks to make the Checked build faster here: 1) Parallelize the writing of bitcode. This will also help large compiles. 2) Disable writing out of textual IR by default (can still be enabled via --codegenopt:JitCheckLlvmIR=1). I've found that the tradeoff this makes in making the checked build slower means I am almost always using a Release build + llvm-dis instead.

SingleAccretion commented 7 months ago

@dotnet/nativeaot-llvm