Skip to content

Commit

Permalink
Merge pull request #20901 from luke-li-2003/BypassVMAccessJITServer
Browse files Browse the repository at this point in the history
Bypass Code Blocks Requiring VM Access for the JIT Server
  • Loading branch information
mpirvu authored Jan 10, 2025
2 parents 7c49319 + 38415f7 commit e851174
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions runtime/compiler/optimizer/J9ValuePropagation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2078,6 +2078,13 @@ J9::ValuePropagation::constrainRecognizedMethod(TR::Node *node)
{
case TR::java_lang_invoke_MethodHandle_asType:
{
#if defined(J9VM_OPT_JITSERVER)
// The J9VMJAVALANG macros used later
// will access vm information which is not available on the JITServer,
// bypass in this case to prevent an invalid class pointer being retrieved
if (comp()->isOutOfProcessCompilation())
break;
#endif // J9VM_OPT_JITSERVER
TR::Node* mh = node->getArgument(0);
TR::Node* mt = node->getArgument(1);
bool mhConstraintGlobal, mtConstraintGlobal;
Expand Down Expand Up @@ -2129,11 +2136,13 @@ J9::ValuePropagation::constrainRecognizedMethod(TR::Node *node)
#if defined(J9VM_OPT_METHOD_HANDLE)
case TR::java_lang_invoke_PrimitiveHandle_initializeClassIfRequired:
{
#if defined(J9VM_OPT_JITSERVER)
// The macro J9VMJAVALANGINVOKEPRIMITIVEHANDLE used later
// will access vm information which is not available on the JITServer,
// bypass in this case to prevent an invalid class pointer being retrieved
if (comp()->isOutOfProcessCompilation())
break;
#endif // J9VM_OPT_JITSERVER
TR::Node* mh = node->getArgument(0);
bool mhConstraintGlobal;
TR::VPConstraint* mhConstraint = getConstraint(mh, mhConstraintGlobal);
Expand Down

0 comments on commit e851174

Please sign in to comment.