Skip to content
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 compressedrefs support on OSX in OpenJ9 #3144

Merged
merged 2 commits into from
Oct 12, 2018

Conversation

babsingh
Copy link
Contributor

@babsingh babsingh commented Oct 4, 2018

i) Add compressedrefs support in OMR OSX configure file

If build spec is osx_x86-64_cmprssptrs, then the following three flags
need to be enabled:

  1. OMR_GC_COMPRESSED_POINTERS
  2. OMR_INTERP_COMPRESSED_OBJECT_HEADER
  3. OMR_INTERP_SMALL_MONITOR_SLOT

The above flags were derived using the OMR Linux x86 configure file:
configure_linux_x86.mk.

ii) Add OSX compressedrefs buildspec

  1. linux_x86-64.spec and linux_x86-64_cmprssptrs.spec were diff'ed. This
    showed the new fields which were present in the compressedrefs spec.
    Also, it showed the fields which should be removed from the
    compressedrefs spec.

  2. osx_x86-64.spec was copied to create osx_x86-64_cmprssptrs.spec.

  3. Diff information from 1) was used to update
    osx_x86-64_cmprssptrs.spec.

  4. A lot of property names in osx_x86-64*.spec still contain linux
    specific terms such as xa, linux, etc. Such property names are unused in
    OpenJ9 builds. They are retained with incorrect naming to avoid missing
    dependency issues in internal builds. The naming will be fixed at a
    later point if needed.

  5. In the osx_x86-64_cmprssptrs.spec, "build_openj9", "build_openj9JDK8"
    and "graph_enableModularityTesting" flags were added; "env_data64",
    "graph_includeThrstatetest", "module_ddr_gdb_plugin" and "module_ddrext"
    flags were removed.

  6. For osx_x86-64_cmprssptrs.spec, feature "cmprssptrs" was added and
    feature "crypto" was removed.

Signed-off-by: Babneet Singh sbabneet@ca.ibm.com

@babsingh
Copy link
Contributor Author

babsingh commented Oct 4, 2018

fyi - @DanHeidinga. Related to #36 and ibmruntimes/openj9-openjdk-jdk9#179.

Building locally to verify if compressedrefs SDK is properly generated on OSX.

@babsingh
Copy link
Contributor Author

babsingh commented Oct 4, 2018

fyi @charliegracie @dmitripivkine Getting the following GC error when building a compressedrefs SDK on OSX:

JVMJ9VM015W Initialization error for library j9gc29(2): Failed to instantiate compressed references metadata; 200M requested
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

@dmitripivkine
Copy link
Contributor

dmitripivkine commented Oct 4, 2018

this error message means Suballocator can not be initialized properly, most likely can not get memory below 4G: omrmem_ensure_capacity32() returns OMRPORT_ENSURE_CAPACITY_FAILED

@babsingh
Copy link
Contributor Author

babsingh commented Oct 4, 2018

@dmitripivkine does this mean compressedrefs is unsupported on OSX? is it possible to resolve the GC error?

@babsingh babsingh changed the title Add compressedrefs support on OSX Add compressedrefs support on OSX in OpenJ9 Oct 4, 2018
@dmitripivkine
Copy link
Contributor

Would you please check is OMR_PORT_CAN_RESERVE_SPECIFIC_ADDRESS defined?

@babsingh
Copy link
Contributor Author

babsingh commented Oct 4, 2018

yes, OMR_PORT_CAN_RESERVE_SPECIFIC_ADDRESS is defined. OMR OSX related flags are here: configure_osx.mk.

@dmitripivkine
Copy link
Contributor

dmitripivkine commented Oct 4, 2018

This is a problem with Port Library Memory Allocation. I hope something is missed there and problem is not fatal. It should be investigated

@babsingh
Copy link
Contributor Author

babsingh commented Oct 4, 2018

fyi - @nbhuiyan @0xdaryl @pshipton

@charliegracie
Copy link
Contributor

charliegracie commented Oct 4, 2018

There is an issue at OMR for the portlibrary issue. eclipse-omr/omr#15

If build spec is osx_x86-64_cmprssptrs, then the following three flags
need to be enabled:

1) OMR_GC_COMPRESSED_POINTERS
2) OMR_INTERP_COMPRESSED_OBJECT_HEADER
3) OMR_INTERP_SMALL_MONITOR_SLOT

The above flags were derived using the OMR Linux x86 configure file:
configure_linux_x86.mk. 

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
1) linux_x86-64.spec and linux_x86-64_cmprssptrs.spec were diff'ed. This
showed the new fields which were present in the compressedrefs spec.
Also, it showed the fields which should be removed from the
compressedrefs spec.

2) osx_x86-64.spec was copied to create osx_x86-64_cmprssptrs.spec.

3) Diff information from 1) was used to update
osx_x86-64_cmprssptrs.spec.

4) A lot of property names in osx_x86-64*.spec still contain linux
specific terms such as xa, linux, etc. Such property names are unused in
OpenJ9 builds. They are retained with incorrect naming to avoid missing
dependency issues in internal builds. The naming will be fixed at a
later point if needed. 

5) In the osx_x86-64_cmprssptrs.spec, "build_openj9", "build_openj9JDK8"
and "graph_enableModularityTesting" flags were added; "env_data64",
"graph_includeThrstatetest", "module_ddr_gdb_plugin" and "module_ddrext"
flags were removed.

6) For osx_x86-64_cmprssptrs.spec, feature "cmprssptrs" was added and
feature "crypto" was removed.

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@DanHeidinga
Copy link
Member

issue #36

Copy link
Member

@DanHeidinga DanHeidinga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@DanHeidinga
Copy link
Member

Merging without PR build as mac isn't supported in the PR builds yet

@DanHeidinga DanHeidinga merged commit d66dd20 into eclipse-openj9:master Oct 12, 2018
@babsingh babsingh deleted the osx_compressedrefs branch August 17, 2020 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants