Make copy_stack_data support configurable.
commitad90ebd3abf06a33174ebf0979950025e7381f50
authorlateralusX <lateralusx.github@gmail.com>
Fri, 17 May 2019 16:33:09 +0000 (17 18:33 +0200)
committerLarry Ewing <lewing@microsoft.com>
Fri, 21 Jun 2019 04:34:56 +0000 (20 23:34 -0500)
treea975d5b3c8838a5422bf443146246bab3fc7feb6
parent7af0e36db3e5baab73e2d0ba0cf4685ac571b3d9
Make copy_stack_data support configurable.

By default when called through macros like MONO_ENTER_GC_UNSAFE
code will always dump current registers into stack space on hybrid/coop.
The registers will be scanned but only when hitting a GC and when running
in GC unsafe, that will only happen when we block in the enter or hit a safe
point at a later point in time. There are currently a couple of frequent
scenarios where we go into GC safe when thread won't be suspended and in
that case the copy of the registers will only reflect the state when
entering GC unsafe.

Commits add option to enable/disable copy_stack_data support in configure step:
--enable-copy-stack-data, --disable-copy-stack-data.

copy_stack_data is enabled by default on all platforms except desktop platforms
macos, linux and windows (both 32/64-bit), since these platforms already support
full context as well as capabilities to scan the stack of a running thread.
configure.ac
mono/utils/mono-threads-coop.c