The ILRewrite download contains source code for an example profiler that demonstrates how to use the CLR Profiling API to rewrite (i.e., instrument) IL by using the ReJIT feature. The source code is deployed as a Visual Studio 2012 solution.
To download, go to the latest
For more information, consult readme.txt
included with the source code distribution.