#include <mono/metadata/object.h>
#include <mono/metadata/appdomain.h>
+G_BEGIN_DECLS
+
typedef enum {
MONO_PROFILE_NONE = 0,
MONO_PROFILE_APPDOMAIN_EVENTS = 1 << 0,
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;
typedef struct _MonoProfiler MonoProfiler;
+
/*
* Functions that the runtime will call on the profiler.
*/
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);
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_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_load (const char *desc);
+G_END_DECLS
+
#endif /* __MONO_PROFILER_H__ */