Set gcThreadCountSpecified and allow -Xgcmaxthreads for restore VM #18646
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Set gcThreadCountSpecified if either -Xgcthreads or -Xgcmaxthreads is specified, and use gcThreadCountForced to distinguish between the 2 options. This is a part of the fix that will allow -Xgcmaxthreads to work as expected (another OMR change is needed to make use of now properly set gcThreadCountSpecified flag).
Aslo, allow -Xgcmaxthreads to be specified on restore VM too, and make sure that whichever is the last one wins (in any combination of those 2 options being or not beign specified on snapshot or restore side). Parsing of -Xgcmaxthreads handles it, since it's the latter one that gets processed in the code.
There is also a change in behavior for restore VM. Previosly, if -Xgcthreads was specified on snapshot side, it would be ignored on restore side and the thread count would be recalculated from scratch. Now, if that option (or gcmaxthreads variant) is specified on snapshot side it will obeyed on restore side. Of course if restore side specifies any of the 2 options that will override the snapshot value. That was true before and still true, except that the value will possible to override by either gcthreads or (once fully working) gcmaxthreads variant.