Skip to content

Commit

Permalink
Merge pull request #10702 from dchopra001/JITServerOnZBuildFixes_rele…
Browse files Browse the repository at this point in the history
…ase2

(0.23.0) JITServer on Z build fixes release2
  • Loading branch information
pshipton committed Sep 25, 2020
2 parents 5371295 + 9fb8ed5 commit a268200
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion runtime/compiler/control/JITClientCompilationThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ handleServerMessage(JITServer::ClientStream *client, TR_J9VM *fe, JITServer::Mes
auto recv = client->getRecvData<std::string, bool>();
const std::string name = std::get<0>(recv);
bool isVettedForAOT = std::get<1>(recv);
client->write(response, fe->getSystemClassFromClassName(name.c_str(), name.length(), isVettedForAOT));
// Always need non-AOT front-end here, since class validation is done on the server
TR_J9VMBase *fej9 = TR_J9VMBase::get(vmThread->javaVM->jitConfig, vmThread);
client->write(response, fej9->getSystemClassFromClassName(name.c_str(), name.length(), isVettedForAOT));
}
break;
case MessageType::VM_isMethodTracingEnabled:
Expand Down
6 changes: 3 additions & 3 deletions runtime/compiler/z/codegen/J9TreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4002,10 +4002,10 @@ J9::Z::TreeEvaluator::generateTestAndReportFieldWatchInstructions(TR::CodeGenera
if (isResolved)
{
fieldClassReg = cg->allocateRegister();
if (!(cg->needClassAndMethodPointerRelocations()))
J9Class *fieldClass = static_cast<TR::J9WatchedStaticFieldSnippet *>(dataSnippet)->getFieldClass();
if (!(cg->needClassAndMethodPointerRelocations()) && cg->canUseRelativeLongInstructions(reinterpret_cast<int64_t>(fieldClass)))
{
// For non-AOT (JIT and JITServer) compiles we don't need to use sideEffectRegister here as the class information is available to us at compile time.
J9Class *fieldClass = static_cast<TR::J9WatchedStaticFieldSnippet *>(dataSnippet)->getFieldClass();
TR_ASSERT_FATAL(fieldClass != NULL, "A valid J9Class must be provided for direct rdbar/wrtbar opcodes %p\n", node);
generateRILInstruction(cg, TR::InstOpCode::LARL, node, fieldClassReg, static_cast<void *>(fieldClass));
}
Expand Down Expand Up @@ -4822,7 +4822,7 @@ VMarrayStoreCHKEvaluator(
if (debugObj)
debugObj->addInstructionComment(cursor, "Check if src.type == array.type");

intptr_t objectClass = (intptr_t) fej9->getSystemClassFromClassName("java/lang/Object", 16, !cg->comp()->isOutOfProcessCompilation());
intptr_t objectClass = (intptr_t) fej9->getSystemClassFromClassName("java/lang/Object", 16, true);
/*
* objectClass is used for Object arrays check optimization: when we are storing to Object arrays we can skip all other array store checks
* However, TR_J9SharedCacheVM::getSystemClassFromClassName can return 0 when it's impossible to relocate j9class later for AOT loads
Expand Down

0 comments on commit a268200

Please sign in to comment.