}
MonoProfilerHandle
-mono_profiler_install (MonoProfiler *prof)
+mono_profiler_create (MonoProfiler *prof)
{
MonoProfilerHandle handle = g_new0 (struct _MonoProfilerDesc, 1);
* };
*
* MonoProfiler *prof = calloc (1, sizeof (MonoProfiler));
- * MonoProfilerHandle handle = mono_profiler_install (prof);
+ * MonoProfilerHandle handle = mono_profiler_create (prof);
* mono_profiler_set_shutdown_callback (handle, my_shutdown_cb);
*
* This function is not async safe.
*/
-MONO_API MonoProfilerHandle mono_profiler_install (MonoProfiler *prof);
+MONO_API MonoProfilerHandle mono_profiler_create (MonoProfiler *prof);
typedef mono_bool (*MonoProfilerCoverageFilterCallback) (MonoProfiler *prof, MonoMethod *method);
MonoClass *klass;
} EventInfo;
-/* Dummy structure used for the profiler callbacks */
-typedef struct {
- void* dummy;
-} DebuggerProfiler;
-
typedef struct {
guint8 *buf, *p, *end;
} Buffer;
/* Mutex for the cond var above */
static MonoCoopMutex debugger_thread_exited_mutex;
-static DebuggerProfiler debugger_profiler;
-
/* The single step request instance */
static SingleStepReq *ss_req;
mono_coop_mutex_init (&debugger_thread_exited_mutex);
mono_coop_cond_init (&debugger_thread_exited_cond);
- MonoProfilerHandle prof = mono_profiler_install ((MonoProfiler*)&debugger_profiler);
+ MonoProfilerHandle prof = mono_profiler_create (NULL);
mono_profiler_set_runtime_shutdown_end_callback (prof, runtime_shutdown);
mono_profiler_set_runtime_initialized_callback (prof, runtime_initialized);
mono_profiler_set_domain_loaded_callback (prof, appdomain_load);
mono_os_mutex_init (&mutex);
- MonoProfilerHandle handle = mono_profiler_install (prof);
+ 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);
}
prof->saved_strings_hash = g_hash_table_new (NULL, NULL);
prof->string_locations_hash = g_hash_table_new (mismatched_files_guint32_hash, mismatched_files_guint32_equal);
- MonoProfilerHandle handle = mono_profiler_install (prof);
+ MonoProfilerHandle handle = mono_profiler_create (prof);
mono_profiler_set_runtime_shutdown_end_callback (handle, profiler_shutdown);
mono_profiler_set_runtime_initialized_callback (handle, runtime_initialized_cb);
mono_profiler_set_iomap_report_callback (handle, mono_portability_iomap_event);
mono_lls_init (&log_profiler.profiler_thread_list, NULL);
- MonoProfilerHandle handle = log_profiler.handle = mono_profiler_install (&log_profiler);
+ MonoProfilerHandle handle = log_profiler.handle = mono_profiler_create (&log_profiler);
/*
* Required callbacks. These are either necessary for the profiler itself
iJIT_IsProfilingActiveFlags flags = iJIT_IsProfilingActive();
if (flags == iJIT_SAMPLING_ON)
{
- MonoProfilerHandle handle = mono_profiler_install (NULL);
+ MonoProfilerHandle handle = mono_profiler_create (NULL);
mono_profiler_set_runtime_shutdown_end_callback (handle, codeanalyst_shutdown);
mono_profiler_set_jit_done_callback (handle, method_jit_done);
mono_profiler_set_jit_code_buffer_callback (handle, code_buffer_new);
prof = g_new0 (MonoProfiler, 1);
- MonoProfilerHandle handle = mono_profiler_install (prof);
+ MonoProfilerHandle handle = mono_profiler_create (prof);
mono_profiler_set_runtime_shutdown_callback (handle, sample_shutdown);
mono_profiler_set_call_instrumentation_filter_callback (handle, sample_instrumentation_filter);
mono_profiler_set_method_enter_callback (handle, sample_method_enter);
void
mono_profiler_init_size (const char *desc)
{
- MonoProfilerHandle handle = mono_profiler_install (NULL);
+ MonoProfilerHandle handle = mono_profiler_create (NULL);
mono_profiler_set_jit_done_callback (handle, install_icall);
}