Skip to content

Commit bee4454

Browse files
committed
Reset trampoline pointers to top of space
After flushing the code cache under FSD there is a call to resetTrampolines. The _trampolineAllocationMark and _trampolineReservationMark need to be reset to their starting positions but were incorrectly set to the end of the trampoline space. As a result all active segments at the time of the cache flush are marked as full (assuming a platform that uses trampolines). This can be seen by taking a JIT verbose log with option `codecache` which will show CODECACHE: CodeCache 00007E759000C660 marked as full in reserveSpaceForTrampoline
1 parent f7ddf02 commit bee4454

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

runtime/compiler/runtime/J9CodeCache.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,10 @@ J9::CodeCache::resetTrampolines()
749749
}
750750

751751
//reset the trampoline marks back to their starting positions
752-
_trampolineAllocationMark = _trampolineBase;
753-
_trampolineReservationMark = _trampolineBase;
752+
// Note that permanent trampolines are allocated from _tempTrampolineBase downwards
753+
// see initialize in OMRCodeCache.cpp
754+
_trampolineAllocationMark = _tempTrampolineBase;
755+
_trampolineReservationMark = _tempTrampolineBase;
754756

755757
OMR::CodeCacheTempTrampolineSyncBlock *syncBlock;
756758
if (!_tempTrampolinesMax)

0 commit comments

Comments
 (0)