获取 .NET jit 编译器日志

Get .NET jit-compiler logs

我很想知道 JIT 编译了哪些方法。

我知道有一个探查器 API 允许这样做,但我必须为此用 C++ 编写探查器。 还有一个名为 ProfileOptimization 的功能可以创建 JIT 配置文件,以便将来更快地进行后台 JIT。它创建一些二进制文件。如果我有 .exe/.pdb,也许有可能从中获取方法名称?

我使用 perfmon 来获取 JITted 方法的计数,但计数不足以开始我的纳米优化 war

谢谢!

您可以使用 PerfView to get the order in which functions are being JIT-compiled. To be more specific, you can use the JIT Stats which you can generate and access as described in the section "Background JIT in Action" of this 篇文章。