grammar updates
[mono.git] / mono / metadata / profiler.h
index 451f987e0d46cff345d7616081fc059297c60d8c..07f4d8bc19019a35f0544d56643d79b939c842e0 100644 (file)
@@ -19,7 +19,9 @@ 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
 } MonoProfileFlags;
 
 typedef enum {
@@ -27,6 +29,16 @@ typedef enum {
        MONO_PROFILE_FAILED
 } MonoProfileResult;
 
+/* coverage info */
+typedef struct {
+       MonoMethod *method;
+       int iloffset;
+       int counter;
+       const char *filename;
+       int line;
+       int col;
+} MonoProfileCoverageEntry;
+
 typedef struct _MonoProfiler MonoProfiler;
 
 /*
@@ -52,6 +64,10 @@ typedef void (*MonoProfileMethodInline)   (MonoProfiler *prof, MonoMethod   *par
 typedef void (*MonoProfileThreadFunc)     (MonoProfiler *prof, guint32 tid);
 typedef void (*MonoProfileAllocFunc)      (MonoProfiler *prof, MonoObject *obj, MonoClass *klass);
 
+typedef gboolean (*MonoProfileCoverageFilterFunc)   (MonoProfiler *prof, MonoMethod *method);
+
+typedef void (*MonoProfileCoverageFunc)   (MonoProfiler *prof, const MonoProfileCoverageEntry *entry);
+
 /*
  * Function the profiler may call.
  */
@@ -70,11 +86,14 @@ 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_coverage_filter (MonoProfileCoverageFilterFunc callback);
+void mono_profiler_coverage_get  (MonoProfiler *prof, MonoMethod *method, MonoProfileCoverageFunc func);
 
-void mono_profiler_install_simple (void);
+void mono_profiler_load             (const char *desc);
 
 #endif /* __MONO_PROFILER_H__ */