1 <h1>Profiling Interface
</h1>
3 <h3>Profiler Operation
</h3>
5 <p>The following methods can be used by dynamic profiler
6 methods to monitor different aspects of the program.
8 <p>A custom profiler will have one public method defined in
9 the shared library which is the entry point that Mono calls at
10 startup, it has the following signature:
13 void mono_profiler_startup (const char *desc)
16 <p>Where
"desc" is the set of arguments that were passed from
17 the command line. This routine will call
18 <tt>mono_profiler_install
</tt> to activate the profiler and
19 will install one or more filters (one of the various
20 <tt>mono_profiler_install_
</tt> functions).
22 <p>In addition, a profiler developer will typically call
23 <tt>mono_profiler_set_events
</tt> to register which kinds of
24 traces should be enabled, these can be an OR-ed combination of
29 MONO_PROFILE_APPDOMAIN_EVENTS
30 MONO_PROFILE_ASSEMBLY_EVENTS
31 MONO_PROFILE_MODULE_EVENTS
32 MONO_PROFILE_CLASS_EVENTS
33 MONO_PROFILE_JIT_COMPILATION
35 MONO_PROFILE_EXCEPTIONS
36 MONO_PROFILE_ALLOCATIONS
40 MONO_PROFILE_TRANSITIONS
41 MONO_PROFILE_ENTER_LEAVE
43 MONO_PROFILE_INS_COVERAGE
44 MONO_PROFILE_STATISTICAL
47 <p>Developers can change the set of monitored events at
48 runtime by calling
<tt>mono_profiler_set_events
</tt>.
50 <h4><a name=
"api:mono_profiler_install">mono_profiler_install
</a></h4>
51 <h4><a name=
"api:mono_profiler_install_allocation">mono_profiler_install_allocation
</a></h4>
52 <h4><a name=
"api:mono_profiler_install_appdomain">mono_profiler_install_appdomain
</a></h4>
53 <h4><a name=
"api:mono_profiler_install_assembly">mono_profiler_install_assembly
</a></h4>
54 <h4><a name=
"api:mono_profiler_install_class">mono_profiler_install_class
</a></h4>
55 <h4><a name=
"api:mono_profiler_install_coverage_filter">mono_profiler_install_coverage_filter
</a></h4>
56 <h4><a name=
"api:mono_profiler_install_enter_leave">mono_profiler_install_enter_leave
</a></h4>
57 <h4><a name=
"api:mono_profiler_install_jit_compile">mono_profiler_install_jit_compile
</a></h4>
58 <h4><a name=
"api:mono_profiler_install_module">mono_profiler_install_module
</a></h4>
59 <h4><a name=
"api:mono_profiler_install_thread">mono_profiler_install_thread
</a></h4>
60 <h4><a name=
"api:mono_profiler_install_transition">mono_profiler_install_transition
</a></h4>
61 <h4><a name=
"api:mono_profiler_install_gc">mono_profiler_install_gc
</a></h4>
62 <h4><a name=
"api:mono_profiler_install_statistical">mono_profiler_install_statistical
</a></h4>
63 <h4><a name=
"api:mono_profiler_set_events">mono_profiler_set_events
</a></h4>
64 <h4><a name=
"api:mono_profiler_get_events">mono_profiler_get_events
</a></h4>
68 <p>To support profiling modules that need to do code coverage
69 analysis, the following routines is provided:
71 <h4><a name=
"api:mono_profiler_coverage_get">mono_profiler_coverage_get
</a></h4>