Last active
January 16, 2023 18:29
-
-
Save EgorBo/a72bfa70f08a4d890241037c0fc1fb93 to your computer and use it in GitHub Desktop.
Revisions
-
EgorBo revised this gist
Mar 28, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ All commands are in powershell, should be pretty much the same for bash and non- 1) build everything we're going to need: ``` .\build.cmd Clr+Libs -c Release ;; .\build.cmd Clr -c Checked ;; cd .\src\tests\ ;; .\build.cmd Release generatelayoutonly ;; cd ..\.. ``` 2) Make a copy of the test core_root (will be a baseline): ``` -
EgorBo revised this gist
Mar 28, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ ### How to run jit-diffs for changes in the managed code All commands are in powershell, should be pretty much the same for bash and non-windows platforms 1) build everything we're going to need: ``` -
EgorBo revised this gist
Mar 28, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -31,4 +31,5 @@ jit-analyze -b C:\prj\jit-diffs\dasmset_1\base -d C:\prj\jit-diffs\dasmset_2\bas ``` NOTE: I'd recommend to clear `C:\prj\jit-diffs` content before every run (this script is hardcoded to dasmset_1 and dasmset_2) NOTE2: replace `--corelib` with `-f` if you want to run diffs for the whole BCL -
EgorBo revised this gist
Mar 28, 2022 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ ### How to run jit-diffs for changes in the managed code All commands are in powershell 1) build everything we're going to need: ``` .\build.cmd Clr+Libs -c Release ;; .\build.cmd Clr -c Checked -msbuild ;; cd .\src\tests\ ;; .\build.cmd Release generatelayoutonly ;; cd ..\.. ``` @@ -30,4 +30,5 @@ jit-diff diff --output C:\prj\jit-diffs --corelib --core_root C:\prj\runtime\art jit-analyze -b C:\prj\jit-diffs\dasmset_1\base -d C:\prj\jit-diffs\dasmset_2\base -r -c 100 ``` NOTE: I'd recommend to clear `C:\prj\jit-diffs` content before every run (this script is hardcoded to dasmset_1 and dasmset_2) NOTE2: replace `--corelib` with `-f` if you want to run diffs for the whole BCL -
EgorBo revised this gist
Mar 28, 2022 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -20,7 +20,6 @@ Copy-Item .\artifacts\bin\coreclr\windows.x64.Release\IL\System.Private.CoreLib. ``` Now we can run some jit-diffs: ``` New-Item -ItemType Directory -Force -Path C:\prj\jit-diffs -
EgorBo revised this gist
Mar 28, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,7 @@ All commands are for powershell ``` .\build.cmd Clr+Libs -c Release ;; .\build.cmd Clr -c Checked -msbuild ;; cd .\src\tests\ ;; .\build.cmd Release generatelayoutonly ;; cd ..\.. ``` 2) Make a copy of the test core_root (will be a baseline): ``` Copy-Item .\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root -Destination .\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root_base -Recurse ``` -
EgorBo revised this gist
Mar 28, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ All commands are for powershell ``` Copy-Item .\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root -Destination .\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root_base -Recurse ``` 3) Apply your changes to the corelib or any managed library and rebuild them, e.g. change `String.IsNullOrEmpty` impl and do: ``` .\build.cmd Clr.CoreLib -c Release ``` -
EgorBo revised this gist
Mar 28, 2022 . 1 changed file with 8 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,7 @@ ### How to run jit-diffs for changes in managed code All commands are for powershell 1) Step 1: build everything ``` .\build.cmd Clr+Libs -c Release ;; .\build.cmd Clr -c Checked -msbuild ;; cd .\src\tests\ ;; .\build.cmd Release generatelayoutonly ;; cd ..\.. @@ -6,9 +10,12 @@ ``` Copy-Item .\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root -Destination .\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root_base -Recurse ``` 3) Apply your changes to the corelib or any managed library and rebuild them, e.g. in case of corelib: ``` .\build.cmd Clr.CoreLib -c Release ``` 4) Copy your lib to the "diff" core_root: ``` Copy-Item .\artifacts\bin\coreclr\windows.x64.Release\IL\System.Private.CoreLib.dll -Destination artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root ``` -
EgorBo renamed this gist
Mar 28, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
EgorBo created this gist
Mar 28, 2022 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ 1) Step 1: build everything ``` .\build.cmd Clr+Libs -c Release ;; .\build.cmd Clr -c Checked -msbuild ;; cd .\src\tests\ ;; .\build.cmd Release generatelayoutonly ;; cd ..\.. ``` 2) Make a copy of core_root: ``` Copy-Item .\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root -Destination .\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root_base -Recurse ``` 3) Apply your change to corelib or any managed library and rebuild it, e.g. in case of corelib: ``` .\build.cmd Clr.CoreLib -c Release Copy-Item .\artifacts\bin\coreclr\windows.x64.Release\IL\System.Private.CoreLib.dll -Destination artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root ``` Now we can run some jit-diffs: Run for the baseline: ``` New-Item -ItemType Directory -Force -Path C:\prj\jit-diffs jit-diff diff --output C:\prj\jit-diffs --corelib --core_root C:\prj\runtime\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root_base --base C:\prj\runtime\artifacts\bin\coreclr\windows.x64.Checked --crossgen C:\prj\runtime\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root_base\crossgen2\crossgen2.exe jit-diff diff --output C:\prj\jit-diffs --corelib --core_root C:\prj\runtime\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root --base C:\prj\runtime\artifacts\bin\coreclr\windows.x64.Checked --crossgen C:\prj\runtime\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\crossgen2\crossgen2.exe jit-analyze -b C:\prj\jit-diffs\dasmset_1\base -d C:\prj\jit-diffs\dasmset_2\base -r -c 100 ``` note: I'd recommend to clear `C:\prj\jit-diffs` content before every run (this script is hardcoded to dasmset_1 and dasmset_2)