a575963da9
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
74 lines
3.1 KiB
HTML
74 lines
3.1 KiB
HTML
<h1>Profiling Interface</h1>
|
|
|
|
<h3>Profiler Operation</h3>
|
|
|
|
<p>The following methods can be used by dynamic profiler
|
|
methods to monitor different aspects of the program.
|
|
|
|
<p>A custom profiler will have one public method defined in
|
|
the shared library which is the entry point that Mono calls at
|
|
startup, it has the following signature:
|
|
|
|
<pre>
|
|
void mono_profiler_startup (const char *desc)
|
|
</pre>
|
|
|
|
<p>Where "desc" is the set of arguments that were passed from
|
|
the command line. This routine will call
|
|
<tt>mono_profiler_install</tt> to activate the profiler and
|
|
will install one or more filters (one of the various
|
|
<tt>mono_profiler_install_</tt> functions).
|
|
|
|
<p>In addition, a profiler developer will typically call
|
|
<tt>mono_profiler_set_events</tt> to register which kinds of
|
|
traces should be enabled, these can be an OR-ed combination of
|
|
the following:
|
|
|
|
<pre>
|
|
MONO_PROFILE_NONE
|
|
MONO_PROFILE_APPDOMAIN_EVENTS
|
|
MONO_PROFILE_ASSEMBLY_EVENTS
|
|
MONO_PROFILE_MODULE_EVENTS
|
|
MONO_PROFILE_CLASS_EVENTS
|
|
MONO_PROFILE_JIT_COMPILATION
|
|
MONO_PROFILE_INLINING
|
|
MONO_PROFILE_EXCEPTIONS
|
|
MONO_PROFILE_ALLOCATIONS
|
|
MONO_PROFILE_GC
|
|
MONO_PROFILE_THREADS
|
|
MONO_PROFILE_REMOTING
|
|
MONO_PROFILE_TRANSITIONS
|
|
MONO_PROFILE_ENTER_LEAVE
|
|
MONO_PROFILE_COVERAGE
|
|
MONO_PROFILE_INS_COVERAGE
|
|
MONO_PROFILE_STATISTICAL
|
|
</pre>
|
|
|
|
<p>Developers can change the set of monitored events at
|
|
runtime by calling <tt>mono_profiler_set_events</tt>.
|
|
|
|
<h4><a name="api:mono_profiler_install">mono_profiler_install</a></h4>
|
|
<h4><a name="api:mono_profiler_install_allocation">mono_profiler_install_allocation</a></h4>
|
|
<h4><a name="api:mono_profiler_install_appdomain">mono_profiler_install_appdomain</a></h4>
|
|
<h4><a name="api:mono_profiler_install_assembly">mono_profiler_install_assembly</a></h4>
|
|
<h4><a name="api:mono_profiler_install_class">mono_profiler_install_class</a></h4>
|
|
<h4><a name="api:mono_profiler_install_coverage_filter">mono_profiler_install_coverage_filter</a></h4>
|
|
<h4><a name="api:mono_profiler_install_enter_leave">mono_profiler_install_enter_leave</a></h4>
|
|
<h4><a name="api:mono_profiler_install_jit_compile">mono_profiler_install_jit_compile</a></h4>
|
|
<h4><a name="api:mono_profiler_install_module">mono_profiler_install_module</a></h4>
|
|
<h4><a name="api:mono_profiler_install_thread">mono_profiler_install_thread</a></h4>
|
|
<h4><a name="api:mono_profiler_install_transition">mono_profiler_install_transition</a></h4>
|
|
<h4><a name="api:mono_profiler_install_gc">mono_profiler_install_gc</a></h4>
|
|
<h4><a name="api:mono_profiler_install_statistical">mono_profiler_install_statistical</a></h4>
|
|
<h4><a name="api:mono_profiler_set_events">mono_profiler_set_events</a></h4>
|
|
<h4><a name="api:mono_profiler_get_events">mono_profiler_get_events</a></h4>
|
|
|
|
<h3>Coverage</h3>
|
|
|
|
<p>To support profiling modules that need to do code coverage
|
|
analysis, the following routines is provided:
|
|
|
|
<h4><a name="api:mono_profiler_coverage_get">mono_profiler_coverage_get</a></h4>
|
|
|
|
|