cqse/teamscale-profiler-dotnet

Evaluate whether use of COR_PRF_MONITOR_ENTERLEAVE should be replaced by COR_PRF_ENABLE_REJIT

Closed this issue · 1 comments

We're using in the default (non-light) mode COR_PRF_MONITOR_ENTERLEAVE instead of COR_PRF_ENABLE_REJIT. According to the documentation I'd expect that the latter.

Using the non-light mode caused problems at one of our customers when executing tests with the Tosca Classic DotNet engine (not TBox). Tosca cannot connect to the application due to a DLL injection error. Switching to light mode (and thus not monitoring enter/leave events) fixes that problem.

According to @karottenreibe we have to verify that exchanging the flags still produces correct output if the assembly is pre-jitted with ngen.exe. It would also be nice to have a performance comparison.

I checked this out. A quick test with Pinta revealed:

specifying COR_PRF_DISABLE_ALL_NGEN_IMAGES instead of COR_PRF_MONITOR_ENTERLEAVE gives a noticable performance boost. It still feels a little bit slower than light mode but not by much. Will change our code to use this flag