Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
ab85b04
WorkingOnIt
davidwrighton Apr 25, 2024
889f8a8
It basically works for a single example.
davidwrighton Apr 25, 2024
693d837
If there isn't a parent methodtable and the slot matches... then it b…
davidwrighton Apr 25, 2024
da774fb
Fix a couple more issues found when running a subset of the coreclr t…
davidwrighton Apr 25, 2024
bb59e29
Get X86 building again
davidwrighton Apr 25, 2024
bfde6de
Attempt to use a consistent api to force slots to be set
davidwrighton May 1, 2024
54b8ab6
Put cache around RequiresStableEntryPoint
davidwrighton May 1, 2024
7a4bd28
Merge branch 'main' of github.com:dotnet/runtime into change_temporar…
davidwrighton May 1, 2024
66f2b39
Fix typo
davidwrighton May 3, 2024
951a655
Fix interop identified issue where we sometime set a non Precode into…
davidwrighton May 6, 2024
45a0b3b
Move ARM and X86 to disable compact entry points
davidwrighton May 6, 2024
4e7f41d
Attempt to fix build breaks
davidwrighton May 7, 2024
f6e2fed
fix typo
davidwrighton May 8, 2024
f9de777
Fix another Musl validation issue
davidwrighton May 9, 2024
730fd7c
More tweaks around NULL handling
davidwrighton May 10, 2024
fb335e7
Hopefully the last NULL issue
davidwrighton May 10, 2024
d31ebbb
Fix more NULL issues
davidwrighton May 13, 2024
4948d77
Merge branch 'main' of github.com:dotnet/runtime into change_temporar…
davidwrighton May 13, 2024
3d29d31
Merge branch 'main' of https://github.com/dotnet/runtime into change_…
davidwrighton May 14, 2024
a4acdb1
Merge branch 'main' of github.com:dotnet/runtime into change_temporar…
davidwrighton May 28, 2024
466cabc
Fixup obvious issues
davidwrighton Jun 4, 2024
084bcd7
Merge branch 'main' of github.com:dotnet/runtime into change_temporar…
davidwrighton Jun 4, 2024
44ccb9d
Fix allocation behavior so we don't free the data too early or too late
davidwrighton Jun 5, 2024
3762500
Fix musl validation issue
davidwrighton Jun 5, 2024
a7b68c3
Fix tiered compilation
davidwrighton Jun 25, 2024
6a772d9
Remove Compact Entrypoint logic
davidwrighton Jun 25, 2024
b2360ad
Add new ISOSDacInterface15 api
davidwrighton Jun 26, 2024
837dc0b
Fix some naming of NoAlloc to a more clear IfExists suffix
davidwrighton Jun 26, 2024
cb70e1d
Remove way in which GetTemporaryEntryPoint behaves differently for DA…
davidwrighton Jun 27, 2024
7f0f614
Attempt to reduce most of the use of EnsureSlotFilled. Untested, but …
davidwrighton Jun 27, 2024
f6a8260
Fix the build before sending to github
davidwrighton Jun 27, 2024
cedb18e
Merge branch 'main' of https://github.com/dotnet/runtime into change_…
davidwrighton Jun 27, 2024
97e8f7e
Fix unix build break, and invalid assert
davidwrighton Jun 27, 2024
abae474
Improve assertion checks to validate that we don't allocate temporary…
davidwrighton Jun 27, 2024
8273274
Remove unused parameters and add contracts
davidwrighton Jun 27, 2024
6999c2b
Update method-descriptor.md
davidwrighton Jun 27, 2024
24fa6c2
Fix musl validation issue
davidwrighton Jun 27, 2024
d696419
Adjust SOS api to be an enumerator
davidwrighton Jun 28, 2024
2715494
Fix assertion issues noted
davidwrighton Jun 28, 2024
47f8043
Remove GetRestoredSlotIfExists
davidwrighton Jun 28, 2024
93184bc
Update src/coreclr/debug/daccess/daccess.cpp
davidwrighton Jun 28, 2024
70836cb
Update docs/design/coreclr/botr/method-descriptor.md
davidwrighton Jun 28, 2024
5bf0fb3
Update src/coreclr/vm/methodtable.inl
davidwrighton Jun 28, 2024
7010052
Update src/coreclr/vm/methodtable.h
davidwrighton Jun 28, 2024
d55c93f
Merge branch 'main' of github.com:dotnet/runtime into change_temporar…
davidwrighton Jun 28, 2024
fb2f987
Fix GetMethodDescForSlot_NoThrow
davidwrighton Jun 28, 2024
c5af140
Fix missing change intended in last commit
davidwrighton Jul 1, 2024
0281127
Fix some more IsPublished memory use issues
davidwrighton Jul 2, 2024
56137a2
Call the right GetSlot method
davidwrighton Jul 2, 2024
98aa3c9
Move another scenario to NoThrow, I think this should clear up our te…
davidwrighton Jul 2, 2024
7cf8acd
Add additional IsPublished check
davidwrighton Jul 2, 2024
efe8f1a
Fix MUSL validation build error and Windows x86 build error
davidwrighton Jul 3, 2024
d7d3948
Address code review feedback
davidwrighton Jul 3, 2024
29571eb
Fix classcompat build
davidwrighton Jul 3, 2024
3ce4e4a
Update src/coreclr/vm/method.cpp
davidwrighton Jul 5, 2024
a4c8803
Remove assert that is invalid because TryGetMulticCallableAddrOfCode …
davidwrighton Jul 9, 2024
99ddbcb
Merge branch 'main' of github.com:dotnet/runtime into change_temporar…
davidwrighton Jul 9, 2024
34e9a75
Final (hopefully) code review tweaks.
davidwrighton Jul 12, 2024
2ed2b9c
Its possible for GetOrCreatePrecode to be called for cases where it i…
davidwrighton Jul 14, 2024
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
Fixup obvious issues
  • Loading branch information
davidwrighton committed Jun 4, 2024
commit 466cabc1fbab3280ddac2d7691be03b648eefa98
18 changes: 12 additions & 6 deletions src/coreclr/vm/method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ LoaderAllocator * MethodDesc::GetDomainSpecificLoaderAllocator()

}

HRESULT MethodDesc::EnsureCodeDataExists()
HRESULT MethodDesc::EnsureCodeDataExists(AllocMemTracker *pamTracker)
{
CONTRACTL
{
Expand All @@ -224,7 +224,10 @@ HRESULT MethodDesc::EnsureCodeDataExists()
LoaderHeap* heap = GetLoaderAllocator()->GetHighFrequencyHeap();

AllocMemTracker amTracker;
MethodDescCodeData* alloc = (MethodDescCodeData*)amTracker.Track_NoThrow(heap->AllocMem_NoThrow(S_SIZE_T(sizeof(MethodDescCodeData))));
if (pamTracker == NULL)
pamTracker = &amTracker;

MethodDescCodeData* alloc = (MethodDescCodeData*)pamTracker->Track_NoThrow(heap->AllocMem_NoThrow(S_SIZE_T(sizeof(MethodDescCodeData))));
if (alloc == NULL)
return E_OUTOFMEMORY;

Expand All @@ -240,7 +243,7 @@ HRESULT MethodDesc::SetMethodDescVersionState(PTR_MethodDescVersioningState stat
WRAPPER_NO_CONTRACT;

HRESULT hr;
IfFailRet(EnsureCodeDataExists());
IfFailRet(EnsureCodeDataExists(NULL));

_ASSERTE(m_codeData != NULL);
if (InterlockedCompareExchangeT(&m_codeData->VersioningState, state, NULL) != NULL)
Expand All @@ -254,9 +257,10 @@ HRESULT MethodDesc::SetMethodDescVersionState(PTR_MethodDescVersioningState stat
PTR_MethodDescVersioningState MethodDesc::GetMethodDescVersionState()
{
WRAPPER_NO_CONTRACT;
if (m_codeData == NULL)
PTR_MethodDescCodeData codeData = VolatileLoadWithoutBarrier(&m_codeData);
if (codeData == NULL)
return NULL;
return m_codeData->VersioningState;
return VolatileLoadWithoutBarrier(&codeData->VersioningState);
}

//*******************************************************************************
Expand Down Expand Up @@ -3087,7 +3091,9 @@ void MethodDesc::EnsureTemporaryEntryPointCore(LoaderAllocator *pLoaderAllocator
AllocMemTracker amt;
Precode* pPrecode = Precode::Allocate(GetPrecodeType(), this, GetLoaderAllocator(), &amt);

if (InterlockedCompareExchangeT(&m_pTemporaryEntryPoint, pPrecode->GetEntryPoint(), (PCODE)NULL) == (PCODE)NULL)
IfFailThrow(EnsureCodeDataExists(pamTracker));

if (InterlockedCompareExchangeT(&m_codeData->m_pTemporaryEntryPoint, pPrecode->GetEntryPoint(), (PCODE)NULL) == (PCODE)NULL)
amt.SuppressRelease();

PCODE tempEntryPoint = GetTemporaryEntryPoint_NoAlloc();
Expand Down
9 changes: 6 additions & 3 deletions src/coreclr/vm/method.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,12 @@ class MethodDesc
#ifdef HAS_COMPACT_ENTRYPOINTS
return GetTemporaryEntryPoint();
#else
return VolatileLoadWithoutBarrier(&m_pTemporaryEntryPoint);
PTR_MethodDescCodeData codeData = VolatileLoadWithoutBarrier(&m_codeData);
if (codeData == NULL)
return NULL;
return VolatileLoadWithoutBarrier(&codeData->m_pTemporaryEntryPoint);
#endif
}
}

void SetTemporaryEntryPoint(LoaderAllocator *pLoaderAllocator, AllocMemTracker *pamTracker);

Expand Down Expand Up @@ -1717,7 +1720,7 @@ class MethodDesc
#endif

#ifndef DACCESS_COMPILE
HRESULT EnsureCodeDataExists();
HRESULT EnsureCodeDataExists(AllocMemTracker *pamTracker);

HRESULT SetMethodDescVersionState(PTR_MethodDescVersioningState state);
#endif //!DACCESS_COMPILE
Expand Down