-
Notifications
You must be signed in to change notification settings - Fork 397
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
Fix discrepancy in GC Extensions Base functions #6715
Conversation
@@ -217,7 +217,6 @@ MM_ConfigurationGenerational::createHeapWithManager(MM_EnvironmentBase *env, UDA | |||
MM_GCExtensionsBase *extensions = env->getExtensions(); | |||
MM_Heap *heap = NULL; | |||
|
|||
#if defined(OMR_GC_MODRON_SCAVENGER) |
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.
This one was removed because it is done at the beginning of the file
68f4b08
to
aa81390
Compare
gc/base/GCExtensionsBase.hpp
Outdated
#endif /* OMR_GC_MODRON_SCAVENGER */ | ||
} | ||
|
||
MMINLINE bool isRememberedSetInOverflowState() |
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.
Now that these 3 RS methods are exposed outside of Scavenger compile fla, it would nice that method names are more explicit what kind of RS we are talking (since there is more then just Scavenger RS in our code base).
So, I recommend we expand these names to:
isScavengerRememberedSetInOverflowState
and similarly for 2 others related.
Since this is being used by dependent projects, you'll have keep the exisiting APIs, till depended projects get updated.
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.
new functions have added
3a30274
to
15def8d
Compare
I did not realize I can change OMR code to use new functions now without waiting for cleanup PR. Adding more code |
ea59888
to
8b5f404
Compare
gc/base/GCExtensionsBase.hpp
Outdated
*start = _guaranteedNurseryStart; | ||
*end = _guaranteedNurseryEnd; | ||
#elif /* OMR_GC_MODRON_SCAVENGER */ |
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.
All#elif
s will need to be replaced with #else
or #elif defined(MACRO_NAME)
. Otherwise, the code may not work as expected.
#elif /* OMR_GC_MODRON_SCAVENGER */ | |
#else /* OMR_GC_MODRON_SCAVENGER */ |
Does this PR completely resolve the issue described in #6702 (comment) and allow OMR to be built without |
Locally built without
|
3d40c25
to
d1bf1a5
Compare
The goal of this PR is cleanup usage of scavenger related functions in |
Setup is pretty easy. If an OpenJ9 or OMR setup already exists, then you only need the following cmds to build OMR standalone:
If a setup does not exist, then the following dependencies need to be installed before running the above cmds: https://github.com/eclipse/omr/blob/f27ffa9b7e747c1f316240c5ec2335543b48aec6/buildenv/docker/x86_64/ubuntu20/Dockerfile#L28-L48 Configure alternate:
|
With #6525 merged, we can disable OMR_GC_MODRON_SCAVENGER and dependent/related flags in PR builds to test these changes. Example: |
2cbf0dc
to
3473148
Compare
@babsingh Would you please review again? OMR compiles with |
jenkins build all(cmake:'-DOMR_GC_MODRON_SCAVENGER=OFF') |
jenkins build arm(cmake:'--disable-OMR_GC_MODRON_SCAVENGER'),aarch64(cmake:'--disable-OMR_GC_MODRON_SCAVENGER'),zos(cmake:'-DOMR_GC_MODRON_SCAVENGER=OFF') |
jenkins build arm(cmake:'EXTRA_CONFIGURE_ARGS=--disable-OMR_GC_MODRON_SCAVENGER'),aarch64(cmake:'EXTRA_CONFIGURE_ARGS=--disable-OMR_GC_MODRON_SCAVENGER'),zos(cmake:'-DOMR_GC_MODRON_SCAVENGER=OFF') |
jenkins build arm(cmake:'EXTRA_CONFIGURE_ARGS=--disable-OMR_GC_MODRON_SCAVENGER') |
jenkins build zos(cmake:'-DOMR_GC_MODRON_SCAVENGER=OFF') |
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.
functionally changes look good. minor formatting nitpicks.
Suggested rephrase of the commit message:
|
There is a number of functions in the GC Extensions Base defined under the OMR_GC_MODRON_SCAVENGER flag. However, there are many places where these functions are called unconditionally without checking this flag. This flag is always enabled in our compilation environment, which allows the code to compile. If it is disabled, the code fails to compile. The solution is to always define these functions and wrap Scavenger related content inside them. Signed-off-by: Dmitri Pivkine <[email protected]>
0234adb
to
ff58cb7
Compare
@babsingh ready for review |
jenkins build all(cmake:'-DOMR_GC_MODRON_SCAVENGER=OFF') |
jenkins build arm(cmake:'EXTRA_CONFIGURE_ARGS=--disable-OMR_GC_MODRON_SCAVENGER') |
jenkins build aarch64(cmake:'EXTRA_CONFIGURE_ARGS=--disable-OMR_GC_MODRON_SCAVENGER') |
jenkins build arm(cmake:'EXTRA_CONFIGURE_ARGS=--disable-OMR_GC_MODRON_SCAVENGER') |
All builds, with OMR_GC_MODRON_SCAVENGER disabled, have passed. Starting jobs with the flag enabled: jenkins build all |
jenkins build zos |
4 similar comments
jenkins build zos |
jenkins build zos |
jenkins build zos |
jenkins build zos |
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.
In addition to #6715 (comment), all builds, with OMR_GC_MODRON_SCAVENGER enabled, have passed.
There is a number of functions in the GC Extensions Base defined under
the OMR_GC_MODRON_SCAVENGER flag. However, there are many places where
these functions are called unconditionally without checking this flag.
This flag is always enabled in our compilation environment, which
allows the code to compile. If it is disabled, the code fails to
compile. The solution is to always define these functions and wrap
Scavenger related content inside them.
Signed-off-by: Dmitri Pivkine [email protected]