I gather the main benefit of using the CLR Profiler ICLRProfiling::AttachProfiler method is that you now can attach your CLR profiler long after the target process has started and that you also don't have to pass the COR_ENABLE_PROFILING
and COR_PROFILER
environment variables to the process at launch? Are both of these correct assumptions?
Also, I've read in a CLR Profiling team blog post from 2011 that ICLRProfiling::AttachProfiler did not support the following but would in the future:
GetILFunctionBody
GetILFunctionBodyAllocator
SetILFunctionBody
SetILInstrumentedCodeMap
SetEnterLeaveFunctionHooks*
SetFunctionIDMapper*
GetNotifiedExceptionClauseInfo
All methods related to Enter/Leave/Tailcall
Are these supported now? I'm asking since I have'nt found anything more on the subject online and many of the Microsoft links from 2011-2012 are dead now. If not, then is it even possible to IL rewrite a function body when using ICLRProfiling::AttachProfiler to attach my CLR Profiler?