projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[profiler] log profiler: limit method instrumentation to selected methods (#5517)
[mono.git]
/
mono
/
mini
/
driver.c
diff --git
a/mono/mini/driver.c
b/mono/mini/driver.c
index 6f977ecb37d990a586d3c92344b9c54c83659ce1..dbbb646297d7850c260d5732a98a05be25753627 100644
(file)
--- a/
mono/mini/driver.c
+++ b/
mono/mini/driver.c
@@
-52,6
+52,7
@@
#include "mono/utils/mono-hwcap.h"
#include "mono/utils/mono-logger-internals.h"
#include "mono/metadata/w32handle.h"
#include "mono/utils/mono-hwcap.h"
#include "mono/utils/mono-logger-internals.h"
#include "mono/metadata/w32handle.h"
+#include "mono/metadata/callspec.h"
#include "mini.h"
#include "jit.h"
#include "mini.h"
#include "jit.h"
@@
-512,6
+513,11
@@
mini_regression (MonoImage *image, int verbose, int *total_run)
}
} else {
for (opt = 0; opt < G_N_ELEMENTS (opt_sets); ++opt) {
}
} else {
for (opt = 0; opt < G_N_ELEMENTS (opt_sets); ++opt) {
+ /* builtin-types.cs needs OPT_INTRINS enabled */
+ if (!strcmp ("builtin-types", image->assembly_name))
+ if (!(opt_sets [opt] & MONO_OPT_INTRINS))
+ continue;
+
mini_regression_step (image, verbose, total_run, &total,
opt_sets [opt] & ~exclude,
timer, domain);
mini_regression_step (image, verbose, total_run, &total,
opt_sets [opt] & ~exclude,
timer, domain);
@@
-1415,8
+1421,8
@@
mono_jit_parse_options (int argc, char * argv[])
opt->break_on_exc = TRUE;
} else if (strcmp (argv [i], "--stats") == 0) {
mono_counters_enable (-1);
opt->break_on_exc = TRUE;
} else if (strcmp (argv [i], "--stats") == 0) {
mono_counters_enable (-1);
-
mono_stats.enabled = TRUE
;
-
mono_jit_stats.enabled = TRUE
;
+
InterlockedWriteBool (&mono_stats.enabled, TRUE)
;
+
InterlockedWriteBool (&mono_jit_stats.enabled, TRUE)
;
} else if (strcmp (argv [i], "--break") == 0) {
if (i+1 >= argc){
fprintf (stderr, "Missing method name in --break command line option\n");
} else if (strcmp (argv [i], "--break") == 0) {
if (i+1 >= argc){
fprintf (stderr, "Missing method name in --break command line option\n");
@@
-1449,7
+1455,7
@@
mono_jit_parse_options (int argc, char * argv[])
* Need to call this before mini_init () so we can trace methods
* compiled there too.
*/
* Need to call this before mini_init () so we can trace methods
* compiled there too.
*/
- mono_jit_trace_calls = mono_trace_
parse
_options (trace_options);
+ mono_jit_trace_calls = mono_trace_
set
_options (trace_options);
if (mono_jit_trace_calls == NULL)
exit (1);
}
if (mono_jit_trace_calls == NULL)
exit (1);
}
@@
-1762,8
+1768,8
@@
mono_main (int argc, char* argv[])
mono_print_vtable = TRUE;
} else if (strcmp (argv [i], "--stats") == 0) {
mono_counters_enable (-1);
mono_print_vtable = TRUE;
} else if (strcmp (argv [i], "--stats") == 0) {
mono_counters_enable (-1);
-
mono_stats.enabled = TRUE
;
-
mono_jit_stats.enabled = TRUE
;
+
InterlockedWriteBool (&mono_stats.enabled, TRUE)
;
+
InterlockedWriteBool (&mono_jit_stats.enabled, TRUE)
;
#ifndef DISABLE_AOT
} else if (strcmp (argv [i], "--aot") == 0) {
error_if_aot_unsupported ();
#ifndef DISABLE_AOT
} else if (strcmp (argv [i], "--aot") == 0) {
error_if_aot_unsupported ();
@@
-2014,7
+2020,7
@@
mono_main (int argc, char* argv[])
* Need to call this before mini_init () so we can trace methods
* compiled there too.
*/
* Need to call this before mini_init () so we can trace methods
* compiled there too.
*/
- mono_jit_trace_calls = mono_trace_
parse
_options (trace_options);
+ mono_jit_trace_calls = mono_trace_
set
_options (trace_options);
if (mono_jit_trace_calls == NULL)
exit (1);
}
if (mono_jit_trace_calls == NULL)
exit (1);
}
@@
-2135,8
+2141,7
@@
mono_main (int argc, char* argv[])
return 2;
}
return 2;
}
- if (trace_options != NULL)
- mono_trace_set_assembly (assembly);
+ mono_callspec_set_assembly (assembly);
if (mono_compile_aot || action == DO_EXEC) {
const char *error;
if (mono_compile_aot || action == DO_EXEC) {
const char *error;
@@
-2371,6
+2376,17
@@
mono_jit_set_aot_mode (MonoAotMode mode)
mono_aot_only = TRUE;
mono_use_interpreter = TRUE;
}
mono_aot_only = TRUE;
mono_use_interpreter = TRUE;
}
+ if (mono_aot_mode == MONO_AOT_MODE_INTERP_LLVMONLY) {
+ mono_aot_only = TRUE;
+ mono_use_interpreter = TRUE;
+ mono_llvm_only = TRUE;
+ }
+}
+
+mono_bool
+mono_jit_aot_compiling (void)
+{
+ return mono_compile_aot;
}
/**
}
/**
@@
-2384,7
+2400,7
@@
mono_jit_set_aot_mode (MonoAotMode mode)
gboolean
mono_jit_set_trace_options (const char* options)
{
gboolean
mono_jit_set_trace_options (const char* options)
{
- Mono
TraceSpec *trace_opt = mono_trace_parse
_options (options);
+ Mono
CallSpec *trace_opt = mono_trace_set
_options (options);
if (trace_opt == NULL)
return FALSE;
mono_jit_trace_calls = trace_opt;
if (trace_opt == NULL)
return FALSE;
mono_jit_trace_calls = trace_opt;