@@ -387,7 +387,14 @@ TR_ResolvedJ9JITServerMethod::getResolvedPossiblyPrivateVirtualMethod(TR::Compil
387387 if (createResolvedMethod)
388388 {
389389 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+ );
391398 }
392399 }
393400 }
@@ -694,7 +701,14 @@ TR_ResolvedJ9JITServerMethod::getResolvedStaticMethod(TR::Compilation * comp, I_
694701 }
695702 else
696703 {
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+ );
698712 }
699713
700714 return resolvedMethod;
@@ -751,7 +765,13 @@ TR_ResolvedJ9JITServerMethod::getResolvedSpecialMethod(TR::Compilation * comp, I
751765 }
752766 else
753767 {
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+ );
755775 }
756776
757777 return resolvedMethod;
@@ -882,7 +902,14 @@ TR_ResolvedJ9JITServerMethod::getResolvedInterfaceMethod(TR::Compilation * comp,
882902 // to uniquely identify it.
883903 if (resolvedMethod)
884904 {
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+ );
886913 return resolvedMethod;
887914 }
888915
@@ -932,8 +959,14 @@ TR_ResolvedJ9JITServerMethod::getResolvedImproperInterfaceMethod(TR::Compilation
932959 j9method = NULL ;
933960 }
934961
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+ );
937970 if (j9method == NULL )
938971 return NULL ;
939972 else
@@ -997,7 +1030,14 @@ TR_ResolvedJ9JITServerMethod::getResolvedVirtualMethod(TR::Compilation * comp, T
9971030 resolvedMethod = ramMethod ? new (comp->trHeapMemory ()) TR_ResolvedJ9JITServerMethod ((TR_OpaqueMethodBlock *) ramMethod, _fe, comp->trMemory (), methodInfo, this ) : 0 ;
9981031 }
9991032 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+ );
10011041 return resolvedMethod;
10021042 }
10031043
@@ -1664,12 +1704,13 @@ TR_ResolvedJ9JITServerMethod::cacheResolvedMethodsCallees(int32_t ttlForUnresolv
16641704
16651705 // 2. Send a remote query to mirror all uncached resolved methods
16661706 _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 > >();
16681708
16691709 // 3. Cache all received resolved methods
16701710 auto &ramMethods = std::get<0 >(recv);
16711711 auto &vTableOffsets = std::get<1 >(recv);
16721712 auto &methodInfos = std::get<2 >(recv);
1713+ auto &unresolvedInCPs = std::get<3 >(recv);
16731714 TR_ASSERT (numMethods == ramMethods.size (), " Number of received methods does not match the number of requested methods" );
16741715 for (int32_t i = 0 ; i < numMethods; ++i)
16751716 {
@@ -1686,6 +1727,7 @@ TR_ResolvedJ9JITServerMethod::cacheResolvedMethodsCallees(int32_t ttlForUnresolv
16861727 ramMethods[i],
16871728 vTableOffsets[i],
16881729 methodInfos[i],
1730+ (bool ) unresolvedInCPs[i],
16891731 ttlForUnresolved
16901732 );
16911733 }
@@ -1806,7 +1848,9 @@ TR_ResolvedJ9JITServerMethod::collectImplementorsCapped(
18061848 (TR_OpaqueMethodBlock *) ramMethods[i],
18071849 cpIndexOrOffset,
18081850 methodInfos[i],
1809- 0 ); // all received methods should be resolved
1851+ true ,
1852+ 0
1853+ ); // all received methods should be resolved
18101854 success = compInfoPT->getCachedResolvedMethod (key, this , &resolvedMethod);
18111855 }
18121856
0 commit comments