[arm] Add MONO_DEBUG option for using only fallback tls.
authorVlad Brezae <brezaevlad@gmail.com>
Sat, 25 Apr 2015 00:23:20 +0000 (17:23 -0700)
committerVlad Brezae <brezaevlad@gmail.com>
Fri, 10 Jul 2015 18:43:43 +0000 (11:43 -0700)
mono/mini/mini-arm.c
mono/mini/mini-runtime.c
mono/mini/mini.h

index 308d87246d7b83a4da8f829063e946b0ca2d2e3d..bb2c85f00dbbd1228ae35a70c66e554ced4b2aa3 100644 (file)
@@ -650,6 +650,8 @@ emit_restore_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset)
 static gboolean
 mono_arm_have_fast_tls (void)
 {
+       if (mini_get_debug_options ()->arm_use_fallback_tls)
+               return FALSE;
 #if (defined(HAVE_KW_THREAD) && defined(__linux__)) \
        || defined(TARGET_ANDROID)
        guint32* kuser_get_tls = (void*)0xffff0fe0;
index c870782f0d4657331dc5c35647ccd1889a8eb124..da6b4894be72edd1ddf6b6dbcd7c06757cded5aa 100644 (file)
@@ -2675,6 +2675,8 @@ mini_parse_debug_options (void)
                        debug_options.soft_breakpoints = TRUE;
                else if (!strcmp (arg, "check-pinvoke-callconv"))
                        debug_options.check_pinvoke_callconv = TRUE;
+               else if (!strcmp (arg, "arm-use-fallback-tls"))
+                       debug_options.arm_use_fallback_tls = TRUE;
                else if (!strcmp (arg, "debug-domain-unload"))
                        mono_enable_debug_domain_unload (TRUE);
                else if (!strcmp (arg, "partial-sharing"))
@@ -2683,7 +2685,7 @@ mini_parse_debug_options (void)
                        mono_align_small_structs = TRUE;
                else {
                        fprintf (stderr, "Invalid option for the MONO_DEBUG env variable: %s\n", arg);
-                       fprintf (stderr, "Available options: 'handle-sigint', 'keep-delegates', 'reverse-pinvoke-exceptions', 'collect-pagefault-stats', 'break-on-unverified', 'no-gdb-backtrace', 'dont-free-domains', 'suspend-on-sigsegv', 'suspend-on-exception', 'suspend-on-unhandled', 'dyn-runtime-invoke', 'gdb', 'explicit-null-checks', 'init-stacks', 'check-pinvoke-callconv', 'debug-domain-unload', 'partial-sharing', 'align-small-structs'\n");
+                       fprintf (stderr, "Available options: 'handle-sigint', 'keep-delegates', 'reverse-pinvoke-exceptions', 'collect-pagefault-stats', 'break-on-unverified', 'no-gdb-backtrace', 'dont-free-domains', 'suspend-on-sigsegv', 'suspend-on-exception', 'suspend-on-unhandled', 'dyn-runtime-invoke', 'gdb', 'explicit-null-checks', 'init-stacks', 'check-pinvoke-callconv', 'arm-use-fallback-tls', 'debug-domain-unload', 'partial-sharing', 'align-small-structs'\n");
                        exit (1);
                }
        }
index 388628f02b9a0ddca1de8a74c8ee05f6548e15f4..4f91a1b59e211ac44c617f0d18953498603fa255 100644 (file)
@@ -1923,6 +1923,7 @@ typedef struct {
        gboolean suspend_on_unhandled;
        gboolean dyn_runtime_invoke;
        gboolean gdb;
+       gboolean arm_use_fallback_tls;
        /*
         * Whenever data such as next sequence points and flags is required.
         * Next sequence points and flags are required by the debugger agent.