Enabling Profiling

A code profiler is a software tool, implemented as a DLL, which is called by the common language runtime during the execution of an image. The profiler must implement the ICorProfilerCallback interface, which the common language runtime calls to notify the profiler when specific events occur. The profiler receives notifications whenever a function is entered or exited, an assembly is loaded or unloaded, a thread has been created or destroyed, and when other events occur that are of interest to the programmer. By gathering statistics on these events, a profiler can build a comprehensive picture of which routines used the most CPU time, when garbage collections occurred, if exceptions were thrown, and so on.

The common language runtime can connect a profiler to a process during startup or attach it to a running process.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft