-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* IBC tuning scripts allow generating .tibc files to get precise generics and partial IBC ready-to-run images * Add linker root for IL stub generation code getting linked away * Pin link-a-thon to netcoreapp3.0 for asp.net core * Controllable with /p:UseCrossgen2=true when publishing ApiTemplate * Prepare crossgen2 for run by running ./run_tuning.sh, which will build ApiTemplate with tuning enabled, run it to get a trace, then re-build it with the training data. The single exe binary is placed at /publish * Use ./send-to-perflab.sh crossgen2 to submit a crossgen2 run
- Loading branch information
Showing
8 changed files
with
147 additions
and
6 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
scriptroot="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
referencescommandline= | ||
|
||
for dll in $scriptroot/src/ApiTemplate/obj/Release/netcoreapp3.0/linux-x64/multifile-publish/*.dll | ||
do | ||
referencescommandline="$referencescommandline -r:$dll" | ||
done | ||
|
||
rm -r -f $scriptroot/tibcdata | ||
mkdir -p $scriptroot/tibcdata | ||
|
||
for dll in $scriptroot/src/ApiTemplate/obj/Release/netcoreapp3.0/linux-x64/multifile-publish/*.dll | ||
do | ||
assemfullname=$(basename $dll) | ||
assemname="${assemfullname%.*}" | ||
ibcfile=$scriptroot/rawibcdata/$assemname.ibc | ||
tibcfile=$scriptroot/tibcdata/$assemname.tibc | ||
if [ -f $ibcfile ] | ||
then | ||
tibc_command="$scriptroot/src/coreclrbin/tibcmgr/tibcmgr convert $referencescommandline $ibcfile $dll $tibcfile" | ||
echo $tibc_command | ||
$tibc_command | ||
fi | ||
done | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
scriptroot="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
|
||
rm -r -f $scriptroot/src/ApiTemplate/tibcdata | ||
mkdir -p $scriptroot/src/ApiTemplate/tibcdata | ||
cp $scriptroot/tibcdata/* $scriptroot/src/ApiTemplate/tibcdata | ||
|
||
dotnet publish -c Release src/ApiTemplate/ApiTemplate.csproj -o publish -p:SelfContained=true -p:UseStaticHost=true -p:UsePublishFilterList=true -p:PublishTrimmed=true -p:PublishReadyToRun=true -p:UseTibcData=true -p:UseCrossgen2=true $1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env bash | ||
|
||
scriptroot="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
dotnet publish -c Release src/ApiTemplate/ApiTemplate.csproj -o publish -p:UseStaticHost=true -p:UsePublishFilterList=true -p:LinkAggressively=true -p:PublishTrimmed=true -p:SelfContained=true -p:ProduceTuningImage=true -p:UseCrossgen2=true -r linux-x64 -p:PublishReadyToRun=true | ||
|
||
rm -r -f $scriptroot/rawibcdata | ||
mkdir -p $scriptroot/rawibcdata | ||
|
||
export COMPlus_ZapBBInstr=* | ||
export COMPlus_ZapBBInstrDir=$scriptroot/rawibcdata | ||
export COMPlus_ZapBBInstrR2RGenerics=2 | ||
|
||
$scriptroot/publish/ApiTemplate & PROC_ID=$! | ||
echo $PROC_ID | ||
|
||
sleep 1 | ||
curl http://localhost:5000/WeatherForecast > /dev/null | ||
while [ $? -ne 0 ] | ||
do | ||
sleep 1 | ||
curl http://localhost:5000/WeatherForecast > /dev/null | ||
done | ||
|
||
echo Service Live! | ||
|
||
counter=1 | ||
while [ $counter -le 10 ] | ||
do | ||
echo $counter | ||
curl http://localhost:5000/WeatherForecast > /dev/null | ||
counter=$(($counter+1)) | ||
sleep 1 | ||
done | ||
|
||
echo Telling the service to quit | ||
kill -s SIGTERM $PROC_ID | ||
|
||
sleep 1 | ||
while kill -0 "$PROC_ID" >/dev/null 2>&1; do | ||
echo "PROCESS IS STILL RUNNING" | ||
sleep 1 | ||
done | ||
|
||
echo "PROCESS TERMINATED" | ||
|
||
$scriptroot/produce_tibc.sh | ||
$scriptroot/produce_tunedimage.sh | ||
|
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
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
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