Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kliger <alklig@microsoft.com>2018-09-28 20:22:25 +0300
committerAleksey Kliger (λgeek) <akliger@gmail.com>2018-10-10 18:54:14 +0300
commit61613246290ab634a02ba56c22b0d809f840fa0a (patch)
tree6176138fbebc013a7154574072f463379ef11883
parent8a0fbd4e8979e64cb06678f8618a5ee11c87864c (diff)
Example experiment "null"
-rw-r--r--configure.ac6
-rw-r--r--mono/metadata/domain.c8
-rw-r--r--mono/utils/mono-experiments.def3
3 files changed, 15 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index c55136d9055..92458681819 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5038,7 +5038,7 @@ dnl *** feature experiments ***
dnl ***************************
dnl When adding experiments, also add to mono/utils/mono-experiments.def
-AC_ARG_ENABLE(experiment, [ --enable-experiment=LIST Enable experimental fatures from the comma-separate LIST. Available experiments: ],[
+AC_ARG_ENABLE(experiment, [ --enable-experiment=LIST Enable experimental fatures from the comma-separate LIST. Available experiments: null],[
if test x$enable_experiment != x ; then
AC_DEFINE(ENABLE_EXPERIMENTS,1,[Enable feature experiments])
@@ -5048,9 +5048,13 @@ AC_ARG_ENABLE(experiment, [ --enable-experiment=LIST Enable experimental f
done
if test "x$mono_experiment_test_enable_all" = "xyes"; then
+ eval "mono_experiment_test_enable_null='yes'"
true
fi
+ if test "x$mono_experiment_test_enable_null" = "xyes"; then
+ AC_DEFINE(ENABLE_EXPERIMENT_null, 1, [Enable experiment 'null'])
+ fi
],[])
dnl **********************
diff --git a/mono/metadata/domain.c b/mono/metadata/domain.c
index a323e9f5288..36210038e0d 100644
--- a/mono/metadata/domain.c
+++ b/mono/metadata/domain.c
@@ -49,6 +49,7 @@
#include <mono/metadata/threads.h>
#include <mono/metadata/profiler-private.h>
#include <mono/metadata/coree.h>
+#include <mono/utils/mono-experiments.h>
//#define DEBUG_DOMAIN_UNLOAD 1
@@ -535,7 +536,12 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
mono_root_domain = domain;
SET_APPDOMAIN (domain);
-
+
+#if defined(ENABLE_EXPERIMENT_null)
+ if (mono_experiment_enabled (MONO_EXPERIMENT_null))
+ g_warning ("null experiment enabled");
+#endif
+
/* Get a list of runtimes supported by the exe */
if (exe_filename != NULL) {
/*
diff --git a/mono/utils/mono-experiments.def b/mono/utils/mono-experiments.def
index 5d9363f8f95..9ec57b7c1ff 100644
--- a/mono/utils/mono-experiments.def
+++ b/mono/utils/mono-experiments.def
@@ -30,3 +30,6 @@
* is compiled in and also enabled at runtime.
* It is optional to add the compile-time check, but if you add it, add the runtime check too.
*/
+#if defined(ENABLE_EXPERIMENT_null)
+EXPERIMENT(null,"https://github.com/mono/mono/issues/10877")
+#endif