You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ThisptrRetbufPrecode to set of precodes handled by StubPrecode path (#112548)
This adds the ThisPtrRetBufPrecode to the set of codes handled by the StubPrecode stub pasting path.
Perf changes from about 2.35 ns per iteration of a minimal loop with a ThisPtrRetBufPrecode to about 3.03 ns per iteration on my computer (Windows X64). I expect the cost to be a little less on an Arm64 machine since the old ThisPtrRetBufPrecode was a bit more expensive there. However, this removes the previous scheme where we allocate and jit custom stubs for this, so I think the simplification is worth the runtime cost.
The overall change has a size increase though, as this work adds support for this type of precode to the cDAC, as well as some tests.
| PrecodeMachineDescriptor | FixupPrecodeType| precode sort byte for fixup precode stubs, if supported |
27
-
| StubPrecodeData | MethodDesc | pointer to the MethodDesc associated with this stub precode |
27
+
| PrecodeMachineDescriptor | ThisPointerRetBufPrecodeType | precode sort byte for this pointer ret buf precodes |
28
+
| StubPrecodeData | MethodDesc | pointer to the MethodDesc associated with this stub precode (Version 1 only) |
29
+
| StubPrecodeData | SecretParam | pointer to the MethodDesc associated with this stub precode or a second stub data pointer for other types (Version 2 only) |
28
30
| StubPrecodeData | Type | precise sort of stub precode |
29
31
| FixupPrecodeData | MethodDesc | pointer to the MethodDesc associated with this fixup precode |
32
+
| ThisPtrRetBufPrecodeData | MethodDesc | pointer to the MethodDesc associated with the ThisPtrRetBufPrecode (Version 2 only) |
30
33
31
34
arm32 note: the `CodePointerToInstrPointerMask` is used to convert IP values that may include an arm Thumb bit (for example extracted from disassembling a call instruction or from a snapshot of the registers) into an address. On other architectures applying the mask is a no-op.
32
35
@@ -145,7 +148,10 @@ After the initial precode type is determined, for stub precodes a refined precod
returntarget.ReadPointer(target.ReadPointer (stubPrecodeDataAddress+/* offset of StubPrecodeData.SecretParam */ ) +/*offset of ThisPtrRetBufPrecodeData.MethodDesc*/);
0 commit comments