@@ -387,7 +387,14 @@ TR_ResolvedJ9JITServerMethod::getResolvedPossiblyPrivateVirtualMethod(TR::Compil
387
387
if (createResolvedMethod)
388
388
{
389
389
resolvedMethod = createResolvedMethodFromJ9Method (comp, cpIndex, vTableIndex, ramMethod, unresolvedInCP, aotStats, methodInfo);
390
- compInfoPT->cacheResolvedMethod (compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::VirtualFromCP, (TR_OpaqueClassBlock *) _ramClass, cpIndex), (TR_OpaqueMethodBlock *) ramMethod, (uint32_t ) vTableIndex, methodInfo);
390
+ compInfoPT->cacheResolvedMethod (
391
+ compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::VirtualFromCP,
392
+ (TR_OpaqueClassBlock *) _ramClass, cpIndex),
393
+ (TR_OpaqueMethodBlock *) ramMethod,
394
+ (uint32_t ) vTableIndex,
395
+ methodInfo,
396
+ *unresolvedInCP
397
+ );
391
398
}
392
399
}
393
400
}
@@ -694,7 +701,14 @@ TR_ResolvedJ9JITServerMethod::getResolvedStaticMethod(TR::Compilation * comp, I_
694
701
}
695
702
else
696
703
{
697
- compInfoPT->cacheResolvedMethod (compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::Static, (TR_OpaqueClassBlock *) _ramClass, cpIndex), (TR_OpaqueMethodBlock *) ramMethod, 0 , methodInfo);
704
+ compInfoPT->cacheResolvedMethod (
705
+ compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::Static,
706
+ (TR_OpaqueClassBlock *) _ramClass, cpIndex),
707
+ (TR_OpaqueMethodBlock *) ramMethod,
708
+ 0 ,
709
+ methodInfo,
710
+ *unresolvedInCP
711
+ );
698
712
}
699
713
700
714
return resolvedMethod;
@@ -751,7 +765,13 @@ TR_ResolvedJ9JITServerMethod::getResolvedSpecialMethod(TR::Compilation * comp, I
751
765
}
752
766
else
753
767
{
754
- compInfoPT->cacheResolvedMethod (compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::Special, clazz, cpIndex), (TR_OpaqueMethodBlock *) ramMethod, 0 , methodInfo);
768
+ compInfoPT->cacheResolvedMethod (
769
+ compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::Special, clazz, cpIndex),
770
+ (TR_OpaqueMethodBlock *) ramMethod,
771
+ 0 ,
772
+ methodInfo,
773
+ *unresolvedInCP
774
+ );
755
775
}
756
776
757
777
return resolvedMethod;
@@ -882,7 +902,14 @@ TR_ResolvedJ9JITServerMethod::getResolvedInterfaceMethod(TR::Compilation * comp,
882
902
// to uniquely identify it.
883
903
if (resolvedMethod)
884
904
{
885
- compInfoPT->cacheResolvedMethod (compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::Interface, clazz, cpIndex, classObject), (TR_OpaqueMethodBlock *) ramMethod, 0 , methodInfo);
905
+ compInfoPT->cacheResolvedMethod (
906
+ compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::Interface,
907
+ clazz, cpIndex, classObject),
908
+ (TR_OpaqueMethodBlock *) ramMethod,
909
+ 0 ,
910
+ methodInfo,
911
+ true
912
+ );
886
913
return resolvedMethod;
887
914
}
888
915
@@ -932,8 +959,14 @@ TR_ResolvedJ9JITServerMethod::getResolvedImproperInterfaceMethod(TR::Compilation
932
959
j9method = NULL ;
933
960
}
934
961
935
- compInfoPT->cacheResolvedMethod (compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::ImproperInterface, (TR_OpaqueClassBlock *) _ramClass, cpIndex),
936
- (TR_OpaqueMethodBlock *) j9method, vtableOffset, methodInfo);
962
+ compInfoPT->cacheResolvedMethod (
963
+ compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::ImproperInterface,
964
+ (TR_OpaqueClassBlock *) _ramClass, cpIndex),
965
+ (TR_OpaqueMethodBlock *) j9method,
966
+ vtableOffset,
967
+ methodInfo,
968
+ true
969
+ );
937
970
if (j9method == NULL )
938
971
return NULL ;
939
972
else
@@ -997,7 +1030,14 @@ TR_ResolvedJ9JITServerMethod::getResolvedVirtualMethod(TR::Compilation * comp, T
997
1030
resolvedMethod = ramMethod ? new (comp->trHeapMemory ()) TR_ResolvedJ9JITServerMethod ((TR_OpaqueMethodBlock *) ramMethod, _fe, comp->trMemory (), methodInfo, this ) : 0 ;
998
1031
}
999
1032
if (resolvedMethod)
1000
- compInfoPT->cacheResolvedMethod (compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::VirtualFromOffset, clazz, virtualCallOffset, classObject), ramMethod, 0 , methodInfo);
1033
+ compInfoPT->cacheResolvedMethod (
1034
+ compInfoPT->getResolvedMethodKey (TR_ResolvedMethodType::VirtualFromOffset,
1035
+ clazz, virtualCallOffset, classObject),
1036
+ (TR_OpaqueMethodBlock *) ramMethod,
1037
+ 0 ,
1038
+ methodInfo,
1039
+ true
1040
+ );
1001
1041
return resolvedMethod;
1002
1042
}
1003
1043
@@ -1664,12 +1704,13 @@ TR_ResolvedJ9JITServerMethod::cacheResolvedMethodsCallees(int32_t ttlForUnresolv
1664
1704
1665
1705
// 2. Send a remote query to mirror all uncached resolved methods
1666
1706
_stream->write (JITServer::MessageType::ResolvedMethod_getMultipleResolvedMethods, (TR_ResolvedJ9Method *) _remoteMirror, methodTypes, cpIndices);
1667
- auto recv = _stream->read <std::vector<TR_OpaqueMethodBlock *>, std::vector<uint32_t >, std::vector<TR_ResolvedJ9JITServerMethodInfo>>();
1707
+ auto recv = _stream->read <std::vector<TR_OpaqueMethodBlock *>, std::vector<uint32_t >, std::vector<TR_ResolvedJ9JITServerMethodInfo>, std::vector< char > >();
1668
1708
1669
1709
// 3. Cache all received resolved methods
1670
1710
auto &ramMethods = std::get<0 >(recv);
1671
1711
auto &vTableOffsets = std::get<1 >(recv);
1672
1712
auto &methodInfos = std::get<2 >(recv);
1713
+ auto &unresolvedInCPs = std::get<3 >(recv);
1673
1714
TR_ASSERT (numMethods == ramMethods.size (), " Number of received methods does not match the number of requested methods" );
1674
1715
for (int32_t i = 0 ; i < numMethods; ++i)
1675
1716
{
@@ -1686,6 +1727,7 @@ TR_ResolvedJ9JITServerMethod::cacheResolvedMethodsCallees(int32_t ttlForUnresolv
1686
1727
ramMethods[i],
1687
1728
vTableOffsets[i],
1688
1729
methodInfos[i],
1730
+ (bool ) unresolvedInCPs[i],
1689
1731
ttlForUnresolved
1690
1732
);
1691
1733
}
@@ -1806,7 +1848,9 @@ TR_ResolvedJ9JITServerMethod::collectImplementorsCapped(
1806
1848
(TR_OpaqueMethodBlock *) ramMethods[i],
1807
1849
cpIndexOrOffset,
1808
1850
methodInfos[i],
1809
- 0 ); // all received methods should be resolved
1851
+ true ,
1852
+ 0
1853
+ ); // all received methods should be resolved
1810
1854
success = compInfoPT->getCachedResolvedMethod (key, this , &resolvedMethod);
1811
1855
}
1812
1856
0 commit comments