MONO_OPT_SIMD | \
MONO_OPT_AOT)
-#define EXCLUDED_FROM_ALL (MONO_OPT_SHARED | MONO_OPT_PRECOMP | MONO_OPT_UNSAFE)
+#define EXCLUDED_FROM_ALL (MONO_OPT_SHARED | MONO_OPT_PRECOMP | MONO_OPT_UNSAFE | MONO_OPT_GSHAREDVT)
static guint32
parse_optimizations (const char* p)
int i, invert, len;
/* call out to cpu detection code here that sets the defaults ... */
- opt |= mono_arch_cpu_optimizazions (&exclude);
+ opt |= mono_arch_cpu_optimizations (&exclude);
opt &= ~exclude;
if (!p)
return opt;
MonoDomain *domain = mono_domain_get ();
guint32 exclude = 0;
- mono_arch_cpu_optimizazions (&exclude);
+ mono_arch_cpu_optimizations (&exclude);
if (mini_stats_fd) {
fprintf (mini_stats_fd, "$stattitle = \'Mono Benchmark Results (various optimizations)\';\n");
MonoAssembly *ass;
int verbose;
guint32 opts;
+ guint32 recompilation_times;
} CompileAllThreadArgs;
static void
-compile_all_methods_thread_main (CompileAllThreadArgs *args)
+compile_all_methods_thread_main_inner (CompileAllThreadArgs *args)
{
MonoAssembly *ass = args->ass;
int verbose = args->verbose;
}
static void
-compile_all_methods (MonoAssembly *ass, int verbose, guint32 opts)
+compile_all_methods_thread_main (CompileAllThreadArgs *args)
+{
+ guint32 i;
+ for (i = 0; i < args->recompilation_times; ++i)
+ compile_all_methods_thread_main_inner (args);
+}
+
+static void
+compile_all_methods (MonoAssembly *ass, int verbose, guint32 opts, guint32 recompilation_times)
{
CompileAllThreadArgs args;
args.ass = ass;
args.verbose = verbose;
args.opts = opts;
+ args.recompilation_times = recompilation_times;
/*
* Need to create a mono thread since compilation might trigger
" --break METHOD Inserts a breakpoint at METHOD entry\n"
" --break-at-bb METHOD N Inserts a breakpoint in METHOD at BB N\n"
" --compile METHOD Just compile METHOD in assembly\n"
- " --compile-all Compiles all the methods in the assembly\n"
+ " --compile-all=N Compiles all the methods in the assembly multiple times (default: 1)\n"
" --ncompile N Number of times to compile METHOD (default: 1)\n"
" --print-vtable Print the vtable of all used classes\n"
" --regression Runs the regression test contained in the assembly\n"
" none No assemblies\n"
" program Entry point assembly\n"
" assembly Specifies an assembly\n"
+ " wrapper All wrappers bridging native and managed code\n"
" M:Type:Method Specifies a method\n"
" N:Namespace Specifies a namespace\n"
" T:Type Specifies a type\n"
+ " E:Type Specifies stack traces for an exception type\n"
" EXPR Includes expression\n"
" -EXPR Excludes expression\n"
" EXPR,EXPR Multiple expressions\n"
if (!mono_debugger_insert_breakpoint (argv [++i], FALSE))
fprintf (stderr, "Error: invalid method name '%s'\n", argv [i]);
+ } else if (strcmp (argv [i], "--llvm") == 0) {
+#ifndef MONO_ARCH_LLVM_SUPPORTED
+ fprintf (stderr, "Mono Warning: --llvm not supported on this platform.\n");
+#else
+ mono_use_llvm = TRUE;
+#endif
} else {
fprintf (stderr, "Unsupported command line option: '%s'\n", argv [i]);
exit (1);
const char* aname, *mname = NULL;
char *config_file = NULL;
int i, count = 1;
- guint32 opt, action = DO_EXEC;
+ guint32 opt, action = DO_EXEC, recompilation_times = 1;
MonoGraphOptions mono_graph_options = 0;
int mini_verbose = 0;
gboolean enable_profile = FALSE;
#ifdef HOST_WIN32
int mixed_mode = FALSE;
#endif
+#ifdef __native_client__
+ gboolean nacl_null_checks_off = FALSE;
+#endif
#ifdef MOONLIGHT
#ifndef HOST_WIN32
if (!g_thread_supported ())
g_thread_init (NULL);
- if (mono_running_on_valgrind () && getenv ("MONO_VALGRIND_LEAK_CHECK")) {
- GMemVTable mem_vtable;
-
- /*
- * Instruct glib to use the system allocation functions so valgrind
- * can track the memory allocated by the g_... functions.
- */
- memset (&mem_vtable, 0, sizeof (mem_vtable));
- mem_vtable.malloc = malloc;
- mem_vtable.realloc = realloc;
- mem_vtable.free = free;
- mem_vtable.calloc = calloc;
-
- g_mem_set_vtable (&mem_vtable);
- }
-
g_log_set_always_fatal (G_LOG_LEVEL_ERROR);
g_log_set_fatal_mask (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR);
char *build = mono_get_runtime_build_info ();
char *gc_descr;
- g_print ("Mono JIT compiler version %s\nCopyright (C) 2002-2011 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com\n", build);
+ g_print ("Mono JIT compiler version %s\nCopyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com\n", build);
g_free (build);
g_print (info);
gc_descr = mono_gc_get_description ();
mono_compile_aot = TRUE;
aot_options = &argv [i][6];
#endif
+ } else if (strncmp (argv [i], "--compile-all=", 14) == 0) {
+ action = DO_COMPILE;
+ recompilation_times = atoi (argv [i] + 14);
} else if (strcmp (argv [i], "--compile-all") == 0) {
action = DO_COMPILE;
} else if (strncmp (argv [i], "--runtime=", 10) == 0) {
#ifdef __native_client__
} else if (strcmp (argv [i], "--nacl-mono-path") == 0){
nacl_mono_path = g_strdup(argv[++i]);
+ } else if (strcmp (argv [i], "--nacl-null-checks-off") == 0){
+ nacl_null_checks_off = TRUE;
#endif
} else {
fprintf (stderr, "Unknown command line option: '%s'\n", argv [i]);
{
nacl_align_byte = -1; /* 0xff */
}
+ if (!nacl_null_checks_off) {
+ MonoDebugOptions *opt = mini_get_debug_options ();
+ opt->explicit_null_checks = TRUE;
+ }
#endif
if (!argv [i]) {
* This used to be an amd64 only crash, but it looks like now most glibc targets do unwinding
* that requires reading the target code.
*/
-#ifdef __linux__
+#if defined( __linux__ ) || defined( __native_client__ )
mono_dont_free_global_codeman = TRUE;
#endif
i = mono_environment_exitcode_get ();
return i;
} else if (action == DO_COMPILE) {
- compile_all_methods (assembly, mini_verbose, opt);
+ compile_all_methods (assembly, mini_verbose, opt, recompilation_times);
mini_cleanup (domain);
return 0;
} else if (action == DO_DEBUGGER) {