Add Mono.Debugger.Soft to MonkeyBuilder.
[mono/afaerber.git] / docs / sources / mono-api-counters.html
blobb8ca9f4a0d4f1ccddb2678516b5d237d1d71d96d
1 <h2>Counters</h2>
3 <p>Counters is a Mono API for flexible statistics collection
4 and is used to track different events inside the JIT.
6 <p>You would typically register an address with the
7 <tt>mono_counters_register</tt> routine and increment the
8 counters from your application as you go. At the end of the
9 program you would call mono_counters_dump which will display
10 all the registered counters.
12 <p>If you need more complicated counter computation, a
13 function can be provided instead of an address. In that case
14 the <tt>MONO_COUNTER_CALLBACK</tt> flag must be ored in the
15 type request.
17 <p>The types that can be rendered are:
19 <pre>
20 MONO_COUNTER_INT
21 MONO_COUNTER_UINT
22 MONO_COUNTER_WORD
23 MONO_COUNTER_LONG
24 MONO_COUNTER_ULONG
25 MONO_COUNTER_DOUBLE
26 MONO_COUNTER_STRING
27 </pre>
29 <p>To organize the output, you register also a section where
30 the counter will be displayed, or one of the following values
31 when you register your counter:
33 <pre>
35 MONO_COUNTER_JIT
36 MONO_COUNTER_GC
37 MONO_COUNTER_METADATA
38 MONO_COUNTER_GENERICS
39 MONO_COUNTER_SECURITY
40 </pre>
42 <h4><a name="api:mono_counters_dump">mono_counters_dump</a></h4>
43 <h4><a name="api:mono_counters_enable">mono_counters_enable</a></h4>
44 <h4><a name="api:mono_counters_register">mono_counters_register</a></h4>