-
Notifications
You must be signed in to change notification settings - Fork 747
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 support for mixed references mode in CMake builds #11166
Conversation
245b43a
to
05e6d8f
Compare
Please review @gacholio @keithc-ca @dnakamura |
Is the plan to eventually switch Adopt builds to build with |
Static for now - dynamic doesn't perform well. |
Is GC check linked with the GC? Is that why it needs splitting? If it's just a performance concern, I'd leave it dynamic. |
Yes, |
OK - I guess the ideal would be to have a dynamic OMR for GC check, but that's for later on (if ever). |
05e6d8f
to
f1507cd
Compare
@gacholio What's the expected behaviour of using |
The expectation is that they will function exactly the same as the dual-VM builds. |
The redirector will need to be updated to always select the "default" directory for compressed and not. |
There's one more change I need to add, which I'm planning to add to If those changes are approved, I'll squash the commits. |
@gacholio Do we want to add pipeline changes to allow builds using |
Eventually perhaps, but we're going to be building the static version for the forseable future. |
Create new CMake spec files for mixed references mode Update CMakeLists.txt for GC libs to support mixed refs mode Update GC library selection to support mixed references static Add configure documentation for --with-mixedrefs=[static|dynamic] Add pipeline changes to build CMake mixed references mode Set OMR_MIXED_REFERENCES_MODE_STATIC in mxdptrs.cmake Declare the two glue interface libraries before adding omr Signed-off-by: Sharon Wang <[email protected]>
46848fc
to
ae0f27d
Compare
@dnakamura Ping for your thoughts on the CMake changes here |
Do we want to run a PR build with these changes? The shortname for the linux mixed refs build is |
I'd like to hear from @dnakamura on this and eclipse-omr/omr#5657. |
# version in gc_glue_java, below, when appropriate. | ||
j9vm_add_library(${OMR_GC_GLUE_TARGET} INTERFACE) | ||
j9vm_add_library(${OMR_GC_GLUE_FULL_TARGET} INTERFACE) | ||
|
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.
is there a reason to use a forward declaration instead of just including gc_glue_java ?
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.
Yes, it's because the _full
version of the glue library is only built if OMR_MIXED_REFERENCES_MODE_STATIC=ON
, but OMR_MIXED_REFERENCES_MODE_STATIC
is set as a cache variable later than when the glue libraries are referenced in other libraries. This results in having to run make all
twice to get the build working, since on the second run, the cache variable is already set.
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.
Like the comment says:
# Declare the GC glue interface libraries that omr might reference,
# including the 'full' version. We'll only add sources to the 'full'
# version in gc_glue_java, below, when appropriate.
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.
we could just remove the conditional around gc_glue_java full. Interface libraries are never built on their own. So we can just define it but never reference it anywhere
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.
The point is that it must be declared before including the omr.
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.
I understand. My point is that you could just flush out both interfaces regardless. If you never link against the extra glue, it has no effect on the build system. With either solution, if for some reason you do link against the extra glue (with OMR_MIXED_REFERENCES_MODE_STATIC
not set) you would get a link error at compile time.
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.
I think you have it backward: if we (unconditionally) provide complete library definitions, there would be no link error if the extra glue library were used (unintentionally).
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.
How do we want to proceed?
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.
I'm satisfied with this in it's current form, but I think this should wait until eclipse-omr/omr#5657 is merged in case it evolves in a way that would alter how this handles OMR_GC_POINTER_MODE == "mixed"
.
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.
Sounds good to me. @dnakamura What are your thoughts?
Here's a list of all the jenkins shortnames to run mixed refs CMake builds. These will run builds with extra configure options
|
Jenkins test sanity zlinuxmxdcm jdk11 |
Testing is currently only available on |
Jenkins test sanity xlinuxmxdcm jdk11 |
The test is still failing because in this PR, only I can add |
Let's wait to see how the xlinux tests fair before adjusting anything else. |
Test build failed because of I think by default, the suffix |
Failure message from test build for xlinux
It seems that some additional handling for mixed builds is missing from: https://github.com/AdoptOpenJDK/TKG/blob/master/src/org/openj9/envInfo/JavaInfo.java? I think these lines end up executing, which is causing the
|
Ah, I see there's a PR open to address handling mixed refs: adoptium/TKG#124 |
I'm inclined to merge this even though the test story is incomplete. |
Mixed references mode is enabled by specifying
--with-mixedrefs=[static|dynamic]
in theconfigure
options. If--with-mixedrefs
is provided without indicatingstatic
ordynamic
,static
is assumed by default.In
static
mixed references mode,OMR_MIXED_REFERENCES_MODE_STATIC
is enabled in OMR. When this is enabled, two GC libraries will be built:j9gc/omrgc
, whereOMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES=1
, andj9gc_full/omrgc_full
, whereOMR_OVERRIDE_COMPRESS_OBJECT_REFERENCES=0
The other GC libraries are also split into regular and
_full
in static mode.In
full
,compressed
ormixed dynamic
mode, the original "unsplit" libraries will continue to be built (i.e.j9gc/omrgc
and related GC libraries).Summary of Changes
_full
GC libraries)_full
GC libraries when in mixed references static mode--with-mixedrefs=[static|dynamic]
is now available (only with CMake)Note: GC libraries related to
Verbose
have not been updated. Investigation is ongoing by the GC team (cc @dmitripivkine). This means thatverbose
is not supported for the full references GC library in mixed references static mode.These changes only enable mixed references mode with CMake. Once this work is all merged, the equivalent UMA changes will be made.
When using a mixedrefs build, you can specify JVM options
-Xcompressedrefs
or-Xnocompressedrefs
to choose between compressed and full pointers.Here's a list of all the jenkins shortnames to run mixed refs CMake builds. These will run builds with extra configure options
--with-mixedrefs
and--with-cmake
. (This list is up to date with changes from #11459)aixmxd
: ppc64_aix_mixedzlinuxmxd
: s390x_linux_mixedplinuxmxd
: ppc64le_linux_mixedxlinuxmxd
: x86-64_linux_mixedwinmxd
: x86-64_windows_mixedosxmxd
: x86-64_mac_mixedalinux64mxd
: aarch64_linux_mixed// CMake is not currently available for ZOSzosmxd
: s390x_zos_mixedIssue Discussion: #8878
Related Issue "Merge compressedrefs and non-compressedrefs tests builds into one": #9231
OMR Changes
Extensions Changes