mono-api-counters.html 1.4 KB

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