Skip to content

[armel] Crossgen2 skip many methods during Version Bubble compilation #44948

Open

Description

@alpencolt

Description

As we discussed by email, crossgen2 doesn't compile many methods which should compile in Large Version Bubble mode with option compilebubblegenerics .
From @jkotas

  • Methods like GetIndexOfFirstNonAsciiByte_Default that use Vector<T> should be crossgened after Implement concept of unstable ABI into crossgen2 #40820 . If you are running with this change, it sounds like a bug or configuration problem.
  • Methods like SpanHelpers.IndexOf are marked with AggressiveOptimization that prevents them from being precompiled. I think this is just a bug. The reason for them being marked this way should no longer apply after Implement concept of unstable ABI into crossgen2 #40820.
  • Generic instantiations like System.Collections.Concurrent.ConcurrentDictionary`2[System.Int32,System.__Canon] contained within same version bubble are either a bug in crossgen2 or should be taken care of by having PGO data.
  • IL_STUB_PInvoke - these should get fixed by Source generation of ILStub for DllImport #43060.
  • IL_STUB_ReversePInvoke - this should be avoidable by changing the code to take advantage of UnmanagedCallersOnlyAttribute and function pointers.

Configuration

Commit: 855e296
OS: Tizen/armel
Application used for profiling: https://github.com/Samsung/Tizen-CSharp-Samples/tree/master/Wearable/Calculator

Data

Added JIT traces. Remove txt extension and open in PerfView
Calculator-fullni.nettrace.txt
Calculator-fullni_compilebubblegeneric.nettrace.txt
Calculator_crossgen1_fullni.nettrace.txt

cc @jkotas @gbalykov

Activity

  1. added
    tenet-performance
    on Nov 19, 2020
  2. added
    untriaged
    on Nov 19, 2020
  3. gbalykov commented on Nov 19, 2020

    @gbalykov
    Member

    System.Private.CoreLib.dll compilation command:

    ${OVERLAY}/corerun ${OVERLAY}/crossgen2/crossgen2.dll -r:${OVERLAY}/* -r:${OVERLAY}/crossgen2/* ${CROSSGEN_OPTIONS} -o:$OVERLAY/System.Private.CoreLib.ni.dll $OVERLAY/System.Private.CoreLib.dll &>$OVERLAY/System.Private.CoreLib.dll.out

    CROSSGEN_OPTIONS is -O for Calculator-fullni.nettrace.txt and -O --inputbubble --compilebubblegenerics for Calculator-fullni_compilebubblegeneric.nettrace.txt.

    Command for other dlls is similar except that additional -r:... references are added if required.

  4. gbalykov commented on Nov 19, 2020

    @gbalykov
    Member

    Also note, that next PR is required to correctly gather ETW events with env variables setup: #44068

  5. jkotas commented on Nov 19, 2020

    @jkotas
    Member
  6. removed
    untriaged
    on Nov 19, 2020
  7. added this to the 6.0.0 milestone on Nov 19, 2020
  8. mangod9 commented on Nov 19, 2020

    @mangod9
    Member

    Thanks @alpencolt
    cc @dotnet/crossgen-contrib @nattress since we have been recently comparing methods compiled by cg vs cg2

  9. alpencolt commented on Nov 19, 2020

    @alpencolt
    Author

    @mangod9 I've also added trace for first crossgen (see updated issue). Other measurements performed for crossgen2.

  10. HJLeee commented on Nov 20, 2020

    @HJLeee
    Contributor

    @alpencolt Please share the procedure and commands you used for nettrace capture.

  11. gbalykov commented on Nov 20, 2020

    @gbalykov
    Member

    Next command was used to capture jit etw events for app:

    COMPlus_EnableEventPipe=1 COMPlus_EventPipeConfig="Microsoft-Windows-DotNETRuntime:0x10000210b8:5" COMPlus_EventPipeOutputPath=`pwd`/trace.nettrace COMPlus_EventPipeRundown=0 ./corerun $APP.dll

    Before this one needs to compile all system and app dlls with command similar to SPC.dll above, and put them in the same dir. Also, Tizen app was modified to exit right when it appears on screen.

  12. davidwrighton commented on Jul 22, 2021

    @davidwrighton
    Member

    At this time, the .NET team is not prioritizing this work for the .NET 7 release. If a contributor provides fixes for these issues we may consider them, but the issue as a whole is moving to a future milestone.

  13. modified the milestones: 6.0.0, 7.0.0 on Jul 22, 2021
  14. modified the milestones: 7.0.0, 8.0.0 on Jul 27, 2022
  15. modified the milestones: 8.0.0, Future on Jul 31, 2023
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

    area-ReadyToRuntenet-performance

    Type

    No type

    Projects

    • Status
      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions