Skip to content

Commit

Permalink
Disable JIT artifact cache for temporary J9VMThreads
Browse files Browse the repository at this point in the history
Temporary `J9VMThread`s are created to present `J9VMContinuation` thread data
to the stackwalker.  Explicitly disable the JIT artifact cache on the temporary
thread otherwise the stack walker will allocate a new 4K buffer for each
temporary `J9VMThread` whose memory must be managed.

These threads exist to perform a single stack walk and the benefits of managing
and using a JIT artifact cache appear to be limited.

Fixes: eclipse-openj9#16424

Signed-off-by: Daryl Maier <maier@ca.ibm.com>
  • Loading branch information
0xdaryl committed Feb 2, 2023
1 parent df96e90 commit 3ef0939
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runtime/vm/ContinuationHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ copyFieldsFromContinuation(J9VMThread *currentThread, J9VMThread *vmThread, J9VM
els->jitGlobalStorageBase = (UDATA*)&continuation->jitGPRs;
els->i2jState = continuation->i2jState;
vmThread->entryLocalStorage = els;

/* Disable the JIT artifact cache on the walk thread. It provides little performance
* benefit to a single walk and the cache memory must be managed.
*/
vmThread->jitArtifactSearchCache = (void*)((UDATA)vmThread->jitArtifactSearchCache | J9_STACKWALK_NO_JIT_CACHE);
}

UDATA
Expand Down

0 comments on commit 3ef0939

Please sign in to comment.