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
73 commits
Select commit Hold shift + click to select a range
26ad0a8
Add support for storing method handle histograms in profiles
jakobbotsch Apr 12, 2022
6959656
Fix R2R reader for PGO schema entries without data
jakobbotsch Apr 12, 2022
3245442
Support instrumenting method handles for delegates and vtable calls
jakobbotsch Apr 13, 2022
2cbe83f
Handle static methods and also move fcall handling
jakobbotsch Apr 14, 2022
5b31bee
Fix writing out methods
jakobbotsch Apr 14, 2022
7596146
Remove an unnecessary check
jakobbotsch Apr 15, 2022
a1c3a7e
Merge remote-tracking branch 'upstream/main' into method-handle-histo…
jakobbotsch Apr 15, 2022
5114f2c
Fix build and some logic inversions
jakobbotsch Apr 15, 2022
decb84d
Bump R2R minor version and JIT-EE GUID
jakobbotsch Apr 18, 2022
baf3662
Merge remote-tracking branch 'upstream/main' into method-handle-histo…
jakobbotsch Apr 18, 2022
8703a49
Merge remote-tracking branch 'upstream/main' into method-handle-instr…
jakobbotsch Apr 25, 2022
7b1714a
Merge branch 'method-handle-histograms' into method-handle-instrument…
jakobbotsch Apr 25, 2022
7910dba
Merge remote-tracking branch 'origin/method-handle-histograms' into m…
jakobbotsch Apr 25, 2022
01353ed
Fix after merge
jakobbotsch Apr 25, 2022
a3b04a3
Change to static_assert and remove a comment
jakobbotsch Apr 28, 2022
8dc5c6a
Foo
jakobbotsch Apr 29, 2022
da05869
Few cleanups
jakobbotsch Apr 29, 2022
af7232b
Better comment
jakobbotsch Apr 29, 2022
12d1d86
Run jit-format
jakobbotsch Apr 29, 2022
5a09741
More cleanup
jakobbotsch Apr 29, 2022
cd07709
Do not null check delegate GDV calls
jakobbotsch Apr 29, 2022
8456a11
Avoid devirt for probed calls
jakobbotsch Apr 29, 2022
e401711
Cleanup and format
jakobbotsch Apr 30, 2022
7bc4374
Fix 32-bit build
jakobbotsch Apr 30, 2022
5ee82e2
Reuse target from temp in cold call
jakobbotsch May 2, 2022
7250abe
Merge branch 'main' of github.com:dotnet/runtime into method-handle-i…
jakobbotsch May 4, 2022
98671fc
Merge branch 'main' of github.com:dotnet/runtime into method-handle-i…
jakobbotsch May 17, 2022
b175511
Fix build
jakobbotsch May 18, 2022
95af330
Add MethodProfiling PGO scenarios
jakobbotsch May 18, 2022
fa01664
Support randomized GDVs for method handle histograms
jakobbotsch May 18, 2022
7a5386e
Run jit-format
jakobbotsch May 18, 2022
f1bb0da
Merge branch 'main' of github.com:dotnet/runtime into method-handle-i…
jakobbotsch May 23, 2022
edd2db7
Fix an asertion failure
jakobbotsch May 23, 2022
e4093c9
Make sure we only log in DEBUG
jakobbotsch May 23, 2022
2c1ebe3
Avoid GDV for static calls
jakobbotsch May 23, 2022
fbbac89
Fix interaction with chained GDV
jakobbotsch May 23, 2022
d622b64
Fix cast helper probes
jakobbotsch May 23, 2022
8ce47f8
Run jit-format
jakobbotsch May 23, 2022
39ac90a
Pick random GDV after logging histogram
jakobbotsch May 24, 2022
0ab00ae
Fix GDV for vtable calls on System.Delegate
jakobbotsch May 24, 2022
93efde4
Mark early expanded vtable calls as such
jakobbotsch May 24, 2022
8a7ec55
Merge branch 'main' of github.com:dotnet/runtime into method-handle-i…
jakobbotsch May 24, 2022
4b44c8d
Pull reservoir index calculation up in profile helpers
jakobbotsch May 24, 2022
c30a951
Record only delegate cases that we can actually GDV for
jakobbotsch May 25, 2022
531ac9d
Merge branch 'main' of github.com:dotnet/runtime into method-handle-i…
jakobbotsch May 27, 2022
f6e0827
Fix pesky x86 GTF_CALL_POP_ARGS bug
jakobbotsch May 27, 2022
27aff20
Exclude dynamic methods as well as methods in collectible ALCs
jakobbotsch May 27, 2022
8444cee
Remove excessive JIT-EE calls for debug logging in non-verbose
jakobbotsch May 27, 2022
cbc494b
Increase some timeouts to get a full test run
jakobbotsch Jun 2, 2022
6beca6a
Merge branch 'main' of github.com:dotnet/runtime into method-handle-i…
jakobbotsch Jun 2, 2022
0937004
Add missing helper in CorInfoHelpFunc.cs
jakobbotsch Jun 2, 2022
56019b7
Fix conflict resolution and add profiling helpers on crossgen2 side
jakobbotsch Jun 2, 2022
1bd5203
Lower likelihood threshold to 30%, like vtable calls
jakobbotsch Jun 4, 2022
924d0b1
Revert "Increase some timeouts to get a full test run"
jakobbotsch Jun 7, 2022
dfbcc86
Add signature compatibility check
jakobbotsch Jun 7, 2022
1f7a1be
Increase some timeouts to get a full test run"
jakobbotsch Jun 7, 2022
b0a5c24
Merge branch 'main' of github.com:dotnet/runtime into method-handle-i…
jakobbotsch Jun 7, 2022
0363bf2
Fix after merge
jakobbotsch Jun 7, 2022
4201bf0
Merge branch 'main' of github.com:dotnet/runtime into method-handle-i…
jakobbotsch Jun 8, 2022
ed1a073
Separate delegate and vtable profiling
jakobbotsch Jun 8, 2022
f0010e6
Set gtTargetHandle for GDV function addrs
jakobbotsch Jun 8, 2022
2b2781d
Fix build
jakobbotsch Jun 9, 2022
993c4c2
Disable method GDV for R2R
jakobbotsch Jun 9, 2022
54b5a0b
Make extra SPMI queries for GDV debugging output purposes
jakobbotsch Jun 10, 2022
901d4d1
Reorder static and signature check
jakobbotsch Jun 10, 2022
12f3654
Misc changes
jakobbotsch Jun 10, 2022
6a9fbfe
Enable delegate profiling by default
jakobbotsch Jun 10, 2022
c46ebaa
Fix newlines when printing test profile
jakobbotsch Jun 14, 2022
2fad8de
Merge branch 'main' of github.com:dotnet/runtime into method-handle-i…
jakobbotsch Jun 15, 2022
60f140e
Add GetLikelyMethod and hook it up through R2R
jakobbotsch Jun 15, 2022
1bfc4d8
Update JIT-EE GUID
jakobbotsch Jun 15, 2022
55cdf81
Address some feedback, remove some unneeded stuff
jakobbotsch Jun 16, 2022
55c9d54
Address some more feedback
jakobbotsch Jun 16, 2022
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
Handle static methods and also move fcall handling
  • Loading branch information
jakobbotsch committed Apr 14, 2022
commit 2cbe83f5c094931bbf5f7cc911cd65cdf81cd2ab
28 changes: 22 additions & 6 deletions src/coreclr/vm/jithelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5498,10 +5498,18 @@ HCIMPL4(void, JIT_MethodProfile32, Object *obj, CORINFO_METHOD_HANDLE baseMethod
// without the use of reflection.
//
DELEGATEREF del = (DELEGATEREF)objRef;
if (del->GetInvocationCount() == 0 && del->GetMethodPtrAux() == NULL)
if (del->GetInvocationCount() == 0)
{
PCODE code = del->GetMethodPtr();
pMD = NonVirtualEntry2MethodDesc(code);
PCODE code = del->GetMethodPtrAux();
if (code != NULL)
{
pMD = MethodTable::GetMethodDescForSlotAddress(code);
}
else
{
code = del->GetMethodPtr();
pMD = NonVirtualEntry2MethodDesc(code);
}
}

if (pMD == NULL)
Expand Down Expand Up @@ -5638,10 +5646,18 @@ HCIMPL4(void, JIT_MethodProfile64, Object *obj, CORINFO_METHOD_HANDLE baseMethod
// without the use of reflection.
//
DELEGATEREF del = (DELEGATEREF)objRef;
if (del->GetInvocationCount() == 0 && del->GetMethodPtrAux() == NULL)
if (del->GetInvocationCount() == 0)
{
PCODE code = del->GetMethodPtr();
pMD = NonVirtualEntry2MethodDesc(code);
PCODE code = del->GetMethodPtrAux();
if (code != NULL)
{
pMD = MethodTable::GetMethodDescForSlotAddress(code);
}
else
{
code = del->GetMethodPtr();
pMD = NonVirtualEntry2MethodDesc(code);
}
}

if (pMD == NULL)
Expand Down
12 changes: 7 additions & 5 deletions src/coreclr/vm/method.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2137,6 +2137,13 @@ MethodDesc* NonVirtualEntry2MethodDesc(PCODE entryPoint)
return (MethodDesc*)((FixupPrecode*)pInstr)->GetMethodDesc();
}

// Is it an FCALL?
MethodDesc* pFCallMD = ECall::MapTargetBackToMethod(entryPoint);
if (pFCallMD != NULL)
{
return pFCallMD;
}

return NULL;
}

Expand Down Expand Up @@ -2173,11 +2180,6 @@ MethodDesc* Entry2MethodDesc(PCODE entryPoint, MethodTable *pMT)
if (pMD != NULL)
RETURN(pMD);

// Is it an FCALL?
pMD = ECall::MapTargetBackToMethod(entryPoint);
if (pMD != NULL)
RETURN(pMD);

// We should never get here
_ASSERTE(!"Entry2MethodDesc failed");
RETURN (NULL);
Expand Down