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

[NativeAOT] Refactored GCToEEInterface and RedhawkGCInterface implementations into separate files. #95991

Merged
merged 23 commits into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
a few cleanups
  • Loading branch information
VSadov committed Dec 16, 2023
commit 39455202313726350974e68d24e6fdb9a66d868a
2 changes: 1 addition & 1 deletion src/coreclr/nativeaot/Runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set(COMMON_RUNTIME_SOURCES
EHHelpers.cpp
event.cpp
FinalizerHelpers.cpp
GcEnum.cpp
GCHelpers.cpp
gctoclreventsink.cpp
gcheaputilities.cpp
Expand All @@ -23,7 +24,6 @@ set(COMMON_RUNTIME_SOURCES
ObjectLayout.cpp
portable.cpp
RestrictedCallouts.cpp
GcEnum.cpp
RhConfig.cpp
RuntimeInstance.cpp
StackFrameIterator.cpp
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/nativeaot/Runtime/GCHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ bool InitializeSubsystems()
// should be marked as not containing any references. The rest of the fields don't matter: the GC does not
// query them and the rest of the runtime will never hold a reference to free object.


void MethodTable::InitializeAsGcFreeType()
{
m_uFlags = ParameterizedEEType | HasComponentSizeFlag;
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/nativeaot/Runtime/GcEnum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ static void GcEnumObjectsConservatively(PTR_PTR_Object ppLowerBound, PTR_PTR_Obj
}

void EnumGcRefsInRegionConservatively(PTR_OBJECTREF pLowerBound,
PTR_OBJECTREF pUpperBound,
ScanFunc* pfnEnumCallback,
ScanContext* pvCallbackData)
PTR_OBJECTREF pUpperBound,
ScanFunc* pfnEnumCallback,
ScanContext* pvCallbackData)
{
GcEnumObjectsConservatively(pLowerBound, pUpperBound, pfnEnumCallback, pvCallbackData);
}
Expand Down
12 changes: 2 additions & 10 deletions src/coreclr/nativeaot/Runtime/gcenv.ee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,7 @@ void GCToEEInterface::GcScanRoots(ScanFunc* fn, int condemned, int max_gen, Scan
if (pThread->IsGCSpecial())
continue;

#if !defined (ISOLATED_HEAPS)
if (!GCHeapUtilities::GetGCHeap()->IsThreadUsingAllocationContextHeap(pThread->GetAllocContext(),
sc->thread_number))
{
// STRESS_LOG2(LF_GC|LF_GCROOTS, LL_INFO100, "{ Scan of Thread %p (ID = %x) declined by this heap\n",
// pThread, pThread->GetThreadId());
}
else
#endif
if (GCHeapUtilities::GetGCHeap()->IsThreadUsingAllocationContextHeap(pThread->GetAllocContext(), sc->thread_number))
{
InlinedThreadStaticRoot* pRoot = pThread->GetInlinedThreadStaticList();
while (pRoot != NULL)
Expand Down Expand Up @@ -137,7 +129,7 @@ void GCToEEInterface::GcScanRoots(ScanFunc* fn, int condemned, int max_gen, Scan
}
END_FOREACH_THREAD

sc->thread_under_crawl = NULL;
sc->thread_under_crawl = NULL;
}

void GCToEEInterface::GcEnumAllocContexts(enum_alloc_context_func* fn, void* param)
Expand Down