Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
authorPaolo Molaro <lupus@oddwiz.org>
Tue, 3 Jun 2008 11:08:03 +0000 (11:08 -0000)
committerPaolo Molaro <lupus@oddwiz.org>
Tue, 3 Jun 2008 11:08:03 +0000 (11:08 -0000)
* jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
from embedding applications.

svn path=/trunk/mono/; revision=104741

mono/mini/ChangeLog
mono/mini/driver.c
mono/mini/jit.h
mono/mini/mini.h
mono/mini/trace.c

index 860a6db792ccbcd35535dfc503f3af1d518db0b2..426d22de11cb5eaa8e404bde9468133600f6ee73 100644 (file)
@@ -1,3 +1,9 @@
+
+Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
+
+       * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
+       from embedding applications.
+
 2008-06-02  William Holmes  <billholmes54@gmail.com>
 
        * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
index e58c43282c0b8f8ef8f9f03ef7237736f478c95c..045ad3ac08c2d26c464f132466e204734af1847c 100644 (file)
@@ -1678,3 +1678,23 @@ mono_jit_cleanup (MonoDomain *domain)
 {
        mini_cleanup (domain);
 }
+
+/**
+ * mono_jit_set_trace_options:
+ * @options: string representing the trace options
+ *
+ * Set the options of the tracing engine. This function can be called before initializing
+ * the mono runtime. See the --trace mono(1) manpage for the options format.
+ *
+ * Returns: #TRUE if the options where parsed and set correctly, #FALSE otherwise.
+ */
+gboolean
+mono_jit_set_trace_options (const char* options)
+{
+       MonoTraceSpec *trace_opt = mono_trace_parse_options (options);
+       if (trace_opt == NULL)
+               return FALSE;
+       mono_jit_trace_calls = trace_opt;
+       return TRUE;
+}
+
index 1e9b1ab754f8b5edee00459301def00a9e1bb098..de251f465dab35fcc0c416dae13daa61715eec90 100644 (file)
@@ -24,6 +24,9 @@ mono_jit_exec              (MonoDomain *domain, MonoAssembly *assembly,
 void        
 mono_jit_cleanup           (MonoDomain *domain);
 
+gboolean
+mono_jit_set_trace_options (const char* options);
+
 G_END_DECLS
 
 #endif
index 8e8cc3c9483c60e1d031215c2fd2cf49dc91f8b1..3a6d100d78659ab5d174215568d4ddde66e37965 100644 (file)
@@ -1333,7 +1333,7 @@ int       mono_debugger_main                    (MonoDomain *domain, MonoAssembl
 
 
 /* Tracing */
-MonoTraceSpec *mono_trace_parse_options         (char *options) MONO_INTERNAL;
+MonoTraceSpec *mono_trace_parse_options         (const char *options) MONO_INTERNAL;
 void           mono_trace_set_assembly          (MonoAssembly *assembly) MONO_INTERNAL;
 gboolean       mono_trace_eval                  (MonoMethod *method) MONO_INTERNAL;
 
index 8a074b407c1d04c91b6e065f0e6b71c9e0f2523c..0353583c7e3376862b8f53665192333d99010092 100644 (file)
@@ -214,7 +214,7 @@ get_spec (int *last)
 }
 
 MonoTraceSpec *
-mono_trace_parse_options (char *options)
+mono_trace_parse_options (const char *options)
 {
        char *p = options;
        int size = 1;