Skip to content

Commit

Permalink
Shut down ROM class cache if purging all clients
Browse files Browse the repository at this point in the history
The JITServer expects that the shared ROM class cache will have been
initialized only if the _clientSessionMap is empty.

Fixes: #18631

Signed-off-by: Christian Despres <[email protected]>
  • Loading branch information
cjjdespres committed Dec 19, 2023
1 parent c6df01b commit cb73077
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions runtime/compiler/runtime/JITClientSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,13 @@ ClientSessionHT::purgeOldDataIfNeeded()
_clientSessionMap.erase(iter); // delete the mapping from the hashtable
}
}
// If all the clients were deleted, shut down the shared ROMClass cache
if (_clientSessionMap.empty())
{
if (auto cache = TR::CompilationInfo::get()->getJITServerSharedROMClassCache())
cache->shutdown();
}

_timeOfLastPurge = crtTime;

// JITServer TODO: keep stats on how many elements were purged
Expand Down

0 comments on commit cb73077

Please sign in to comment.