Skip to content

Commit

Permalink
Merge pull request #7230 from kangyining/checkpointgcThread
Browse files Browse the repository at this point in the history
CheckpointGCthreadCount conflicts with gcThread Warning
  • Loading branch information
babsingh committed Feb 1, 2024
2 parents 15e19bf + c9f23da commit 7bf073f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions example/glue/ConfigurationDelegate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,18 @@ class MM_ConfigurationDelegate
*/
MM_GCPolicy getGCPolicy() { return _gcPolicy; }

#if defined(J9VM_OPT_CRIU_SUPPORT)
/**
* If checkpointGCthreadCount is specified by the user, it is verified
* to be not larger than the number of gc threads, and throw a warning
* if larger; if it is not specified by the user, it is adjusted to match
* the number of gc threads.
*
* @param[in] env The environment for the calling thread
*/
void checkPointGCThreadCountVerifyAndAdjust(MM_EnvironmentBase *env) {}
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */

/**
* Constructor.
* @param gcPolicy The GC policy preselected for the GC configuration.
Expand Down
3 changes: 3 additions & 0 deletions gc/base/Configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ MM_Configuration::initializeGCThreadCount(MM_EnvironmentBase* env)
if (!extensions->gcThreadCountSpecified) {
extensions->gcThreadCount = defaultGCThreadCount(env);
}
#if defined(J9VM_OPT_CRIU_SUPPORT)
_delegate.checkPointGCThreadCountVerifyAndAdjust(env);
#endif /* defined(J9VM_OPT_CRIU_SUPPORT) */
}

uintptr_t
Expand Down

0 comments on commit 7bf073f

Please sign in to comment.