Open
Description
This usage of PrepareCodeConfig looks suspicious. At JIT time we create an instance which gets mutated during the process of jitting. However those mutations aren't going to happen here because the JIT isn't being re-run. This means the optimization tier in config object may not accurately represent the true optimization level that was used when JIT happened.
Looking at rundown, it looks like it is wrong there too or I don't understand something:
https://github.com/dotnet/runtime/blob/main/src/coreclr/vm/eventtrace.cpp#L6685
Originally posted by @noahfalk in #85801 (comment)