[release/6.0-rc2] [MonoVM] Reduce P/Invoke GC transition asserts in release builds...
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Tue, 21 Sep 2021 20:43:26 +0000 (16:43 -0400)
committerGitHub <noreply@github.com>
Tue, 21 Sep 2021 20:43:26 +0000 (16:43 -0400)
commite23bcf2401a6c231a9ff960b4055cdf3f9a78648
tree3f11256c55bd4ec1dc8ff6ffaab3cc0c18df2aa4
parent8e3a1fbb503a27f485029cee00d91e465a5472f5
[release/6.0-rc2] [MonoVM] Reduce P/Invoke GC transition asserts in release builds (#59269)

Backport of #59029

Profiling shows that large part of the GC transition overhead (~30%) in #58939 is caused by assert-style checks. Disabling them seems to be the best bang-for-the-buck option for reducing the overhead without fundamental changes to the code.

Co-authored-by: Filip Navara <navara@emclient.com>
src/mono/mono/utils/mono-threads-coop.c
src/mono/mono/utils/mono-threads-state-machine.c