X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fprofiler.h;h=36283175a7a5cdb3a3af9eed26423492ff470b9b;hb=ba6dad488203bdacecee7f23ef35f576ad94f04d;hp=42408e085c49a61dd082b480e176718b050ade49;hpb=fb185c0c6eb5b1056e1a1fc0c897ef4f9f9125a6;p=mono.git diff --git a/mono/metadata/profiler.h b/mono/metadata/profiler.h index 42408e085c4..36283175a7a 100644 --- a/mono/metadata/profiler.h +++ b/mono/metadata/profiler.h @@ -3,7 +3,8 @@ #include #include -#include + +G_BEGIN_DECLS typedef enum { MONO_PROFILE_NONE = 0, @@ -20,7 +21,9 @@ typedef enum { MONO_PROFILE_REMOTING = 1 << 10, MONO_PROFILE_TRANSITIONS = 1 << 11, MONO_PROFILE_ENTER_LEAVE = 1 << 12, - MONO_PROFILE_COVERAGE = 1 << 13 + MONO_PROFILE_COVERAGE = 1 << 13, + MONO_PROFILE_INS_COVERAGE = 1 << 14, + MONO_PROFILE_STATISTICAL = 1 << 15 } MonoProfileFlags; typedef enum { @@ -29,9 +32,13 @@ typedef enum { } MonoProfileResult; typedef enum { - MONO_COVERAGE_INSTRUCTION, - MONO_COVERAGE_BASIC_BLOCK -} MonoProfileCoverageLevel; + MONO_GC_EVENT_START, + MONO_GC_EVENT_MARK_START, + MONO_GC_EVENT_MARK_END, + MONO_GC_EVENT_RECLAIM_START, + MONO_GC_EVENT_RECLAIM_END, + MONO_GC_EVENT_END +} MonoGCEvent; /* coverage info */ typedef struct { @@ -45,6 +52,7 @@ typedef struct { typedef struct _MonoProfiler MonoProfiler; + /* * Functions that the runtime will call on the profiler. */ @@ -57,16 +65,23 @@ typedef void (*MonoProfileClassFunc) (MonoProfiler *prof, MonoClass *klass typedef void (*MonoProfileModuleFunc) (MonoProfiler *prof, MonoImage *module); typedef void (*MonoProfileAssemblyFunc) (MonoProfiler *prof, MonoAssembly *assembly); +typedef void (*MonoProfileExceptionFunc) (MonoProfiler *prof, MonoObject *object); +typedef void (*MonoProfileExceptionClauseFunc) (MonoProfiler *prof, MonoMethod *method, int clause_type, int clause_num); + typedef void (*MonoProfileAppDomainResult)(MonoProfiler *prof, MonoDomain *domain, int result); typedef void (*MonoProfileMethodResult) (MonoProfiler *prof, MonoMethod *method, int result); +typedef void (*MonoProfileJitResult) (MonoProfiler *prof, MonoMethod *method, MonoJitInfo* jinfo, int result); typedef void (*MonoProfileClassResult) (MonoProfiler *prof, MonoClass *klass, int result); typedef void (*MonoProfileModuleResult) (MonoProfiler *prof, MonoImage *module, int result); typedef void (*MonoProfileAssemblyResult) (MonoProfiler *prof, MonoAssembly *assembly, int result); typedef void (*MonoProfileMethodInline) (MonoProfiler *prof, MonoMethod *parent, MonoMethod *child, int *ok); -typedef void (*MonoProfileThreadFunc) (MonoProfiler *prof, guint32 tid); +typedef void (*MonoProfileThreadFunc) (MonoProfiler *prof, gsize tid); typedef void (*MonoProfileAllocFunc) (MonoProfiler *prof, MonoObject *obj, MonoClass *klass); +typedef void (*MonoProfileStatFunc) (MonoProfiler *prof, guchar *ip, void *context); +typedef void (*MonoProfileGCFunc) (MonoProfiler *prof, MonoGCEvent event, int generation); +typedef void (*MonoProfileGCResizeFunc) (MonoProfiler *prof, gint64 new_size); typedef gboolean (*MonoProfileCoverageFilterFunc) (MonoProfiler *prof, MonoMethod *method); @@ -90,16 +105,20 @@ void mono_profiler_install_class (MonoProfileClassFunc start_load, MonoPro MonoProfileClassFunc start_unload, MonoProfileClassFunc end_unload); void mono_profiler_install_jit_compile (MonoProfileMethodFunc start, MonoProfileMethodResult end); +void mono_profiler_install_jit_end (MonoProfileJitResult end); void mono_profiler_install_enter_leave (MonoProfileMethodFunc enter, MonoProfileMethodFunc fleave); void mono_profiler_install_thread (MonoProfileThreadFunc start, MonoProfileThreadFunc end); void mono_profiler_install_transition (MonoProfileMethodResult callback); void mono_profiler_install_allocation (MonoProfileAllocFunc callback); +void mono_profiler_install_statistical (MonoProfileStatFunc callback); +void mono_profiler_install_exception (MonoProfileExceptionFunc throw_callback, MonoProfileMethodFunc exc_method_leave, MonoProfileExceptionClauseFunc clause_callback); void mono_profiler_install_coverage_filter (MonoProfileCoverageFilterFunc callback); -void mono_profiler_set_coverage_level (MonoProfileCoverageLevel level); - void mono_profiler_coverage_get (MonoProfiler *prof, MonoMethod *method, MonoProfileCoverageFunc func); +void mono_profiler_install_gc (MonoProfileGCFunc callback, MonoProfileGCResizeFunc heap_resize_callback); void mono_profiler_load (const char *desc); +G_END_DECLS + #endif /* __MONO_PROFILER_H__ */