Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'lowCodeCacheFreeSpace' field to J9JITConfig #21083

Merged
merged 1 commit into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions runtime/compiler/runtime/J9CodeCacheManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,13 +743,15 @@ J9::CodeCacheManager::almostOutOfCodeCache()

TR::CodeCacheConfig &config = self()->codeCacheConfig();

// If we can allocate another code cache we are fine
// Put common case first
// If we can allocate another code cache we are fine.
// Put common case first.
if (self()->canAddNewCodeCache())
{
return false;
}
else
{
// Check the space in the most current code cache
// Check the space in the most current code cache.
bool foundSpace = false;

{
Expand All @@ -767,6 +769,7 @@ J9::CodeCacheManager::almostOutOfCodeCache()
if (!foundSpace)
{
_lowCodeCacheSpaceThresholdReached = true; // Flag can be checked under debugger
_jitConfig->lowCodeCacheFreeSpace = 1;
if (config.verbosePerformance())
{
TR_VerboseLog::writeLineLocked(TR_Vlog_CODECACHE,"Reached code cache space threshold. Disabling JIT profiling.");
Expand Down
1 change: 1 addition & 0 deletions runtime/oti/j9nonbuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -4364,6 +4364,7 @@ typedef struct J9JITConfig {
void *serverAOTMethodSet;
UDATA serverAOTQueryThread;
#endif /* defined(J9VM_OPT_JITSERVER) */
I_32 lowCodeCacheFreeSpace; /* bool set to 1 when the JIT detects a very low amount of free code cache space; never reset */
} J9JITConfig;

#if defined(J9VM_OPT_CRIU_SUPPORT)
Expand Down