Created
May 18, 2022 17:58
-
-
Save AndyAyersMS/1a7187cd46f6023831d9d81927413aa2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
HERE=`pwd` | |
# ### Setup | |
# REL_ROOT=~/repos/runtime6/artifacts/tests/coreclr/Linux.x64.Release/Tests/Core_Root/ | |
# CHK_ROOT=~/repos/runtime6/artifacts/tests/coreclr/Linux.x64.Checked/Tests/Core_Root/ | |
# rm -rf Core_Root | |
# mkdir Core_Root | |
# cp -r $REL_ROOT/* Core_Root | |
# cp $CHK_ROOT/libclrjit.so Core_Root | |
export CORE_ROOT=$HERE/Core_Root | |
# ### Verify PMI works, isolate to the one method we are about | |
# pushd $CORE_ROOT | |
# ./corerun ~/repos/jitutils/bin/pmi.dll prepall-cctors $CORE_ROOT/System.Private.CoreLib.dll > $HERE/pmi.list.cctors | |
# popd | |
# grep WorkerThreadStart $HERE/pmi.list ==> 16551 (normal) 16552 (cctors) | |
# pushd $CORE_ROOT | |
# ./corerun ~/repos/jitutils/bin/pmi.dll prepone $CORE_ROOT/System.Private.CoreLib.dll 16551 > $HERE/pmi.one.list | |
# popd | |
# grep WorkerThreadStart $HERE/pmi.one.list | |
# ### Create blank PGO data file for all methods | |
# pushd $CORE_ROOT | |
# COMPlus_ReadyToRun=0 COMPlus_TieredPGO=1 COMPlus_WritePGOData=1 COMPlus_TC_QuickJitForLoops=1 COMPlus_PGODataPath=$HERE/pgo.data ./corerun ~/repos/jitutils/bin/pmi.dll prepall-quiet $CORE_ROOT/System.Private.CoreLib.dll | |
# popd | |
# grep WorkerThreadStart $HERE/pgo.data | |
### (manually edit pgo data) | |
### Run pulling in profile data | |
# rm $HERE/w.pgo.d1 | |
# pushd $CORE_ROOT | |
# COMPlus_ReadyToRun=0 COMPlus_TieredCompilation=0 COMPlus_ReadPGOData=1 COMPlus_TC_QuickJitForLoops=1 COMPlus_PGODataPath=$HERE/pgo.data COMPlus_JitDump=WorkerThreadStart COMPlus_JitStdOutFile=$HERE/w.pgo.d1 ./corerun ~/repos/jitutils/bin/pmi.dll prepone-quiet-cctors $CORE_ROOT/System.Private.CoreLib.dll 16552 | |
# popd | |
### Loop/Random | |
# mkdir rand-s | |
pushd $CORE_ROOT | |
for i in {550101..551100}; do | |
hi=$( printf "%x" $i ) | |
echo "**** $i (0x$hi)" | |
COMPlus_JitRandomEdgeCountsRange=065ccb7e COMPlus_ReadyToRun=0 COMPlus_TieredCompilation=0 COMPlus_ReadPGOData=1 COMPlus_TC_QuickJitForLoops=1 COMPlus_PGODataPath=$HERE/pgo.data COMPlus_JitDisasm=WorkerThreadStart COMPlus_JitStdOutFile=$HERE/rand-s/w.$hi.dasm COMPlus_JitRandomEdgeCounts=$hi ./corerun ~/repos/jitutils/bin/pmi.dll prepone-quiet-cctors $CORE_ROOT/System.Private.CoreLib.dll 16552 | |
grep Total $HERE/rand-s/w.$hi.dasm | |
done | |
popd | |
## Specific case | |
# pushd $CORE_ROOT | |
# hi=a3 | |
# COMPlus_ReadyToRun=0 COMPlus_TieredCompilation=0 COMPlus_ReadPGOData=1 COMPlus_TC_QuickJitForLoops=1 COMPlus_PGODataPath=$HERE/pgo.data COMPlus_JitDump=TimeZoneInfo:.ctor COMPlus_JitStdOutFile=$HERE/rand/tz.$hi.d COMPlus_JitRandomEdgeCounts=$hi ./corerun ~/repos/jitutils/bin/pmi.dll prepone-quiet-cctors $CORE_ROOT/System.Private.CoreLib.dll 16552 | |
# popd | |
### Specific case debugger | |
#### e12, 1723, 17fc, 1d5b, 1e22 2196 !!! (gc polls) | |
# pushd $CORE_ROOT | |
# hi=2196 | |
# export COMPlus_ReadyToRun=0 | |
# export COMPlus_TieredCompilation=0 | |
# export COMPlus_ReadPGOData=1 | |
# export COMPlus_TC_QuickJitForLoops=1 | |
# export COMPlus_PGODataPath=$HERE/pgo.data | |
# export COMPlus_JitRandomEdgeCounts=$hi | |
# export COMPlus_JItRandomEdgeCountsRange=065ccb7e | |
# lldb -- ./corerun ~/repos/jitutils/bin/pmi.dll prepone-quiet-cctors $CORE_ROOT/System.Private.CoreLib.dll 16552 | |
# popd | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment