Skip to content

Commit

Permalink
[mono] Remove unused MONO_DEBUG=dont-free-domains option. (#66817)
Browse files Browse the repository at this point in the history
  • Loading branch information
vargaz authored Mar 18, 2022
1 parent 2306813 commit daa320a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
8 changes: 0 additions & 8 deletions src/mono/mono/metadata/domain-internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@

G_BEGIN_DECLS

/*
* If this is set, the memory belonging to appdomains is not freed when a domain is
* unloaded, and assemblies loaded by the appdomain are not unloaded either. This
* allows us to use typed gc in non-default appdomains too, leading to increased
* performance.
*/
extern gboolean mono_dont_free_domains;

struct _MonoAppContext {
MonoObject obj;
gint32 domain_id;
Expand Down
2 changes: 0 additions & 2 deletions src/mono/mono/metadata/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
static MonoImage *exe_image;
static MonoDomain *mono_root_domain;

gboolean mono_dont_free_domains;

/* AppConfigInfo: Information about runtime versions supported by an
* aplication.
*/
Expand Down
15 changes: 4 additions & 11 deletions src/mono/mono/mini/mini-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -4011,12 +4011,11 @@ mini_parse_debug_option (const char *option)
mini_debug_options.suspend_on_exception = TRUE;
else if (!strcmp (option, "suspend-on-unhandled"))
mini_debug_options.suspend_on_unhandled = TRUE;
else if (!strcmp (option, "dont-free-domains"))
mono_dont_free_domains = TRUE;
else if (!strcmp (option, "dyn-runtime-invoke"))
mini_debug_options.dyn_runtime_invoke = TRUE;
else if (!strcmp (option, "gdb"))
fprintf (stderr, "MONO_DEBUG=gdb is deprecated.");
else if (!strcmp (option, "dont-free-domains") || !strcmp (option, "gdb") ||
!strcmp (option, "gen-compact-seq-points") || !strcmp (option, "debug-domain-unload"))
fprintf (stderr, "MONO_DEBUG=%s is deprecated.", option);
else if (!strcmp (option, "lldb"))
mini_debug_options.lldb = TRUE;
else if (!strcmp (option, "llvm-disable-inlining"))
Expand All @@ -4027,8 +4026,6 @@ mini_parse_debug_option (const char *option)
mini_debug_options.explicit_null_checks = TRUE;
else if (!strcmp (option, "gen-seq-points"))
mini_debug_options.gen_sdb_seq_points = TRUE;
else if (!strcmp (option, "gen-compact-seq-points"))
fprintf (stderr, "Mono Warning: option gen-compact-seq-points is deprecated.\n");
else if (!strcmp (option, "no-compact-seq-points"))
mini_debug_options.no_seq_points_compact_data = TRUE;
else if (!strcmp (option, "single-imm-size"))
Expand All @@ -4043,8 +4040,6 @@ mini_parse_debug_option (const char *option)
mini_debug_options.check_pinvoke_callconv = TRUE;
else if (!strcmp (option, "use-fallback-tls"))
mini_debug_options.use_fallback_tls = TRUE;
else if (!strcmp (option, "debug-domain-unload"))
g_error ("MONO_DEBUG option debug-domain-unload is deprecated.");
else if (!strcmp (option, "partial-sharing"))
mono_set_partial_sharing_supported (TRUE);
else if (!strcmp (option, "align-small-structs"))
Expand Down Expand Up @@ -4508,10 +4503,8 @@ mini_init (const char *filename, const char *runtime_version)

mono_unwind_init ();

if (mini_debug_options.lldb || g_hasenv ("MONO_LLDB")) {
if (mini_debug_options.lldb || g_hasenv ("MONO_LLDB"))
mono_lldb_init ("");
mono_dont_free_domains = TRUE;
}

#ifdef ENABLE_LLVM
if (mono_use_llvm)
Expand Down

0 comments on commit daa320a

Please sign in to comment.