Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gc enter/leave/poll without HELPER_METHOD_FRAME #109378

Merged
merged 39 commits into from
Jan 16, 2025
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
0fbff89
Part1 Of implement InitClass helpers
davidwrighton Sep 19, 2024
7d6a205
Merge branch 'main' of github.com:dotnet/runtime into initclass_managed
davidwrighton Sep 19, 2024
51c69d5
It builds and works
davidwrighton Sep 19, 2024
d1fccda
Revert unnecessary changes
davidwrighton Sep 19, 2024
08fe963
Ooops we did need to keep the refactoring that put the debug only Met…
davidwrighton Sep 19, 2024
12c9de2
Merge branch 'initclass_managed' into thread_static_helpers
davidwrighton Sep 19, 2024
2c0cb78
Initial work which does static helpers
davidwrighton Sep 24, 2024
0fb7f4a
Fix build break
davidwrighton Sep 24, 2024
0cb8f78
Thread statics basically implemented...
davidwrighton Sep 24, 2024
aacdb2a
Merge branch 'main' of https://github.com/dotnet/runtime into thread_…
davidwrighton Oct 17, 2024
00b6df4
Finish merging in changes from main, and fix up some oopses... and it…
davidwrighton Oct 18, 2024
34ebcaf
Restructure static access so that we don't need a helper call to acce…
davidwrighton Oct 19, 2024
f740618
Tweaks for failures noted in PR testing
davidwrighton Oct 21, 2024
e2498bb
Fix comments on Unix builds for Arm64 and RISCV
davidwrighton Oct 21, 2024
0d03a51
Tail call the right helper
davidwrighton Oct 21, 2024
367e95b
Force volatile loads for the statics ref, to fix the arm64 statics ra…
davidwrighton Oct 22, 2024
ccfafe1
Get rid of extra null check
davidwrighton Oct 22, 2024
5ff66b4
Fix error around fcall class ordering
davidwrighton Oct 22, 2024
0586455
Attempt to fix Unix assembly code, and fix fcall registration
davidwrighton Oct 24, 2024
0f6290a
Properly thread through using the "optimized" helper 2 for thread sta…
davidwrighton Oct 24, 2024
8f5448f
Remove unnecessary changes from the PR
davidwrighton Oct 25, 2024
2152544
Merge branch 'main' of https://github.com/dotnet/runtime into thread_…
davidwrighton Oct 28, 2024
2c9bc7d
Rewrite gc polling as a managed helper and remove the stress helper
davidwrighton Oct 28, 2024
1d4b19a
Remove polling logic
davidwrighton Oct 30, 2024
82fcb9f
Merge branch 'main' of https://github.com/dotnet/runtime into gc_poll…
davidwrighton Oct 30, 2024
2f7c7aa
More merging of the statics change
davidwrighton Oct 30, 2024
b56404e
Merge branch 'main' into gc_poll_without_hmf
davidwrighton Oct 30, 2024
edd2dbd
Apply suggestions from code review
davidwrighton Nov 13, 2024
c40d2f9
Add assembly paths for checking the g_TrapReturningThreads flag effic…
davidwrighton Nov 14, 2024
ec56ef6
Remove the helper method frames from P/Invoke suspension
davidwrighton Dec 6, 2024
04ab3fc
Merge branch 'main' of https://github.com/dotnet/runtime into gc_poll…
davidwrighton Dec 6, 2024
0001a6d
Merge branch 'main' of https://github.com/dotnet/runtime into gc_poll…
davidwrighton Dec 6, 2024
b926e5d
Attempt to fix assembly build errors
davidwrighton Dec 9, 2024
a6d2f71
Merge branch 'main' of https://github.com/dotnet/runtime into gc_poll…
davidwrighton Jan 8, 2025
5f22e4f
Fix arm32 assembly
davidwrighton Jan 8, 2025
79623ab
Address feedback
davidwrighton Jan 8, 2025
706784d
Fix more assembly oops
davidwrighton Jan 8, 2025
6c92aad
Apply suggestions from code review
davidwrighton Jan 9, 2025
dbc8489
Apply suggestions from code review
davidwrighton Jan 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Attempt to fix Unix assembly code, and fix fcall registration
davidwrighton committed Oct 24, 2024

Verified

This commit was signed with the committer’s verified signature.
commit 05864558cac78faa7f569275a2a8829c8ffc0666
4 changes: 2 additions & 2 deletions src/coreclr/vm/amd64/jithelpers_singleappdomain.S
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ CallHelper:
// Tail call managed GetSharedNonGCStaticBase helper
mov rdi, [rdi + OFFSETOF__DynamicStaticsInfo__m_pMethodTable]
PREPARE_EXTERNAL_VAR g_pGetNonGCStaticBase, r10
jmp r10
jmp [r10]
LEAF_END_MARKED JIT_GetDynamicNonGCStaticBase_SingleAppDomain, _TEXT

LEAF_ENTRY JIT_GetDynamicGCStaticBase_SingleAppDomain, _TEXT
@@ -37,6 +37,6 @@ CallHelper1:
// Tail call managed GetSharedGCStaticBase helper
mov rdi, [rdi + OFFSETOF__DynamicStaticsInfo__m_pMethodTable]
PREPARE_EXTERNAL_VAR g_pGetGCStaticBase, r10
jmp r10
jmp [r10]
LEAF_END JIT_GetDynamicGCStaticBase_SingleAppDomain, _TEXT

2 changes: 2 additions & 0 deletions src/coreclr/vm/arm64/asmhelpers.S
Original file line number Diff line number Diff line change
@@ -663,6 +663,7 @@ LOCAL_LABEL(JIT_GetDynamicNonGCStaticBase_SingleAppDomain_CallHelper):
// Tail call GetNonGCStaticBase
ldr x0, [x0, #OFFSETOF__DynamicStaticsInfo__m_pMethodTable]
PREPARE_EXTERNAL_VAR g_pGetNonGCStaticBase, x1
ldr x1, [x1]
br x1
LEAF_END JIT_GetDynamicNonGCStaticBase_SingleAppDomain, _TEXT

@@ -681,6 +682,7 @@ LOCAL_LABEL(JIT_GetDynamicGCStaticBase_SingleAppDomain_CallHelper):
// Tail call GetGCStaticBase
ldr x0, [x0, #OFFSETOF__DynamicStaticsInfo__m_pMethodTable]
PREPARE_EXTERNAL_VAR g_pGetGCStaticBase, x1
ldr x1, [x1]
br x1
LEAF_END JIT_GetDynamicGCStaticBase_SingleAppDomain, _TEXT

4 changes: 2 additions & 2 deletions src/coreclr/vm/ecalllist.h
Original file line number Diff line number Diff line change
@@ -393,7 +393,7 @@ FCFuncStart(gComAwareWeakReferenceFuncs)
FCFuncElement("HasInteropInfo", ComAwareWeakReferenceNative::HasInteropInfo)
FCFuncEnd()

FCFuncStart(gStaticsHelperFuncs)
FCFuncStart(gStaticsHelpersFuncs)
FCFuncElement("VolatileReadAsByref", JIT_VolatileReadAsByref)
FCFuncEnd()

@@ -435,7 +435,7 @@ FCClassElement("RuntimeMethodHandle", "System", gRuntimeMethodHandle)
FCClassElement("RuntimeTypeHandle", "System", gCOMTypeHandleFuncs)

FCClassElement("Signature", "System", gSignatureNative)
FCClassElement("StaticsHelper", "System.Runtime.CompilerServices", gStaticsHelperFuncs)
FCClassElement("StaticsHelpers", "System.Runtime.CompilerServices", gStaticsHelpersFuncs)
FCClassElement("String", "System", gStringFuncs)
FCClassElement("StubHelpers", "System.StubHelpers", gStubHelperFuncs)
FCClassElement("Thread", "System.Threading", gThreadFuncs)
2 changes: 2 additions & 0 deletions src/coreclr/vm/loongarch64/asmhelpers.S
Original file line number Diff line number Diff line change
@@ -946,6 +946,7 @@ LOCAL_LABEL(JIT_GetDynamicNonGCStaticBase_SingleAppDomain_CallHelper):
; Tail call GetNonGCStaticBase
ld.d $a0, $a0, OFFSETOF__DynamicStaticsInfo__m_pMethodTable
PREPARE_EXTERNAL_VAR g_pGetNonGCStaticBase, $t4
ld.d $t4, $t4, 0
EPILOG_BRANCH_REG $t4
LEAF_END JIT_GetDynamicNonGCStaticBase_SingleAppDomain, _TEXT

@@ -964,6 +965,7 @@ LOCAL_LABEL(JIT_GetDynamicGCStaticBase_SingleAppDomain_CallHelper):
; Tail call GetGCStaticBase
ld.d $a0, $a0, OFFSETOF__DynamicStaticsInfo__m_pMethodTable
PREPARE_EXTERNAL_VAR g_pGetGCStaticBase, $t4
ld.d $t4, $t4, 0
EPILOG_BRANCH_REG $t4
LEAF_END JIT_GetDynamicGCStaticBase_SingleAppDomain, _TEXT

2 changes: 2 additions & 0 deletions src/coreclr/vm/riscv64/asmhelpers.S
Original file line number Diff line number Diff line change
@@ -815,6 +815,7 @@ LOCAL_LABEL(JIT_GetDynamicNonGCStaticBase_SingleAppDomain_CallHelper):
// Tail call GetNonGCStaticBase
ld a0, OFFSETOF__DynamicStaticsInfo__m_pMethodTable(a0)
PREPARE_EXTERNAL_VAR g_pGetNonGCStaticBase, t4
ld t4, 0(t4)
EPILOG_BRANCH_REG t4
LEAF_END JIT_GetDynamicNonGCStaticBase_SingleAppDomain, _TEXT

@@ -833,6 +834,7 @@ LOCAL_LABEL(JIT_GetDynamicGCStaticBase_SingleAppDomain_CallHelper):
// Tail call GetGCStaticBase
ld a0, OFFSETOF__DynamicStaticsInfo__m_pMethodTable(a0)
PREPARE_EXTERNAL_VAR g_pGetGCStaticBase, t4
ld t4, 0(t4)
EPILOG_BRANCH_REG t4
LEAF_END JIT_GetDynamicGCStaticBase_SingleAppDomain, _TEXT