Change SuperPMI collection to not use altjit mechanism (#44834)
authorBruce Forstall <brucefo@microsoft.com>
Wed, 18 Nov 2020 21:18:14 +0000 (13:18 -0800)
committerGitHub <noreply@github.com>
Wed, 18 Nov 2020 21:18:14 +0000 (13:18 -0800)
commit14c0440af7de3f5395b9588c9ac1f0851aeaf279
tree07188be42fc74e1fe251f41bcf78be30e09fcbfc
parent4204aa9441600e9bd1e8571c60cd7174c74ac124
Change SuperPMI collection to not use altjit mechanism (#44834)

* Change SuperPMI collection to not use altjit mechanism

The SuperPMI collection process interposes a "shim" JIT between the JIT and EE.
As it is inconvenient to physically replace the existing JIT, currently this
is done by enabling altjit compilation and setting `COMPlus_AltJitName` to the
name of the shim JIT. This creates other inconvenience, especially with the
new way of saving the altjit flag in the JIT flags, by requiring us to
force the altjit flags bit to not be set, and force unset all the altjit flags.
It also makes it inconvenient to collect and/or replay with an actual altjit.

Change this collection mechanism to use the newly restored `COMPlus_JitName`
variable to allow specifying the JIT, and use that to specify the SuperPMI shim.

In addition, do not record in the MC file the `COMPlus_EnableExtraSuperPmiQueries`
variable. This is only used during collections to attempt to make replays more
flexible, but we never want to tell the JIT during replay that this is set.

* Enable `COMPlus_JitName` for crossgen as well

* Fix issue with empty collection args
src/coreclr/scripts/superpmi.py
src/coreclr/src/ToolBox/superpmi/readme.md
src/coreclr/src/ToolBox/superpmi/superpmi-shim-collector/jithost.cpp
src/coreclr/src/ToolBox/superpmi/superpmi/jitinstance.cpp
src/coreclr/src/vm/codeman.cpp
src/coreclr/src/zap/zapper.cpp
src/tests/JIT/superpmi/collect_runtest.cmd
src/tests/JIT/superpmi/superpmicollect.cs