Skip to content

Using jit-diff for S.P.Corelib is broken #216

Closed

Description

@tannergooding

Repro

Enlist in coreclr twice, make a change to some S.P.Corelib method in the "diff" repo.

jit-diff diff --pmi --diff --base --base_root C:\Users\tagoo\repos\coreclr_base --verbose                                                                                                               

Expected Behavior:

The bin\diffs\dasmset_1\base\System.Private.CoreLib.dasm and bin\diffs\dasmset_1\diff\System.Private.CoreLib.dasm outputs differ.

Actual Behavior:

The two outputs are identical. Running:

cd ..\coreclr_base
jit-diff diff --pmi --diff --base --base_root C:\Users\tagoo\repos\coreclr --verbose

Produces the same behavior, but it produces a different System.Private.CoreLib.dasm output.

Activity

  1. tannergooding commented on Oct 17, 2019

    @tannergooding
    MemberAuthor

    Verbose Output

    Repo root: C:\Users\tagoo\repos\coreclr
    Using --output C:\Users\tagoo\repos\coreclr\bin\diffs
    Using --base C:\Users\tagoo\repos\coreclr_base\bin\Product\Windows_NT.x64.Checked
    Using --diff C:\Users\tagoo\repos\coreclr\bin\Product\Windows_NT.x64.Checked
    Using --arch x64
    Using --core_root C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root
    No assemblies specified; defaulting to corelib
    After setting defaults:
    --base_root C:\Users\tagoo\repos\coreclr_base
    --diff_root C:\Users\tagoo\repos\coreclr
    --core_root C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root
    --arch x64
    --output C:\Users\tagoo\repos\coreclr\bin\diffs
    --base C:\Users\tagoo\repos\coreclr_base\bin\Product\Windows_NT.x64.Checked
    --diff C:\Users\tagoo\repos\coreclr\bin\Product\Windows_NT.x64.Checked
    Beginning PMI Diffs for System.Private.CoreLib.dll
    Saving off existing jit: C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\clrjit.dll ==> C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\backup-clrjit.dll
    Copying in the test jit: C:\Users\tagoo\repos\coreclr_base\bin\Product\Windows_NT.x64.Checked\clrjit.dll ==> C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\clrjit.dll
    Started dasm command "--platform C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root --verbose --corerun C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\corerun.exe --jit C:\Users\tagoo\repos\coreclr_base\bin\Product\Windows_NT.x64.Checked\clrjit.dll --nocopy --output C:\Users\tagoo\repos\coreclr\bin\diffs\dasmset_1\base C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\System.Private.CoreLib.dll"
    Dasm command: jit-dasm-pmi --platform C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root --verbose --corerun C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\corerun.exe --jit C:\Users\tagoo\repos\coreclr_base\bin\Product\Windows_NT.x64.Checked\clrjit.dll --nocopy --output C:\Users\tagoo\repos\coreclr\bin\diffs\dasmset_1\base C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\System.Private.CoreLib.dll
    assembly name: System.Private.CoreLib.dll
    Setting: COMPlus_JitDisasm=*
    Setting: COMPlus_JitDisasmAssemblies=System.Private.CoreLib
    Setting: COMPlus_JitUnwindDump=*
    Setting: COMPlus_JitEHDump=*
    Setting: COMPlus_JitDiffableDasm=1
    Setting: COMPlus_ReadyToRun=0
    Setting: COMPlus_ZapDisable=1
    Setting: COMPlus_JitEnableNoWayAssert=1
    Setting: COMPlus_JitNoForceFallback=1
    Setting: COMPlus_JitRequired=1
    Setting: COMPlus_TieredCompilation=0
    Setting: PMIPATH=C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root
    Running: C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\corerun.exe C:\Users\tagoo\repos\jitutils\bin\pmi.dll DRIVEALL-QUIET C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\System.Private.CoreLib.dll
    - Finished 0/1 Base 0/1 Diff [0.2 sec]
    / Finished 1/1 Base 0/1 Diff [86.8 sec]
    Restoring existing jit: C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\backup-clrjit.dll ==> C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\clrjit.dll
    Saving off existing jit: C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\clrjit.dll ==> C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\backup-clrjit.dll
    Copying in the test jit: C:\Users\tagoo\repos\coreclr\bin\Product\Windows_NT.x64.Checked\clrjit.dll ==> C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\clrjit.dll
    Started dasm command "--platform C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root --verbose --corerun C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\corerun.exe --jit C:\Users\tagoo\repos\coreclr\bin\Product\Windows_NT.x64.Checked\clrjit.dll --nocopy --output C:\Users\tagoo\repos\coreclr\bin\diffs\dasmset_1\diff C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\System.Private.CoreLib.dll"
    Dasm command: jit-dasm-pmi --platform C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root --verbose --corerun C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\corerun.exe --jit C:\Users\tagoo\repos\coreclr\bin\Product\Windows_NT.x64.Checked\clrjit.dll --nocopy --output C:\Users\tagoo\repos\coreclr\bin\diffs\dasmset_1\diff C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\System.Private.CoreLib.dll
    assembly name: System.Private.CoreLib.dll
    Setting: COMPlus_JitDisasm=*
    Setting: COMPlus_JitDisasmAssemblies=System.Private.CoreLib
    Setting: COMPlus_JitUnwindDump=*
    Setting: COMPlus_JitEHDump=*
    Setting: COMPlus_JitDiffableDasm=1
    Setting: COMPlus_ReadyToRun=0
    Setting: COMPlus_ZapDisable=1
    Setting: COMPlus_JitEnableNoWayAssert=1
    Setting: COMPlus_JitNoForceFallback=1
    Setting: COMPlus_JitRequired=1
    Setting: COMPlus_TieredCompilation=0
    Setting: PMIPATH=C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root
    Running: C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\corerun.exe C:\Users\tagoo\repos\jitutils\bin\pmi.dll DRIVEALL-QUIET C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\System.Private.CoreLib.dll
    - Finished 1/1 Base 0/1 Diff [86.9 sec]
    / Finished 1/1 Base 1/1 Diff [174.1 sec]
    
    Restoring existing jit: C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\backup-clrjit.dll ==> C:\Users\tagoo\repos\coreclr\bin\tests\Windows_NT.x64.Release\Tests\Core_Root\clrjit.dll
    Completed PMI Diffs for System.Private.CoreLib.dll in 174.14s
    Diffs (if any) can be viewed by comparing: C:\Users\tagoo\repos\coreclr\bin\diffs\dasmset_1\base C:\Users\tagoo\repos\coreclr\bin\diffs\dasmset_1\diff
    Analyze command: jit-analyze --base C:\Users\tagoo\repos\coreclr\bin\diffs\dasmset_1\base --diff C:\Users\tagoo\repos\coreclr\bin\diffs\dasmset_1\diff --recursive --note PMI Diffs for System.Private.CoreLib.dll for x64 default jit
    Analyzing diffs...
    PMI Diffs for System.Private.CoreLib.dll for x64 default jit
    Summary:
    (Lower is better)
    Total bytes of diff: 0 (0.00% of base)
    0 total files with size differences (0 improved, 0 regressed), 1 unchanged.
    0 total methods with size differences (0 improved, 0 regressed), 20504 unchanged.
    Completed analysis in 1.76s
    
  2. tannergooding commented on Oct 17, 2019

    @tannergooding
    MemberAuthor

    Nevermind, I just realized this is just testing jit differences and is by design.

    I need to explicitly disassemble each corelib to view those differences

  3. AndyAyersMS commented on Oct 17, 2019

    @AndyAyersMS
    Member

    Right, normally jit-diffs will copy the base jit into the diff repo test environment. So only the diff copy of SPC is ever jitted.

    To see impact of corelib changes you need to run jit-diffs separately in each repo (running as "diff" each time)... then you can use jit-analyze to compare.

    We could add a mode where base/diff is done in the respective repos. This would help with SPC change analysis as well as cases where the jit interface changes and the jits can't be interchanged.

  4. tannergooding commented on Oct 17, 2019

    @tannergooding
    MemberAuthor

    I've created a new issue suggesting that here: #217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions