This is a small starter example that enables you to write your own .NET profiler using the .NET Profiling API.
This project consists of three projects:
The profiler. Don't be afraid of C++ code :-)
This can also be replaced by a normal batch file. It only exists to start the app to be profiled and attach the profiler by using some enviornment variables.
This represents the app to be profiled. It continuously throws an exception.
I will maintain a list of links to some helpful resources here
Creating a custom NET Profiler that logs function calls Summary of Profiling API
- You should read the section "Receiving Method Entry and Exit Notifications".
http://www.blong.com/conferences/dcon2003/internals/profiling.htm#Ref1