[profiler] Rename mono_profiler_install to mono_profiler_create.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Thu, 20 Jul 2017 18:07:47 +0000 (20:07 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Thu, 20 Jul 2017 18:07:47 +0000 (20:07 +0200)
mono/metadata/profiler.c
mono/metadata/profiler.h
mono/mini/debugger-agent.c
mono/profiler/aot.c
mono/profiler/iomap.c
mono/profiler/log.c
mono/profiler/vtune.c
samples/profiler/sample.c
samples/size/size.c

index 33bac7e505ccb005e7ddc2deb8ba0503bb0ad319..ccdb022a14fda51e6538da06f85329867d83e6eb 100644 (file)
@@ -145,7 +145,7 @@ mono_profiler_load (const char *desc)
 }
 
 MonoProfilerHandle
-mono_profiler_install (MonoProfiler *prof)
+mono_profiler_create (MonoProfiler *prof)
 {
        MonoProfilerHandle handle = g_new0 (struct _MonoProfilerDesc, 1);
 
index 5063431bc8bf1b2ed2a7b21e5a8e0b8a007e78fd..0bbc0fe00612d7200d00f1516d5eb847827ce883 100644 (file)
@@ -54,12 +54,12 @@ typedef struct _MonoProfilerDesc *MonoProfilerHandle;
  * };
  *
  * 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);
 
index 102158e4fdab6144dd37a4f8ee8baf089c2d3fc6..b625580c1fe4c347fedcc46b41f7473db085cc88 100644 (file)
@@ -595,11 +595,6 @@ typedef struct {
        MonoClass *klass;
 } EventInfo;
 
-/* Dummy structure used for the profiler callbacks */
-typedef struct {
-       void* dummy;
-} DebuggerProfiler;
-
 typedef struct {
        guint8 *buf, *p, *end;
 } Buffer;
@@ -700,8 +695,6 @@ static MonoCoopCond debugger_thread_exited_cond;
 /* 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;
 
@@ -999,7 +992,7 @@ mono_debugger_agent_init (void)
        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);
index 49980d9ccd97adb5df311bd050786171409d203b..ea2dc1b23fa174995584fc949a38644c5f626e94 100644 (file)
@@ -167,7 +167,7 @@ mono_profiler_init_aot (const char *desc)
 
        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);
 }
index c2b48fa3ee31d8c946e29a1ead9988d9cbc595ae..b2ce8871001a0490c090aeea306aa3f09646a80d 100644 (file)
@@ -540,7 +540,7 @@ void mono_profiler_init_iomap (const char *desc)
        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);
index acf02fc3c6a6c4fac46f705cc2dfe72820426beb..ed7a21226593e44c5ad4137d27df819c8b10f031 100644 (file)
@@ -4653,7 +4653,7 @@ mono_profiler_init_log (const char *desc)
 
        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
index 1f06bb81c8b3c44ac931127e7aa15000fd38fbae..e372724393b2cd5cae1e6654e573f0fe32eaf7ad 100644 (file)
@@ -166,7 +166,7 @@ mono_profiler_init_vtune (const char *desc)
        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);
index bd0ee4f552f53e8067716642f5ddc6edf97d09be..a2953eacbc5dbabbb57afe3ee5e5ddcaa78c82fd 100644 (file)
@@ -49,7 +49,7 @@ mono_profiler_init_sample (const char *desc)
 
        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);
index 40edb321a0a0d77695610bb74c567d3f50eabba5..a0f2690f6d9022278d111ba333f85fee55e298b7 100644 (file)
@@ -133,6 +133,6 @@ void install_icall (MonoProfiler *prof, MonoMethod *method, MonoJitInfo* jinfo)
 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);
 }