Skip to content

Investigate why crossgen works slower with TieredCompilation/PGO #83112

Open

Description

@EgorBo

I was measuring crossgen2.exe -O SPC.dll (actually, the exact command we use for build Clr.NativeCoreLib -c Release) and noticed a few problems:

Mode Time to prejit SPC.dll, seconds
TC=1 (Default) 4.81
TC=0 4.25
TC=1, CCDelayMS=0 3.78
TC=1, PGO=1 5.29
TC=1, PGO=1, CCDelayMS=0 3.93

Legend:

  • TC - DOTNET_TieredCompilation (1 by default)
  • PGO - DOTNET_TieredPGO (0 by default)
  • CCDelayMS - DOTNET_TC_CallCountThreshold (100 by default)

The difference is quite noticeable so worth investigating - numbers are quite stable across multiple runs.
Judging by the effect from DOTNET_TC_CallCountThreshold we're having some contention for call counting stub installation/promotion to tier1.

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Mar 7, 2023
  2. self-assigned this
    on Mar 7, 2023
  3. added
    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
    on Mar 7, 2023
  4. added this to the 8.0.0 milestone on Mar 7, 2023
  5. removed
    untriagedNew issue has not been triaged by the area owner
    on Mar 7, 2023
  6. EgorBo commented on Mar 7, 2023

    @EgorBo
    MemberAuthor

    Fun-fact: DOTNET_TC_CallCountingDelayMs=1 makes TC=1 (default) faster than TC=0. So apparently there is a huge contention to install call counting stubs

  7. EgorBo commented on Mar 8, 2023

    @EgorBo
    MemberAuthor
  8. modified the milestones: 8.0.0, Future on Jun 9, 2023
  9. AndyAyersMS commented on Jul 24, 2023

    @AndyAyersMS
    Member

    As mentioned offline we also ought to start measuring with the NAOT'd crossgen2.

  10. MichalStrehovsky commented on Jul 27, 2023

    @MichalStrehovsky
    Member

    #89489 disabled tiering to work around (matching the workaround used in ILC already) so if we still do TP measurements in the non-shipping configuration of crossgen2, there's going to be an improvement.

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

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions