* ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
[mono.git] / mono / metadata / profiler.h
index 1f6ab146bb12acac101bee2b15d438c97e9ed7ab..e8b9008d92c843f3b29622fb0c52dee51df83335 100644 (file)
@@ -3,7 +3,6 @@
 
 #include <mono/metadata/object.h>
 #include <mono/metadata/appdomain.h>
-#include <mono/io-layer/io-layer.h>
 
 typedef enum {
        MONO_PROFILE_NONE = 0,
@@ -19,7 +18,10 @@ typedef enum {
        MONO_PROFILE_THREADS          = 1 << 9,
        MONO_PROFILE_REMOTING         = 1 << 10,
        MONO_PROFILE_TRANSITIONS      = 1 << 11,
-       MONO_PROFILE_ENTER_LEAVE      = 1 << 12
+       MONO_PROFILE_ENTER_LEAVE      = 1 << 12,
+       MONO_PROFILE_COVERAGE         = 1 << 13,
+       MONO_PROFILE_INS_COVERAGE     = 1 << 14,
+       MONO_PROFILE_STATISTICAL      = 1 << 15
 } MonoProfileFlags;
 
 typedef enum {
@@ -27,6 +29,25 @@ typedef enum {
        MONO_PROFILE_FAILED
 } MonoProfileResult;
 
+typedef enum {
+       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 {
+       MonoMethod *method;
+       int iloffset;
+       int counter;
+       const char *filename;
+       int line;
+       int col;
+} MonoProfileCoverageEntry;
+
 typedef struct _MonoProfiler MonoProfiler;
 
 /*
@@ -49,8 +70,15 @@ typedef void (*MonoProfileAssemblyResult) (MonoProfiler *prof, MonoAssembly *ass
 
 typedef void (*MonoProfileMethodInline)   (MonoProfiler *prof, MonoMethod   *parent, MonoMethod *child, int *ok);
 
-typedef void (*MonoProfileThreadFunc)     (MonoProfiler *prof, HANDLE thread);
+typedef void (*MonoProfileThreadFunc)     (MonoProfiler *prof, guint32 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);
+
+typedef void (*MonoProfileCoverageFunc)   (MonoProfiler *prof, const MonoProfileCoverageEntry *entry);
 
 /*
  * Function the profiler may call.
@@ -70,11 +98,16 @@ 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_enter_leave (MonoProfileMethodFunc enter, MonoProfileMethodFunc leave);
+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_coverage_filter (MonoProfileCoverageFilterFunc callback);
+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_install_simple (void);
+void mono_profiler_load             (const char *desc);
 
 #endif /* __MONO_PROFILER_H__ */