Skip to content

Commit

Permalink
Acquire VMAccess for various JITClient APIs
Browse files Browse the repository at this point in the history
Signed-off-by: Harry Yu <harryyu1994@gmail.com>
  • Loading branch information
harryyu1994 committed Jan 16, 2020
1 parent c963b8c commit cd54e60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/compiler/control/JITClientCompilationThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ handleServerMessage(JITServer::ClientStream *client, TR_J9VM *fe, JITServer::Mes
auto recv = client->getRecvData<uintptrj_t, uintptrj_t>();
uintptrj_t objectPointer = std::get<0>(recv);
uintptrj_t fieldOffset = std::get<1>(recv);
TR::VMAccessCriticalSection getInt32FieldAt(fe);
client->write(response, fe->getInt32FieldAt(objectPointer, fieldOffset));
}
break;
Expand All @@ -667,6 +668,7 @@ handleServerMessage(JITServer::ClientStream *client, TR_J9VM *fe, JITServer::Mes
auto recv = client->getRecvData<uintptrj_t, uintptrj_t>();
uintptrj_t objectPointer = std::get<0>(recv);
uintptrj_t fieldOffset = std::get<1>(recv);
TR::VMAccessCriticalSection getInt64FieldAt(fe);
client->write(response, fe->getInt64FieldAt(objectPointer, fieldOffset));
}
break;
Expand All @@ -693,6 +695,7 @@ handleServerMessage(JITServer::ClientStream *client, TR_J9VM *fe, JITServer::Mes
case MessageType::VM_getArrayLengthInElements:
{
uintptrj_t objectPointer = std::get<0>(client->getRecvData<uintptrj_t>());
TR::VMAccessCriticalSection getArrayLengthInElements(fe);
client->write(response, fe->getArrayLengthInElements(objectPointer));
}
break;
Expand Down

0 comments on commit cd54e60

Please sign in to comment.