-
Notifications
You must be signed in to change notification settings - Fork 754
Periodically issue malloc_trim at JITServer client #19506
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
Conversation
Attn @mpirvu. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I only have a minor suggestion.
@@ -6721,6 +6722,16 @@ static int32_t J9THREAD_PROC samplerThreadProc(void * entryarg) | |||
{ | |||
CalculateOverallCompCPUUtilization(compInfo, crtTime, samplerThread); | |||
} | |||
#if defined(J9VM_OPT_JITSERVER) && defined(LINUX) | |||
static uint64_t lastMallocTrimTime = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't this need to be indented more?
Since the next block (line 6736) already has #if defined(J9VM_OPT_JITSERVER)
, maybe insert this new code under the same ifdef and just add #if defined(LINUX)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
JITServer clients will now periodically call malloc_trim(0), at a configurable interval set by the new option -Xjit:jitserverMallocTrimInterval=<time in ms>. The default is every 30s (30000ms). Setting this interval to 0 will disable the feature entirely. Signed-off-by: Christian Despres <[email protected]>
jenkins test sanity xlinuxjit,zlinuxjit,alinux64jit jdk17 |
This commit caused a build break on macOS. See https://openj9-jenkins.osuosl.org/job/Build_JDK11_x86-64_mac_Nightly/819/consoleText for example:
|
It seems there is already a PR to fix it: #19510 |
JITServer clients will now periodically call
malloc_trim(0)
, at a configurable interval set by the new option-Xjit:jitserverMallocTrimInterval=<time in ms>
. The default is every 30s (30000ms). Setting the interval to 0 will disable the feature entirely.