diff options
author | therzok <marius.ungureanu@xamarin.com> | 2019-10-01 23:12:42 +0300 |
---|---|---|
committer | therzok <marius.ungureanu@xamarin.com> | 2019-10-01 23:12:42 +0300 |
commit | a3e9614add73df1bc2d4032ab038bc9022220fab (patch) | |
tree | e4f31a3e6194c9c0637c53ae1f5d3ca2acb1550f /main/build | |
parent | e04e52528368ede93cc881544cfbaf7dab9b28a0 (diff) |
Revert "[Mac] Remove hardcoded thread suspending mode (#7800)"
This reverts commit 41e6fb746da8b651884c91dedaeb60acebe20fab.
Hybrid suspend causes us to lose important information from stacktraces.
See https://github.com/mono/mono/issues/17084
The stacktrace information is complete whenever preemptive mode is used,
so switch back to what we used to have.
Fixes VSTS #988893 - Incomplete exception callstack due to static registrar
Diffstat (limited to 'main/build')
-rw-r--r-- | main/build/MacOSX/Makefile.am | 2 | ||||
-rw-r--r-- | main/build/MacOSX/monostub.mm | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/main/build/MacOSX/Makefile.am b/main/build/MacOSX/Makefile.am index 07b54e968c..d5376015c1 100644 --- a/main/build/MacOSX/Makefile.am +++ b/main/build/MacOSX/Makefile.am @@ -12,7 +12,7 @@ EXTERNAL=../../external MONOSTUB_STATIC_LINK=$(EXTERNAL)/Xamarin.Mac.registrar.full.a if !RELEASE_BUILDS -HYBRID_SUSPEND_ABORT_DEBUG=-DHYBRID_SUSPEND_ABORT_DEBUG +HYBRID_SUSPEND_ABORT=-DHYBRID_SUSPEND_ABORT endif #SDK_PATH=$(shell xcrun --sdk macosx10.8 --show-sdk-path) diff --git a/main/build/MacOSX/monostub.mm b/main/build/MacOSX/monostub.mm index 942bde75a2..f42dd641aa 100644 --- a/main/build/MacOSX/monostub.mm +++ b/main/build/MacOSX/monostub.mm @@ -281,11 +281,13 @@ main (int argc, char **argv) // prevents the code from running correctly, so unset it here. // See https://devdiv.visualstudio.com/DevDiv/_workitems/edit/896438 unsetenv ("MONO_REGISTRY_PATH"); - -#if HYBRID_SUSPEND_ABORT_DEBUG +#if HYBRID_SUSPEND_ABORT setenv ("MONO_SLEEP_ABORT_LIMIT", "5000", 0); #endif + // To be removed: https://github.com/mono/monodevelop/issues/6326 + setenv ("MONO_THREADS_SUSPEND", "preemptive", 0); + setenv ("MONO_GC_PARAMS", "major=marksweep-conc,nursery-size=8m", 0); void *libmono = dlopen ("libmonosgen-2.0.dylib", RTLD_LAZY); |