Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress OSR for crossgen2 execution #62968

Merged
merged 2 commits into from
Dec 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/tests/Common/CLRTest.CrossGen.targets
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ if [ ! -z ${RunCrossGen2+x} ]%3B then
cat $__ResponseFile

# Suppress some COMPlus variables for the duration of Crossgen2 execution
export -n COMPlus_GCName COMPlus_GCStress COMPlus_HeapVerify COMPlus_ReadyToRun
export -n COMPlus_GCName COMPlus_GCStress COMPlus_HeapVerify COMPlus_ReadyToRun COMPlus_TC_OnStackReplacement COMPlus_TC_PartialCompilation

echo "Running CrossGen2: $__Command"
$__Command
__cg2ExitCode=$?

export COMPlus_GCName COMPlus_GCStress COMPlus_HeapVerify COMPlus_ReadyToRun
export COMPlus_GCName COMPlus_GCStress COMPlus_HeapVerify COMPlus_ReadyToRun COMPlus_TC_OnStackReplacement COMPlus_TC_PartialCompilation
}

if [ ! -z ${CompositeBuildMode+x} ]%3B then
Expand Down Expand Up @@ -245,6 +245,9 @@ if defined RunCrossGen2 (
set "COMPlus_GCStress="
set "COMPlus_HeapVerify="
set "COMPlus_ReadyToRun="
REM work around problems in 6.0 OSR
set "COMPlus_TC_OnStackReplacement="
set "COMPlus_TC_PartialCompilation="

echo "!__Command!"
call !__Command!
Expand Down
12 changes: 8 additions & 4 deletions src/tests/readytorun/multifolder/multifolder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ $(CLRTestBatchPreCommands)
set __Command=%__Command% "%CORE_ROOT%\crossgen2\crossgen2.dll"
set __Command=%__Command% @"%__ResponseFile%"

REM work around problems in 6.0 OSR
set "COMPlus_TC_OnStackReplacement="
set "COMPlus_TC_PartialCompilation="

echo Response file: %__ResponseFile%
type %__ResponseFile%
echo ------------------
Expand Down Expand Up @@ -85,9 +89,8 @@ $(BashCLRTestPreCommands)
echo $__OutputDir/../FolderA/FolderA/FolderA.dll>>$__ResponseFile
echo $__OutputDir/../FolderB/FolderB/FolderB.dll>>$__ResponseFile

# Suppress GC standalone mode for the duration of Crossgen2 execution
local gcstandaloneModeToRestore=$COMPlus_GCName;
unset COMPlus_GCName
# Suppress some COMPlus variables for the duration of Crossgen2 execution
export -n COMPlus_GCName COMPlus_GCStress COMPlus_HeapVerify COMPlus_ReadyToRun COMPlus_TC_OnStackReplacement COMPlus_TC_PartialCompilation

__Command=$_DebuggerFullPath
# Tests run locally need __TestDotNetCmd (set by runtest.py) or a compatible 5.0 dotnet runtime in the path
Expand All @@ -105,9 +108,10 @@ $(BashCLRTestPreCommands)
echo Running crossgen2: $__Command
$__Command

export COMPlus_GCName COMPlus_GCStress COMPlus_HeapVerify COMPlus_ReadyToRun COMPlus_TC_OnStackReplacement COMPlus_TC_PartialCompilation

ExePath=multifolder/multifolder.dll
export COMPlus_NativeImageSearchPaths=$__OutputDir
export COMPlus_GCName=$gcstandaloneModeToRestore

]]></BashCLRTestPreCommands>
</PropertyGroup>
Expand Down