@@ -1221,7 +1221,7 @@ SH_CacheMap::readCache(J9VMThread* currentThread, SH_CompositeCacheImpl* cache,
12211221
12221222/* THREADING: MUST be protected by cache write mutex - therefore single-threaded within this JVM */
12231223IDATA
1224- SH_CacheMap::checkForCrash (J9VMThread* currentThread, bool hasClassSegmentMutex)
1224+ SH_CacheMap::checkForCrash (J9VMThread* currentThread, bool hasClassSegmentMutex, bool canUnlockCache )
12251225{
12261226 IDATA rc = 0 ;
12271227 PORT_ACCESS_FROM_PORT (_portlib);
@@ -1235,7 +1235,7 @@ SH_CacheMap::checkForCrash(J9VMThread* currentThread, bool hasClassSegmentMutex)
12351235 if (resetAllManagers (currentThread) != 0 ) {
12361236 return -1 ;
12371237 }
1238- _cc->reset (currentThread);
1238+ _cc->reset (currentThread, canUnlockCache );
12391239 rc = refreshHashtables (currentThread, hasClassSegmentMutex);
12401240 }
12411241 return rc;
@@ -1567,7 +1567,7 @@ SH_CacheMap::addClasspathToCache(J9VMThread* currentThread, ClasspathItem* obj)
15671567 * @return the number of items read, or -1 on error
15681568 */
15691569IDATA
1570- SH_CacheMap::runEntryPointChecks (J9VMThread* currentThread, void * address, const char ** p_subcstr)
1570+ SH_CacheMap::runEntryPointChecks (J9VMThread* currentThread, void * address, const char ** p_subcstr, bool canUnlockCache )
15711571{
15721572 bool hasClassSegmentMutex = false ;
15731573 IDATA itemsAdded;
@@ -1600,7 +1600,7 @@ SH_CacheMap::runEntryPointChecks(J9VMThread* currentThread, void* address, const
16001600 if (!_ccHead->isRunningReadOnly ()) {
16011601 if (_ccHead->hasWriteMutex (currentThread)) {
16021602 /* Can only call this function if we have the write mutex */
1603- rc = checkForCrash (currentThread, hasClassSegmentMutex);
1603+ rc = checkForCrash (currentThread, hasClassSegmentMutex, canUnlockCache );
16041604 if (rc < 0 ) {
16051605 Trc_SHR_CM_runEntryPointChecks_Exit_Failed4 (currentThread);
16061606 return rc;
@@ -2975,7 +2975,7 @@ SH_CacheMap::updateROMClassResource(J9VMThread* currentThread, const void* addre
29752975 }
29762976 hasWriteMutex = true ;
29772977
2978- if (runEntryPointChecks (currentThread, (void *)addressInCache, p_subcstr) == -1 ) {
2978+ if (runEntryPointChecks (currentThread, (void *)addressInCache, p_subcstr, false ) == -1 ) {
29792979 Trc_SHR_CM_updateROMClassResource_Exit3 (currentThread);
29802980 result = J9SHR_RESOURCE_STORE_ERROR;
29812981 break ;
@@ -4410,7 +4410,7 @@ SH_CacheMap::markStale(J9VMThread* currentThread, ClasspathEntryItem* cpei, bool
44104410 currentThread->omrVMThread ->vmState = J9VMSTATE_SHAREDCLASS_MARKSTALE;
44114411 while (retryCount < MARK_STALE_RETRY_TIMES) {
44124412 if (hasWriteMutex || (_ccHead->enterWriteMutex (currentThread, true ,fnName)==0 )) { /* true = lockCache */
4413- if (runEntryPointChecks (currentThread, NULL , NULL ) == -1 ) {
4413+ if (runEntryPointChecks (currentThread, NULL , NULL , false ) == -1 ) {
44144414 if (!hasWriteMutex) {
44154415 _ccHead->exitWriteMutex (currentThread, fnName); /* Will unlock cache */
44164416 }
0 commit comments