/*
- * mono-profiler-aot.c: Ahead of Time Compiler Profiler for Mono.
+ * aot.c: Ahead of Time Compiler Profiler for Mono.
*
*
* Copyright 2008-2009 Novell, Inc (http://www.novell.com)
static gboolean verbose;
static void
-prof_jit_enter (MonoProfiler *prof, MonoMethod *method)
-{
-}
-
-static void
-prof_jit_leave (MonoProfiler *prof, MonoMethod *method, int result)
+prof_jit_leave (MonoProfiler *prof, MonoMethod *method, MonoJitInfo *jinfo)
{
MonoImage *image = mono_class_get_image (mono_method_get_class (method));
}
void
-mono_profiler_startup (const char *desc);
+mono_profiler_init_aot (const char *desc);
/**
- * mono_profiler_startup:
+ * mono_profiler_init_aot:
* the entry point
*/
void
-mono_profiler_startup (const char *desc)
+mono_profiler_init_aot (const char *desc)
{
MonoProfiler *prof;
const char *p;
const char *opt;
- char *outfile_name;
+ char *outfile_name = NULL;
p = desc;
if (strncmp (p, "aot", 3))
mono_os_mutex_init (&mutex);
- mono_profiler_install (prof, prof_shutdown);
-
- mono_profiler_install_jit_compile (prof_jit_enter, prof_jit_leave);
-
- mono_profiler_set_events (MONO_PROFILE_JIT_COMPILATION);
+ MonoProfilerHandle handle = mono_profiler_create (prof);
+ mono_profiler_set_runtime_shutdown_end_callback (handle, prof_shutdown);
+ mono_profiler_set_jit_done_callback (handle, prof_jit_leave);
}
static void