Open
Description
Benefits:
- Performance: QCalls are generally faster than FCalls with HELPER_METHOD_FRAME
- Eliminate duplication: These are redundant mechanism. Once all of them are converted, we can eliminate the duplication.
- Complexity of stackwalking algorithm: HELPER_METHOD_FRAMEs make the stackwalking algorithm with all its dependencies more complicated than it needs to be. (See nibblemapmacros do a linear scan #93550 for more context.)
- We want to work towards unification of CoreCLR stackwalker and native AOT stackwalker. Native AOT has much simpler stackwalker and it does not have HELPER_METHOD_FRAMEs.
Work
List of JIT helpers that need the removal of explicit HMFs:
-
JIT_GetFieldAddr_Framed
,JIT_NewMDArr
Remove HMFs from JIT helpers #111034 -
JIT_New
-
JIT_NewMaybeFrozen
-
FramedAllocateString
-
JIT_StrCns
Convert JitHelperJIT_StrCns
to QCall #113674 -
JIT_NewArr1
-
JIT_NewArr1MaybeFrozen
-
JIT_Box
Convert JIT_Box* to C# #115134 -
JIT_StressGC
,JIT_GetRuntimeFieldStub
,JIT_GetRuntimeMethodStub
Remove HMFs from JIT helpers #111088 -
JIT_UserBreakpoint
JIT_GetRuntimeType_Framed
Remove HMFs from JIT helpers #111134 -
JIT_MonEnter_Helper
Remove helper method frames from Monitors #113242 -
JIT_MonTryEnter_Helper
Remove helper method frames from Monitors #113242 -
JIT_MonExit_Helper
Remove helper method frames from Monitors #113242 -
JIT_MonExit_Signal
Remove helper method frames from Monitors #113242 -
IL_Throw
,IL_Rethrow
Remove HMF from IL_Throw/IL_ThrowExact/IL_Rethrow #115253 -
JIT_ThrowMethodAccessException
,JIT_ThrowFieldAccessException
,JIT_ThrowClassAccessException
Remove HMFs from JIT helpers #111075 -
JIT_PollGC_Framed
Gc enter/leave/poll without HELPER_METHOD_FRAME #109378 -
JIT_PInvokeEndRarePath
Gc enter/leave/poll without HELPER_METHOD_FRAME #109378 -
JIT_RareDisableHelper
/JIT_RareDisableHelperWorker
Gc enter/leave/poll without HELPER_METHOD_FRAME #109378 -
JIT_Patchpoint_Framed
Replace HELPER_METHOD_FRAME with DynamicHelperFrame in patchpoints #112025 -
JIT_PartialCompilationPatchpoint
Replace HELPER_METHOD_FRAME with DynamicHelperFrame in patchpoints #112025
List of JIT helpers with implicit HMFs through a use of FCThrow
.
-
JIT_Div
,JIT_Mod
,JIT_UDiv
,JIT_UMod
,JIT_LDiv
,JIT_LMod
,JIT_ULDiv
,JIT_ULMod
- Move arithmetic helpers to managed code #109087 or Alternate approach for HELPER_METHOD_FRAME removal for arithmetic div… #113286
Remove all remaining explicit calls to GCPoll (that is, FC_GC_POLL
and FC_GC_POLL_RET
):
-
Buffer::BulkMoveWithWriteBarrier
,GCInterface::SuppressFinalize
,GCInterface::GetGenerationInternal
,GCInterface::GetSegmentSize
,GCInterface::CollectionCount
,ObjectNative::ContentEquals
- Remove all explicit GC Poll calls in unmanaged code. #113715
The following clean-up can occur after all the above is complete: