mono-api-profiler.html 3.1 KB

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