diff --git a/buildenv/jenkins/jobs/pipelines/Pipeline-Build-Test-All.groovy b/buildenv/jenkins/jobs/pipelines/Pipeline-Build-Test-All.groovy index 10d42955192..5d39d2371ff 100644 --- a/buildenv/jenkins/jobs/pipelines/Pipeline-Build-Test-All.groovy +++ b/buildenv/jenkins/jobs/pipelines/Pipeline-Build-Test-All.groovy @@ -74,6 +74,7 @@ SPECS = ['ppc64_aix' : CURRENT_RELEASES, 'ppc64_aix_xl' : CURRENT_RELEASES, 'ppc64_aix_xl_cm' : CURRENT_RELEASES, 'ppc64_aix_xl_uma' : CURRENT_RELEASES, + 'ppc64_aix_mixed_cm' : CURRENT_RELEASES, 'ppc64le_linux' : CURRENT_RELEASES, 'ppc64le_linux_cm' : CURRENT_RELEASES - '11', 'ppc64le_linux_uma' : CURRENT_RELEASES, @@ -81,6 +82,7 @@ SPECS = ['ppc64_aix' : CURRENT_RELEASES, 'ppc64le_linux_xl' : CURRENT_RELEASES, 'ppc64le_linux_xl_cm' : CURRENT_RELEASES - '11', 'ppc64le_linux_xl_uma' : CURRENT_RELEASES, + 'ppc64le_linux_mixed_cm' : CURRENT_RELEASES, 's390x_linux' : CURRENT_RELEASES, 's390x_linux_cm' : CURRENT_RELEASES - '11', 's390x_linux_uma' : CURRENT_RELEASES, @@ -88,23 +90,27 @@ SPECS = ['ppc64_aix' : CURRENT_RELEASES, 's390x_linux_xl' : CURRENT_RELEASES, 's390x_linux_xl_cm' : CURRENT_RELEASES - '11', 's390x_linux_xl_uma' : CURRENT_RELEASES, + 's390x_linux_mixed_cm' : CURRENT_RELEASES, 's390x_zos' : ['11'], 's390x_zos_cm' : ['11'], 's390x_zos_uma' : ['11'], 's390x_zos_xl' : ['11'], 's390x_zos_xl_cm' : ['11'], + 's390x_zos_mixed_cm' : ['11'], 'x86-64_linux' : CURRENT_RELEASES, 'x86-64_linux_cm': CURRENT_RELEASES - '11', 'x86-64_linux_uma' : CURRENT_RELEASES, 'x86-64_linux_xl': CURRENT_RELEASES, 'x86-64_linux_xl_cm': CURRENT_RELEASES - '11', 'x86-64_linux_xl_uma' : CURRENT_RELEASES, + 'x86-64_linux_mixed_cm' : CURRENT_RELEASES, 'x86-64_linux_jit' : CURRENT_RELEASES, 'x86-64_linux_valhalla' : ['next'], 'x86-64_mac_xl' : CURRENT_RELEASES, 'x86-64_mac' : CURRENT_RELEASES, 'x86-64_mac_cm' : CURRENT_RELEASES - '11', 'x86-64_mac_xl_cm' : CURRENT_RELEASES - '11', + 'x86-64_mac_mixed_cm' : CURRENT_RELEASES, 'x86-64_mac_uma' : CURRENT_RELEASES, 'x86-64_mac_xl_uma' : CURRENT_RELEASES, 'x86-32_windows' : ['8'], @@ -116,12 +122,14 @@ SPECS = ['ppc64_aix' : CURRENT_RELEASES, 'x86-64_windows_xl' : CURRENT_RELEASES, 'x86-64_windows_xl_cm': CURRENT_RELEASES, 'x86-64_windows_xl_uma' : CURRENT_RELEASES, + 'x86-64_windows_mixed_cm' : CURRENT_RELEASES, 'aarch64_linux' : CURRENT_RELEASES, 'aarch64_linux_cm': CURRENT_RELEASES, 'aarch64_linux_uma': CURRENT_RELEASES, 'aarch64_linux_xl' : CURRENT_RELEASES, 'aarch64_linux_xl_cm': CURRENT_RELEASES, 'aarch64_linux_xl_uma': CURRENT_RELEASES, + 'aarch64_linux_mixed_cm' : CURRENT_RELEASES, 'ppc64_aix_ojdk292' : CURRENT_RELEASES, 'ppc64_aix_xl_ojdk292' : CURRENT_RELEASES, 'ppc64le_linux_ojdk292' : CURRENT_RELEASES, @@ -150,6 +158,7 @@ SHORT_NAMES = ['all' : ['ppc64le_linux','ppc64le_linux_xl','s390x_linux','s390x_ 'aixxl' : ['ppc64_aix_xl'], 'aixxlcm' : ['ppc64_aix_xl_cm'], 'aixxluma' : ['ppc64_aix_xl_uma'], + 'aixmxdcm' : ['ppc64_aix_mixed_cm'], 'zlinux' : ['s390x_linux'], 'zlinuxcm' : ['s390x_linux_cm'], 'zlinuxuma' : ['s390x_linux_uma'], @@ -158,6 +167,7 @@ SHORT_NAMES = ['all' : ['ppc64le_linux','ppc64le_linux_xl','s390x_linux','s390x_ 'zlinuxxl' : ['s390x_linux_xl'], 'zlinuxxlcm' : ['s390x_linux_xl_cm'], 'zlinuxxluma' : ['s390x_linux_xl_uma'], + 'zlinuxmxdcm' : ['s390x_linux_mixed_cm'], 'plinux' : ['ppc64le_linux'], 'plinuxcmake' : ['ppc64le_linux_cm'], 'plinuxcm' : ['ppc64le_linux_cm'], @@ -167,6 +177,7 @@ SHORT_NAMES = ['all' : ['ppc64le_linux','ppc64le_linux_xl','s390x_linux','s390x_ 'plinuxxl' : ['ppc64le_linux_xl'], 'plinuxxlcm' : ['ppc64le_linux_xl_cm'], 'plinuxxluma' : ['ppc64le_linux_xl_uma'], + 'plinuxmxdcm' : ['ppc64le_linux_mixed_cm'], 'xlinuxlargeheap' : ['x86-64_linux_xl'], 'xlinuxxl' : ['x86-64_linux_xl'], 'xlinux' : ['x86-64_linux'], @@ -175,6 +186,7 @@ SHORT_NAMES = ['all' : ['ppc64le_linux','ppc64le_linux_xl','s390x_linux','s390x_ 'xlinuxuma' : ['x86-64_linux_uma'], 'xlinuxxlcm' : ['x86-64_linux_xl_cm'], 'xlinuxxluma' : ['x86-64_linux_xl_uma'], + 'xlinuxmxdcm' : ['x86-64_linux_mixed_cm'], 'xlinuxjit' : ['x86-64_linux_jit'], 'xlinuxval' : ['x86-64_linux_valhalla'], 'win32' : ['x86-32_windows'], @@ -187,6 +199,7 @@ SHORT_NAMES = ['all' : ['ppc64le_linux','ppc64le_linux_xl','s390x_linux','s390x_ 'winxl' : ['x86-64_windows_xl'], 'winxlcm' : ['x86-64_windows_xl_cm'], 'winxluma' : ['x86-64_windows_xl_uma'], + 'winmxdcm' : ['x86-64_windows_mixed_cm'], 'osx' : ['x86-64_mac'], 'osxlargeheap' : ['x86-64_mac_xl'], 'osxxl' : ['x86-64_mac_xl'], @@ -195,6 +208,7 @@ SHORT_NAMES = ['all' : ['ppc64le_linux','ppc64le_linux_xl','s390x_linux','s390x_ 'osxxlcm': ['x86-64_mac_xl_cm'], 'osxuma': ['x86-64_mac_uma'], 'osxxluma': ['x86-64_mac_xl_uma'], + 'osxmxdcm': ['x86-64_mac_mixed_cm'], 'alinux64' : ['aarch64_linux'], 'alinux64cm' : ['aarch64_linux_cm'], 'alinux64uma' : ['aarch64_linux_uma'], @@ -202,12 +216,14 @@ SHORT_NAMES = ['all' : ['ppc64le_linux','ppc64le_linux_xl','s390x_linux','s390x_ 'alinux64xlcm' : ['aarch64_linux_xl_cm'], 'alinux64xluma' : ['aarch64_linux_xl_uma'], 'alinux64largeheap' : ['aarch64_linux_xl'], + 'alinux64mxdcm' : ['aarch64_linux_mixed_cm'], 'zos' : ['s390x_zos'], 'zoscm' : ['s390x_zos_cm'], 'zosuma' : ['s390x_zos_uma'], 'zosxl' : ['s390x_zos_xl'], 'zoslargeheap' : ['s390x_zos_xl'], 'zosxlcm' : ['s390x_zos_xl_cm'], + 'zosmxdcm' : ['s390x_zos_mixed_cm'], 'aixojdk292' : ['ppc64_aix_ojdk292'], 'aixxlojdk292' : ['ppc64_aix_xl_ojdk292'], 'aixlargeheapojdk292' : ['ppc64_aix_xl_ojdk292'], diff --git a/buildenv/jenkins/variables/defaults.yml b/buildenv/jenkins/variables/defaults.yml index 1fa2adf8fa4..7ef32a98f25 100644 --- a/buildenv/jenkins/variables/defaults.yml +++ b/buildenv/jenkins/variables/defaults.yml @@ -124,6 +124,11 @@ debuginfo: largeheap: extra_configure_options: '--with-noncompressedrefs' #========================================# +# Mixed references build +#========================================# +mixedrefs: + extra_configure_options: '--with-mixedrefs' +#========================================# # Build with cmake #========================================# cmake: @@ -250,6 +255,21 @@ ppc64le_linux_xl_cm: ppc64le_linux_xl_uma: extends: ['ppc64le_linux_xl', 'uma'] #========================================# +# Linux PPCLE 64bits Mixed References +#========================================# +ppc64le_linux_mixed: + extends: ['ppc64le_linux', 'mixedrefs'] + excluded_tests: + 8: + - special.system + 11: + - special.system +#========================================# +# Linux PPCLE 64bits Mixed References /w CMake +#========================================# +ppc64le_linux_mixed_cm: + extends: ['ppc64le_linux_mixed', 'cmake'] +#========================================# # Linux PPCLE 64bits Compressed Pointers /w JITSERVER #========================================# ppc64le_linux_jit: @@ -303,6 +323,19 @@ s390x_linux_xl_cm: s390x_linux_xl_uma: extends: ['s390x_linux_xl', 'uma'] #========================================# +# Linux S390 64bits Mixed References +#========================================# +s390x_linux_mixed: + extends: ['s390x_linux', 'mixedrefs'] + excluded_tests: + 11: + - special.system +#========================================# +# Linux S390 64bits Mixed References /w CMake +#========================================# +s390x_linux_mixed_cm: + extends: ['s390x_linux_mixed', 'cmake'] +#========================================# # Linux S390 64bits Compressed Pointers /w JITSERVER #========================================# s390x_linux_jit: @@ -362,6 +395,16 @@ ppc64_aix_xl_cm: ppc64_aix_xl_uma: extends: ['ppc64_aix_xl', 'uma'] #========================================# +# AIX PPC 64bits Mixed References +#========================================# +ppc64_aix_mixed: + extends: ['ppc64_aix', 'mixedrefs'] +#========================================# +# AIX PPC 64bits Mixed References /w CMake +#========================================# +ppc64_aix_mixed_cm: + extends: ['ppc64_aix_mixed', 'cmake'] +#========================================# # Linux x86 64bits Compressed Pointers #========================================# x86-64_linux: @@ -432,6 +475,21 @@ x86-64_linux_xl: 8: - special.system #========================================# +# Linux x86 64bits Mixed References +#========================================# +x86-64_linux_mixed: + extends: ['x86-64_linux', 'mixedrefs'] + excluded_tests: + - extended.functional + - sanity.system + - extended.system + - special.system +#========================================# +# Linux x86 64bits Mixed References /w CMake +#========================================# +x86-64_linux_mixed_cm: + extends: ['x86-64_linux_mixed', 'cmake'] +#========================================# # Linux x86 64bits Compressed Pointers / Valhalla #========================================# x86-64_linux_valhalla: @@ -477,6 +535,16 @@ aarch64_linux_xl_cm: aarch64_linux_xl_uma: extends: ['aarch64_linux_xl', 'uma'] #========================================# +# Linux Aarch 64bits Mixed References +#========================================# +aarch64_linux_mixed: + extends: ['aarch64_linux', 'mixedrefs'] +#========================================# +# Linux Aarch 64bits Mixed References /w CMake +#========================================# +aarch64_linux_mixed_cm: + extends: ['aarch64_linux_mixed', 'cmake'] +#========================================# # Windows x86 64bits Compressed Pointers #========================================# x86-64_windows: @@ -531,6 +599,16 @@ x86-64_windows_xl_cm: x86-64_windows_xl_uma: extends: ['x86-64_windows_xl', 'uma'] #========================================# +# Windows x86 64bits Mixed References +#========================================# +x86-64_windows_mixed: + extends: ['x86-64_windows', 'mixedrefs'] +#========================================# +# Windows x86 64bits Mixed References /w CMake +#========================================# +x86-64_windows_mixed_cm: + extends: ['x86-64_windows_mixed', 'cmake'] +#========================================# # Windows x86 32bits #========================================# x86-32_windows: @@ -598,6 +676,14 @@ x86-64_mac_xl: 8: - special.system #========================================# +# OSX x86 64bits Mixed References +#========================================# +x86-64_mac_mixed: + extends: ['x86-64_mac', 'mixedrefs'] + excluded_tests: + 8: + - special.system +#========================================# # OSX x86 64bits Compressed Pointers /w CMake #========================================# x86-64_mac_cm: @@ -608,6 +694,11 @@ x86-64_mac_cm: x86-64_mac_xl_cm: extends: ['x86-64_mac_xl', 'cmake'] #========================================# +# OSX x86 64bits Mixed References /w CMake +#========================================# +x86-64_mac_mixed_cm: + extends: ['x86-64_mac_mixed', 'cmake'] +#========================================# # OSX x86 64bits Compressed Pointers /w UMA #========================================# x86-64_mac_uma: diff --git a/doc/build-instructions/Build_Instructions_V11.md b/doc/build-instructions/Build_Instructions_V11.md index d181d415a9b..313ed1e5499 100644 --- a/doc/build-instructions/Build_Instructions_V11.md +++ b/doc/build-instructions/Build_Instructions_V11.md @@ -155,6 +155,8 @@ bash configure --with-freemarker-jar=//freemarker.jar --with-boot-j :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl={fetched|system|path_to_library}` where: @@ -282,6 +284,8 @@ where `` is the location where you stored **freemarker.jar** and `< :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl={fetched|system|path_to_library}` where: @@ -441,6 +445,8 @@ Note: there is no need to specify --with-toolchain-version for 2017 as it will b :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl=path_to_library`, where `path_to_library` specifies the path to the prebuilt OpenSSL library that you obtained in **2. Get the source**. If you want to include the OpenSSL cryptographic library in the OpenJDK binary, you must also include `--enable-openssl-bundling`. ### 4. build @@ -559,6 +565,8 @@ bash configure --with-boot-jdk= :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl=path_to_library`, where `path_to_library` specifies the path to the prebuilt OpenSSL library that you obtained in **2. Get the source**. If you want to include the OpenSSL cryptographic library in the OpenJDK binary, you must also include `--enable-openssl-bundling`. ### 4. build @@ -701,6 +709,8 @@ bash configure --openjdk-target=${OPENJ9_CC_PREFIX} \ :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that uses OpenSSL, you must specify `--with-openssl={system|path_to_library}` where: diff --git a/doc/build-instructions/Build_Instructions_V14.md b/doc/build-instructions/Build_Instructions_V14.md index c2f031e6bfc..df13a14817e 100644 --- a/doc/build-instructions/Build_Instructions_V14.md +++ b/doc/build-instructions/Build_Instructions_V14.md @@ -153,6 +153,8 @@ bash configure --with-freemarker-jar=//freemarker.jar --with-boot-j :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl={fetched|system|path_to_library}` where: @@ -281,6 +283,8 @@ where `` is the location where you stored **freemarker.jar** and `< :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl={fetched|system|path_to_library}` where: @@ -434,6 +438,8 @@ bash configure --disable-warnings-as-errors \ :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl=path_to_library`, where `path_to_library` specifies the path to the prebuilt OpenSSL library that you obtained in **2. Get the source**. If you want to include the OpenSSL cryptographic library in the OpenJDK binary, you must also include `--enable-openssl-bundling`. ### 4. build @@ -563,6 +569,8 @@ bash configure \ :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl=path_to_library`, where `path_to_library` specifies the path to the prebuilt OpenSSL library that you obtained in **2. Get the source**. If you want to include the OpenSSL cryptographic library in the OpenJDK binary, you must also include `--enable-openssl-bundling`. ### 4. build diff --git a/doc/build-instructions/Build_Instructions_V15.md b/doc/build-instructions/Build_Instructions_V15.md index 112e82fff7b..b17beca858f 100644 --- a/doc/build-instructions/Build_Instructions_V15.md +++ b/doc/build-instructions/Build_Instructions_V15.md @@ -153,6 +153,8 @@ bash configure --with-freemarker-jar=//freemarker.jar --with-boot-j :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl={fetched|system|path_to_library}` where: @@ -281,6 +283,8 @@ where `` is the location where you stored **freemarker.jar** and `< :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl={fetched|system|path_to_library}` where: @@ -434,6 +438,8 @@ bash configure --disable-warnings-as-errors \ :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl=path_to_library`, where `path_to_library` specifies the path to the prebuilt OpenSSL library that you obtained in **2. Get the source**. If you want to include the OpenSSL cryptographic library in the OpenJDK binary, you must also include `--enable-openssl-bundling`. ### 4. build @@ -563,6 +569,8 @@ bash configure \ :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl=path_to_library`, where `path_to_library` specifies the path to the prebuilt OpenSSL library that you obtained in **2. Get the source**. If you want to include the OpenSSL cryptographic library in the OpenJDK binary, you must also include `--enable-openssl-bundling`. ### 4. build diff --git a/doc/build-instructions/Build_Instructions_V8.md b/doc/build-instructions/Build_Instructions_V8.md index 6f9c58fe26d..d57478918b6 100644 --- a/doc/build-instructions/Build_Instructions_V8.md +++ b/doc/build-instructions/Build_Instructions_V8.md @@ -156,6 +156,8 @@ bash configure --with-freemarker-jar=/root/freemarker.jar --with-boot-jdk=/usr/l :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl={fetched|system|path_to_library}` where: @@ -279,6 +281,8 @@ where `` is the location where you stored **freemarker.jar** and `< :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl={fetched|system|path_to_library}` where: @@ -464,6 +468,8 @@ bash configure --disable-ccache \ :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl=path_to_library`, where `path_to_library` specifies the path to the prebuilt OpenSSL library that you obtained in **2. Get the source**. If you want to include the OpenSSL cryptographic library in the OpenJDK binary, you must also include `--enable-openssl-bundling`. ### 4. build @@ -615,6 +621,8 @@ bash configure \ :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that includes OpenSSL, you must specify `--with-openssl=path_to_library`, where `path_to_library` specifies the path to the prebuilt OpenSSL library that you obtained in **2. Get the source**. If you want to include the OpenSSL cryptographic library in the OpenJDK binary, you must also include `--enable-openssl-bundling`. ### 4. build @@ -718,6 +726,8 @@ bash configure --with-freemarker-jar=//freemarker.jar --with-boot-jdk=/ :pencil: **Non-compressed references support:** If you require a heap size greater than 57GB, enable a noncompressedrefs build with the `--with-noncompressedrefs` option during this step. +:pencil: **Mixed references support:** If you require a single build with both compressed references and non-compressed references available, enable a mixedrefs build with the `--with-mixedrefs` option during this step. Specify `--with-mixedrefs=static` for the VM to determine the reference mode statically (at compile time), or `--with-mixedrefs=dynamic` for the VM to determine the reference mode dynamically (at run time). The option defaults to determine the reference mode statically, if neither `static` nor `dynamic` is provided. _Note that `--with-cmake` must be used with this option, as it is only available with CMake enabled at this time._ + :pencil: **OpenSSL support:** If you want to build an OpenJDK that uses OpenSSL, you must specify `--with-openssl={system|path_to_library}` where: diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index 874113b99ea..9870cb84a7b 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -299,12 +299,14 @@ target_link_libraries(j9vm_main_wrapper # set up glue library target names # See https://github.com/eclipse/omr/blob/master/doc/BuildingWithCMake.md set(OMR_GC_GLUE_TARGET "j9vm_gc_glue" CACHE INTERNAL "") +set(OMR_GC_GLUE_FULL_TARGET "j9vm_gc_glue_full" CACHE INTERNAL "") set(OMR_RAS_GLUE_TARGET "j9vm_ras_glue" CACHE INTERNAL "") set(OMR_CORE_GLUE_TARGET "j9vm_core_glue" CACHE INTERNAL "") set(OMR_UTIL_GLUE_TARGET "j9vm_util_glue" CACHE INTERNAL "") # setup OMR library overrides set(OMR_GC_LIB "j9gc" CACHE INTERNAL "") +set(OMR_GC_FULL_LIB "j9gc_full" CACHE INTERNAL "") set(OMR_HOOK_LIB "j9hookable" CACHE INTERNAL "") set(OMR_PORT_LIB "j9prt" CACHE INTERNAL "") set(OMR_THREAD_LIB "j9thr" CACHE INTERNAL "") @@ -312,12 +314,19 @@ set(OMR_TRACE_LIB "j9trc" CACHE INTERNAL "") set(OMR_DDR_SET "j9ddr" CACHE INTERNAL "") -add_subdirectory(gc_glue_java) +# 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. +j9vm_add_library(${OMR_GC_GLUE_TARGET} INTERFACE) +j9vm_add_library(${OMR_GC_GLUE_FULL_TARGET} INTERFACE) + # hack to add our binary dir to omr include path # needed to grab the headers created by trace/hookgen include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_subdirectory("${J9VM_OMR_DIR}" omr) +add_subdirectory(gc_glue_java) + # Configure our DDR set if(OMR_DDR) make_ddr_set(j9ddr) diff --git a/runtime/cmake/caches/aix_ppc-64_mxdptrs.cmake b/runtime/cmake/caches/aix_ppc-64_mxdptrs.cmake new file mode 100644 index 00000000000..1e8a228f419 --- /dev/null +++ b/runtime/cmake/caches/aix_ppc-64_mxdptrs.cmake @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2020, 2020 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception +################################################################################ + +include(${CMAKE_CURRENT_LIST_DIR}/mxdptrs.cmake) +include("${CMAKE_CURRENT_LIST_DIR}/aix_ppc-64.cmake") diff --git a/runtime/cmake/caches/linux_390-64_mxdptrs.cmake b/runtime/cmake/caches/linux_390-64_mxdptrs.cmake new file mode 100644 index 00000000000..6f3b814318e --- /dev/null +++ b/runtime/cmake/caches/linux_390-64_mxdptrs.cmake @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2020, 2020 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception +################################################################################ + +include("${CMAKE_CURRENT_LIST_DIR}/mxdptrs.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/linux_390-64.cmake") diff --git a/runtime/cmake/caches/linux_aarch64_mxdptrs.cmake b/runtime/cmake/caches/linux_aarch64_mxdptrs.cmake new file mode 100644 index 00000000000..a3f766bd128 --- /dev/null +++ b/runtime/cmake/caches/linux_aarch64_mxdptrs.cmake @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2020, 2020 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception +################################################################################ + +include("${CMAKE_CURRENT_LIST_DIR}/mxdptrs.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/linux_aarch64.cmake") diff --git a/runtime/cmake/caches/linux_ppc-64_mxdptrs_le.cmake b/runtime/cmake/caches/linux_ppc-64_mxdptrs_le.cmake new file mode 100644 index 00000000000..34535e891a2 --- /dev/null +++ b/runtime/cmake/caches/linux_ppc-64_mxdptrs_le.cmake @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2020, 2020 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception +################################################################################ + +include("${CMAKE_CURRENT_LIST_DIR}/mxdptrs.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/linux_ppc-64_le.cmake") diff --git a/runtime/cmake/caches/linux_x86-64_mxdptrs.cmake b/runtime/cmake/caches/linux_x86-64_mxdptrs.cmake new file mode 100644 index 00000000000..4af743ef9f0 --- /dev/null +++ b/runtime/cmake/caches/linux_x86-64_mxdptrs.cmake @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2020, 2020 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception +################################################################################ + +include(${CMAKE_CURRENT_LIST_DIR}/mxdptrs.cmake) +include("${CMAKE_CURRENT_LIST_DIR}/linux_x86-64.cmake") diff --git a/runtime/cmake/caches/mxdptrs.cmake b/runtime/cmake/caches/mxdptrs.cmake new file mode 100644 index 00000000000..469117795eb --- /dev/null +++ b/runtime/cmake/caches/mxdptrs.cmake @@ -0,0 +1,28 @@ +################################################################################ +# Copyright (c) 2020, 2020 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception +################################################################################ + +set(OMR_GC_POINTER_MODE "mixed" CACHE STRING "") + +# OMR_MIXED_REFERENCES_MODE is set to 'static' or 'dynamic' in the extensions CMAKE_ARGS, but a default value is provided here just in case +set(OMR_MIXED_REFERENCES_MODE "static" CACHE STRING "") + +include(${CMAKE_CURRENT_LIST_DIR}/cmprssptrs.cmake) diff --git a/runtime/cmake/caches/osx_x86-64_cmprssptrs.cmake b/runtime/cmake/caches/osx_x86-64_cmprssptrs.cmake index 6557be3700f..09765ab6f3d 100644 --- a/runtime/cmake/caches/osx_x86-64_cmprssptrs.cmake +++ b/runtime/cmake/caches/osx_x86-64_cmprssptrs.cmake @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2018, 2019, 2019 IBM Corp. and others +# Copyright (c) 2018, 2020 IBM Corp. and others # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License 2.0 which accompanies this diff --git a/runtime/cmake/caches/osx_x86-64_mxdptrs.cmake b/runtime/cmake/caches/osx_x86-64_mxdptrs.cmake new file mode 100644 index 00000000000..c73d3fa76db --- /dev/null +++ b/runtime/cmake/caches/osx_x86-64_mxdptrs.cmake @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2020, 2020 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception +################################################################################ + +include(${CMAKE_CURRENT_LIST_DIR}/mxdptrs.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/osx_x86-64.cmake) diff --git a/runtime/cmake/caches/win_x86-64_mxdptrs.cmake b/runtime/cmake/caches/win_x86-64_mxdptrs.cmake new file mode 100644 index 00000000000..5d9e920c696 --- /dev/null +++ b/runtime/cmake/caches/win_x86-64_mxdptrs.cmake @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2020, 2020 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception +################################################################################ + +include("${CMAKE_CURRENT_LIST_DIR}/mxdptrs.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/win_x86-64.cmake") diff --git a/runtime/compiler/control/DLLMain.cpp b/runtime/compiler/control/DLLMain.cpp index 60e6fe4d57e..032323410e3 100644 --- a/runtime/compiler/control/DLLMain.cpp +++ b/runtime/compiler/control/DLLMain.cpp @@ -221,7 +221,8 @@ IDATA J9VMDllMain(J9JavaVM* vm, IDATA stage, void * reserved) #endif//TR_HOST_X86 ) { - J9VMDllLoadInfo* gcLoadInfo = FIND_DLL_TABLE_ENTRY( J9_GC_DLL_NAME ); + J9VMDllLoadInfo *gcLoadInfo = getGCDllLoadInfo(vm); + if (!IS_STAGE_COMPLETED(gcLoadInfo->completedBits, JCL_INITIALIZED) )//&& vm->memoryManagerFunctions) { vm->memoryManagerFunctions->allocateZeroedTLHPages(vm, true); diff --git a/runtime/gc/CMakeLists.txt b/runtime/gc/CMakeLists.txt index af77ecbe24c..e78b69875be 100644 --- a/runtime/gc/CMakeLists.txt +++ b/runtime/gc/CMakeLists.txt @@ -20,11 +20,14 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9gc SHARED - OUTPUT_NAME j9gc${J9VM_VERSION_SUFFIX} +set(gc_sources dllinit.c gctable.c +) +j9vm_add_library(j9gc SHARED + OUTPUT_NAME j9gc${J9VM_VERSION_SUFFIX} + ${gc_sources} ) if(OMR_TOOLCONFIG STREQUAL "msvc") @@ -95,3 +98,76 @@ install( LIBRARY DESTINATION ${j9vm_SOURCE_DIR} RUNTIME DESTINATION ${j9vm_SOURCE_DIR} ) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9gc_full SHARED + OUTPUT_NAME j9gc_full${J9VM_VERSION_SUFFIX} + ${gc_sources} + ) + + if(OMR_TOOLCONFIG STREQUAL "msvc") + target_compile_options(j9gc_full PRIVATE /w34189) + endif() + + target_link_libraries(j9gc_full + PRIVATE + j9vm_interface + + j9util + j9utilcore + j9avl + j9thr + j9stackmap + j9pool + omrgc_full #LINKING HACK + j9hookable + j9gcbase_full + j9gcstructs_full + j9gcstats_full + j9gcapi_full + j9modronstartup_full + j9gctrc_full + j9gctrcstandard_full + j9gctrcvlhgc_full + j9realtime_full + j9gcvlhgc_full + omrgc_full #LINKING HACK + + #TODO: this is hack to make linking work. + # Need to figure out why we need this in CMake but not UMA + j9modronstandard_full + j9gcbase_full + j9hashtable + j9gcbase_full + j9modronstandard_full + j9realtime_full + j9gcvlhgc_full + j9gcbase_full + + j9thr + ) + + if(OMR_NEED_LIBRT) + target_link_libraries(j9gc_full PRIVATE rt) + endif() + + if(OMR_HOST_OS STREQUAL "linux") + target_link_libraries(j9gc_full PRIVATE pthread) + endif() + + target_include_directories(j9gc_full + PUBLIC + $ + ) + + omr_add_exports(j9gc_full + JVM_OnLoad + J9VMDllMain + ) + + install( + TARGETS j9gc_full + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} + ) +endif() diff --git a/runtime/gc/dllinit.c b/runtime/gc/dllinit.c index 98469534037..c745354856b 100644 --- a/runtime/gc/dllinit.c +++ b/runtime/gc/dllinit.c @@ -1,6 +1,6 @@ /******************************************************************************* - * Copyright (c) 1991, 2019 IBM Corp. and others + * Copyright (c) 1991, 2020 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -32,6 +32,7 @@ #include "jvminit.h" #include "mminit.h" #include "ModronAssertions.h" +#include "util_api.h" jint JNICALL JVM_OnLoad( JavaVM *jvm, char* commandLineOptions, void *reserved ) @@ -52,9 +53,9 @@ JVM_OnLoad( JavaVM *jvm, char* commandLineOptions, void *reserved ) IDATA J9VMDllMain(J9JavaVM* vm, IDATA stage, void* reserved) { - J9VMDllLoadInfo* loadInfo = FIND_DLL_TABLE_ENTRY( THIS_DLL_NAME ); IDATA rc = J9VMDLLMAIN_OK; - + J9VMDllLoadInfo *loadInfo = getGCDllLoadInfo(vm); + switch (stage) { case PORT_LIBRARY_GUARANTEED: case ALL_DEFAULT_LIBRARIES_LOADED: diff --git a/runtime/gc_api/CMakeLists.txt b/runtime/gc_api/CMakeLists.txt index 5a273d7a0db..04b74ebb8c0 100644 --- a/runtime/gc_api/CMakeLists.txt +++ b/runtime/gc_api/CMakeLists.txt @@ -20,7 +20,7 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9gcapi STATIC +set(gc_api_sources GuaranteedNurseryRange.cpp HeapIteratorAPI.cpp HeapIteratorAPIBufferedIterator.cpp @@ -28,6 +28,10 @@ j9vm_add_library(j9gcapi STATIC HeapRootScanner.cpp ) +j9vm_add_library(j9gcapi STATIC + ${gc_api_sources} +) + target_link_libraries(j9gcapi PRIVATE j9vm_interface @@ -35,3 +39,17 @@ target_link_libraries(j9gcapi omrgc ) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9gcapi_full STATIC + ${gc_api_sources} + ) + + target_link_libraries(j9gcapi_full + PRIVATE + j9vm_interface + j9vm_gc_includes + + omrgc_full + ) +endif() diff --git a/runtime/gc_base/CMakeLists.txt b/runtime/gc_base/CMakeLists.txt index 81348702f9f..9801976b3f2 100644 --- a/runtime/gc_base/CMakeLists.txt +++ b/runtime/gc_base/CMakeLists.txt @@ -20,7 +20,7 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9gcbase STATIC +set(gc_base_sources accessBarrier.cpp AsyncCallbackHandler.cpp ClassLoaderLinkedListIterator.cpp @@ -55,6 +55,10 @@ j9vm_add_library(j9gcbase STATIC WorkPacketsIterator.cpp ) +j9vm_add_library(j9gcbase STATIC + ${gc_base_sources} +) + target_link_libraries(j9gcbase PRIVATE j9vm_interface @@ -64,3 +68,16 @@ target_link_libraries(j9gcbase target_enable_ddr(j9gcbase GLOB_HEADERS) ddr_set_add_targets(j9ddr j9gcbase) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9gcbase_full STATIC + ${gc_base_sources} + ) + + target_link_libraries(j9gcbase_full + PRIVATE + j9vm_interface + j9vm_gc_includes + omrgc_full + ) +endif() diff --git a/runtime/gc_check/CMakeLists.txt b/runtime/gc_check/CMakeLists.txt index fa3dffffaae..25af126c661 100644 --- a/runtime/gc_check/CMakeLists.txt +++ b/runtime/gc_check/CMakeLists.txt @@ -20,7 +20,7 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9gccheck STATIC +set(gc_check_sources Check.cpp CheckClassHeap.cpp CheckClassLoaders.cpp @@ -46,6 +46,10 @@ j9vm_add_library(j9gccheck STATIC ScanFormatter.cpp ) +j9vm_add_library(j9gccheck STATIC + ${gc_check_sources} +) + target_include_directories(j9gccheck PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} @@ -60,3 +64,24 @@ target_link_libraries(j9gccheck j9gcstructs j9gcstats ) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9gccheck_full STATIC + ${gc_check_sources} + ) + + target_include_directories(j9gccheck_full + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ) + + target_link_libraries(j9gccheck_full + PRIVATE + j9vm_interface + + omrgc_full + j9gcbase_full + j9gcstructs_full + j9gcstats_full + ) +endif() diff --git a/runtime/gc_glue_java/CMakeLists.txt b/runtime/gc_glue_java/CMakeLists.txt index dfdab3ba164..ff114ea7700 100644 --- a/runtime/gc_glue_java/CMakeLists.txt +++ b/runtime/gc_glue_java/CMakeLists.txt @@ -20,32 +20,36 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9vm_gc_glue INTERFACE) +set(j9vm_gc_glue_sources + ${CMAKE_CURRENT_SOURCE_DIR}/ArrayletObjectModel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ArrayletObjectModelBase.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/CollectorLanguageInterfaceImpl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/CompactDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/CompactSchemeFixupObject.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/CompactSchemeFixupRoots.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ConcurrentMarkingDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ConcurrentSafepointCallbackJava.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/EnvironmentDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/GlobalCollectorDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/JNICriticalRegion.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MarkingDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MarkingSchemeRootClearer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MarkingSchemeRootMarker.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MetronomeDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/MixedObjectModel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ObjectModel.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ObjectModelDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ScavengerBackOutScanner.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ScavengerDelegate.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ScavengerRootClearer.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ScavengerRootScanner.cpp +) + target_sources(j9vm_gc_glue INTERFACE - ${CMAKE_CURRENT_SOURCE_DIR}/ArrayletObjectModel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ArrayletObjectModelBase.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/CollectorLanguageInterfaceImpl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/CompactDelegate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/CompactSchemeFixupObject.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/CompactSchemeFixupRoots.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ConcurrentMarkingDelegate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ConcurrentSafepointCallbackJava.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/EnvironmentDelegate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/GlobalCollectorDelegate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/JNICriticalRegion.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/MarkingDelegate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/MarkingSchemeRootClearer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/MarkingSchemeRootMarker.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/MetronomeDelegate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/MixedObjectModel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ObjectModel.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ObjectModelDelegate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ScavengerBackOutScanner.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ScavengerDelegate.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ScavengerRootClearer.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ScavengerRootScanner.cpp + ${j9vm_gc_glue_sources} ) + target_link_libraries(j9vm_gc_glue INTERFACE j9vm_interface @@ -57,6 +61,7 @@ target_link_libraries(j9vm_gc_glue j9gcstats j9util ) + target_include_directories(j9vm_gc_glue INTERFACE ${j9vm_SOURCE_DIR}/gc_modron_standard @@ -64,6 +69,34 @@ target_include_directories(j9vm_gc_glue ${j9vm_SOURCE_DIR}/gc_trace ${j9vm_SOURCE_DIR}/gc_vlhgc ) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + target_sources(j9vm_gc_glue_full + INTERFACE + ${j9vm_gc_glue_sources} + ) + + target_link_libraries(j9vm_gc_glue_full + INTERFACE + j9vm_interface + j9vm_gc_includes + + j9modronstandard_full + j9gcvlhgc_full + j9realtime_full + j9gcstats_full + j9util + ) + + target_include_directories(j9vm_gc_glue_full + INTERFACE + ${j9vm_SOURCE_DIR}/gc_modron_standard + ${j9vm_SOURCE_DIR}/gc_realtime + ${j9vm_SOURCE_DIR}/gc_trace + ${j9vm_SOURCE_DIR}/gc_vlhgc + ) +endif() + j9vm_add_library(j9vm_util_glue INTERFACE) target_sources(j9vm_util_glue INTERFACE diff --git a/runtime/gc_modron_standard/CMakeLists.txt b/runtime/gc_modron_standard/CMakeLists.txt index 056678314f3..add9dc78dc8 100644 --- a/runtime/gc_modron_standard/CMakeLists.txt +++ b/runtime/gc_modron_standard/CMakeLists.txt @@ -20,7 +20,7 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9modronstandard STATIC +set(gc_modron_standard_sources ConcurrentSweepGC.cpp OwnableSynchronizerObjectBufferStandard.cpp ReadBarrierVerifier.cpp @@ -30,6 +30,10 @@ j9vm_add_library(j9modronstandard STATIC UnfinalizedObjectBufferStandard.cpp ) +j9vm_add_library(j9modronstandard STATIC + ${gc_modron_standard_sources} +) + target_link_libraries(j9modronstandard PRIVATE j9vm_interface @@ -38,3 +42,18 @@ target_link_libraries(j9modronstandard omrgc j9gcbase ) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9modronstandard_full STATIC + ${gc_modron_standard_sources} + ) + + target_link_libraries(j9modronstandard_full + PRIVATE + j9vm_interface + j9vm_gc_includes + + omrgc_full + j9gcbase_full + ) +endif() diff --git a/runtime/gc_modron_startup/CMakeLists.txt b/runtime/gc_modron_startup/CMakeLists.txt index a28465d7a85..978c088a406 100644 --- a/runtime/gc_modron_startup/CMakeLists.txt +++ b/runtime/gc_modron_startup/CMakeLists.txt @@ -20,7 +20,7 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9modronstartup STATIC +set(gc_modron_startup_sources arrayCopy.cpp gcmspace.cpp GCVerboseInterface.cpp @@ -33,16 +33,22 @@ j9vm_add_library(j9modronstartup STATIC mmparseXXgc.cpp ) +j9vm_add_library(j9modronstartup STATIC + ${gc_modron_startup_sources} +) + target_include_directories(j9modronstartup PUBLIC . ) + if(OMR_OS_ZOS) target_include_directories(j9modronstartup PRIVATE "${omr_SOURCE_DIR}/port/zos390" ) endif() + target_link_libraries(j9modronstartup PRIVATE j9vm_interface @@ -52,3 +58,31 @@ target_link_libraries(j9modronstartup j9gcbase j9utilcore ) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9modronstartup_full STATIC + ${gc_modron_startup_sources} + ) + + target_include_directories(j9modronstartup_full + PUBLIC + . + ) + + if(OMR_OS_ZOS) + target_include_directories(j9modronstartup_full + PRIVATE + "${omr_SOURCE_DIR}/port/zos390" + ) + endif() + + target_link_libraries(j9modronstartup_full + PRIVATE + j9vm_interface + + omrgc_full + j9gcstats_full + j9gcbase_full + j9utilcore + ) +endif() diff --git a/runtime/gc_modron_startup/mminit.cpp b/runtime/gc_modron_startup/mminit.cpp index 815e7e7b2e6..523c047246e 100644 --- a/runtime/gc_modron_startup/mminit.cpp +++ b/runtime/gc_modron_startup/mminit.cpp @@ -218,16 +218,16 @@ initializeMutatorModelJava(J9VMThread* vmThread) void cleanupMutatorModelJava(J9VMThread* vmThread) { - J9VMDllLoadInfo* loadInfo; - J9JavaVM* vm = vmThread->javaVM; MM_EnvironmentBase *env = MM_EnvironmentBase::getEnvironment(vmThread->omrVMThread); if (NULL != env) { + J9JavaVM *vm = vmThread->javaVM; + J9VMDllLoadInfo *loadInfo = getGCDllLoadInfo(vm); + /* cleanupMutatorModelJava is called as part of the main vmThread shutdown, which happens after * gcCleanupHeapStructures has been called. We should therefore only flush allocation caches * if there is still a heap. */ - loadInfo = FIND_DLL_TABLE_ENTRY(THIS_DLL_NAME); if (!IS_STAGE_COMPLETED(loadInfo->completedBits, HEAP_STRUCTURES_FREED)) { /* this can only be called if the heap still exists since it will ask the TLH chunk to be abandoned with crashes if the heap is deallocated */ GC_OMRVMThreadInterface::flushCachesForGC(env); @@ -311,7 +311,7 @@ j9gc_initialize_heap(J9JavaVM *vm, IDATA *memoryParameterTable, UDATA heapBytesR MM_EnvironmentBase env(vm->omrVM); MM_GlobalCollector *globalCollector; PORT_ACCESS_FROM_JAVAVM(vm); - J9VMDllLoadInfo *loadInfo = FIND_DLL_TABLE_ENTRY(THIS_DLL_NAME); + J9VMDllLoadInfo *loadInfo = getGCDllLoadInfo(vm); if (J9_ARE_ANY_BITS_SET(vm->extendedRuntimeFlags2, J9_EXTENDED_RUNTIME2_ENABLE_PORTABLE_SHARED_CACHE)) { extensions->shouldForceLowMemoryHeapCeilingShiftIfPossible = true; @@ -515,7 +515,7 @@ gcInitializeHeapStructures(J9JavaVM *vm) MM_MemorySpace *defaultMemorySpace; MM_GCExtensions *extensions = MM_GCExtensions::getExtensions(vm); - J9VMDllLoadInfo *loadInfo = FIND_DLL_TABLE_ENTRY(THIS_DLL_NAME); + J9VMDllLoadInfo *loadInfo = getGCDllLoadInfo(vm); /* For now, number of segments to default in pool */ if ((vm->memorySegments = vm->internalVMFunctions->allocateMemorySegmentList(vm, 10, OMRMEM_CATEGORY_VM)) == NULL) { @@ -2831,8 +2831,7 @@ configurateGCWithPolicyAndOptions(OMR_VM* omrVM) jint gcInitializeDefaults(J9JavaVM* vm) { - J9VMDllLoadInfo *loadInfo = FIND_DLL_TABLE_ENTRY(THIS_DLL_NAME); - + J9VMDllLoadInfo *loadInfo = getGCDllLoadInfo(vm); UDATA tableSize = (opt_none + 1) * sizeof(IDATA); UDATA realtimeSizeClassesAllocationSize = ROUND_TO(sizeof(UDATA), sizeof(J9VMGCSizeClasses)); IDATA *memoryParameterTable; diff --git a/runtime/gc_modron_startup/mminit.h b/runtime/gc_modron_startup/mminit.h index 27b63a924ea..4bcc2b49874 100644 --- a/runtime/gc_modron_startup/mminit.h +++ b/runtime/gc_modron_startup/mminit.h @@ -1,6 +1,6 @@ /******************************************************************************* - * Copyright (c) 1991, 2019 IBM Corp. and others + * Copyright (c) 1991, 2020 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -35,8 +35,6 @@ struct J9JavaVM; struct J9VMThread; -#define THIS_DLL_NAME J9_GC_DLL_NAME - #ifdef __cplusplus extern "C" { #endif @@ -51,7 +49,6 @@ jint triggerGCInitialized(J9VMThread* vmThread); void gcExpandHeapOnStartup(J9JavaVM *javaVM); - #ifdef __cplusplus } /* extern "C" { */ #endif diff --git a/runtime/gc_realtime/CMakeLists.txt b/runtime/gc_realtime/CMakeLists.txt index 7f3fdf114cf..0b0a717daac 100644 --- a/runtime/gc_realtime/CMakeLists.txt +++ b/runtime/gc_realtime/CMakeLists.txt @@ -20,7 +20,7 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9realtime STATIC +set(gc_realtime_sources AllocationContextRealtime.cpp ConfigurationRealtime.cpp EnvironmentRealtime.cpp @@ -48,7 +48,10 @@ j9vm_add_library(j9realtime STATIC UtilizationTracker.cpp WorkPacketsRealtime.cpp YieldCollaborator.cpp +) +j9vm_add_library(j9realtime STATIC + ${gc_realtime_sources} ) target_link_libraries(j9realtime @@ -62,3 +65,21 @@ target_link_libraries(j9realtime if(OMR_OS_WINDOWS) target_link_libraries(j9realtime PRIVATE winmm.lib) endif() + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9realtime_full STATIC + ${gc_realtime_sources} + ) + + target_link_libraries(j9realtime_full + PRIVATE + j9vm_interface + + omrgc_full + j9gcbase_full + ) + + if(OMR_OS_WINDOWS) + target_link_libraries(j9realtime_full PRIVATE winmm.lib) + endif() +endif() diff --git a/runtime/gc_stats/CMakeLists.txt b/runtime/gc_stats/CMakeLists.txt index 09f3bb718c2..2464de7b6c4 100644 --- a/runtime/gc_stats/CMakeLists.txt +++ b/runtime/gc_stats/CMakeLists.txt @@ -20,13 +20,17 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9gcstats STATIC +set(gc_stats_sources CopyForwardStats.cpp FrequentObjectsStats.cpp MarkJavaStats.cpp ScavengerJavaStats.cpp ) +j9vm_add_library(j9gcstats STATIC + ${gc_stats_sources} +) + target_include_directories(j9gcstats PUBLIC .) target_link_libraries(j9gcstats @@ -38,3 +42,21 @@ target_link_libraries(j9gcstats j9gcbase j9utilcore ) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9gcstats_full STATIC + ${gc_stats_sources} + ) + + target_include_directories(j9gcstats_full PUBLIC .) + + target_link_libraries(j9gcstats_full + PRIVATE + j9vm_interface + j9vm_gc_includes + + omrgc_full + j9gcbase_full + j9utilcore + ) +endif() diff --git a/runtime/gc_structs/CMakeLists.txt b/runtime/gc_structs/CMakeLists.txt index d0d6e25fc80..4a734926798 100644 --- a/runtime/gc_structs/CMakeLists.txt +++ b/runtime/gc_structs/CMakeLists.txt @@ -20,7 +20,7 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9gcstructs STATIC +set(gc_structs_sources ArrayletLeafIterator.cpp CallSitesIterator.cpp ClassArrayClassSlotIterator.cpp @@ -53,10 +53,28 @@ j9vm_add_library(j9gcstructs STATIC VMThreadStackSlotIterator.cpp ) -target_link_libraries(j9gcstructs +j9vm_add_library(j9gcstructs STATIC + ${gc_structs_sources} +) + +target_link_libraries(j9gcstructs PRIVATE j9vm_interface j9vm_gc_includes omrgc ) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9gcstructs_full STATIC + ${gc_structs_sources} + ) + + target_link_libraries(j9gcstructs_full + PRIVATE + j9vm_interface + j9vm_gc_includes + + omrgc_full + ) +endif() diff --git a/runtime/gc_tests/rwlocktests/CMakeLists.txt b/runtime/gc_tests/rwlocktests/CMakeLists.txt index 6f04f7929e0..97984ec70ac 100644 --- a/runtime/gc_tests/rwlocktests/CMakeLists.txt +++ b/runtime/gc_tests/rwlocktests/CMakeLists.txt @@ -20,11 +20,15 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_executable(gc_rwlocktest +set(gc_rwlocktest_sources gc_rwlocktest.cpp main.cpp ) +j9vm_add_executable(gc_rwlocktest + ${gc_rwlocktest_sources} +) + target_link_libraries(gc_rwlocktest PRIVATE j9vm_interface @@ -48,3 +52,33 @@ install( TARGETS gc_rwlocktest RUNTIME DESTINATION ${j9vm_SOURCE_DIR} ) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_executable(gc_rwlocktest_full + ${gc_rwlocktest_sources} + ) + + target_link_libraries(gc_rwlocktest_full + PRIVATE + j9vm_interface + j9vm_gc_includes + j9vm_main_wrapper + + thread_cutest_harness + j9prt + j9util + j9utilcore + j9thr + j9exelib + j9avl + j9hashtable + j9pool + j9gcbase_full + omrgc_full + ) + + install( + TARGETS gc_rwlocktest_full + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} + ) +endif() diff --git a/runtime/gc_trace/CMakeLists.txt b/runtime/gc_trace/CMakeLists.txt index 1332de47db5..42ae0f6b72c 100644 --- a/runtime/gc_trace/CMakeLists.txt +++ b/runtime/gc_trace/CMakeLists.txt @@ -20,7 +20,7 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9gctrc STATIC +set(gc_trace_sources Tgc.cpp TgcAllocation.cpp TgcAllocationContext.cpp @@ -42,6 +42,10 @@ j9vm_add_library(j9gctrc STATIC TgcTerse.cpp ) +j9vm_add_library(j9gctrc STATIC + ${gc_trace_sources} +) + target_include_directories(j9gctrc PRIVATE ${j9vm_SOURCE_DIR}/gc_trace_standard @@ -56,3 +60,22 @@ target_link_libraries(j9gctrc omrgc ) +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9gctrc_full STATIC + ${gc_trace_sources} + ) + + target_include_directories(j9gctrc_full + PRIVATE + ${j9vm_SOURCE_DIR}/gc_trace_standard + ${j9vm_SOURCE_DIR}/gc_trace_vlhgc + ) + + target_link_libraries(j9gctrc_full + PRIVATE + j9vm_interface + j9vm_gc_includes + + omrgc_full + ) +endif() diff --git a/runtime/gc_trace_standard/CMakeLists.txt b/runtime/gc_trace_standard/CMakeLists.txt index 6f659026ad0..2512d539e87 100644 --- a/runtime/gc_trace_standard/CMakeLists.txt +++ b/runtime/gc_trace_standard/CMakeLists.txt @@ -20,12 +20,16 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9gctrcstandard STATIC +set(gc_trace_standard_sources TgcCompaction.cpp TgcFreeListSummary.cpp TgcLargeAllocation.cpp ) +j9vm_add_library(j9gctrcstandard STATIC + ${gc_trace_standard_sources} +) + target_link_libraries(j9gctrcstandard PRIVATE j9vm_interface @@ -33,3 +37,15 @@ target_link_libraries(j9gctrcstandard omrgc ) +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9gctrcstandard_full STATIC + ${gc_trace_standard_sources} + ) + + target_link_libraries(j9gctrcstandard_full + PRIVATE + j9vm_interface + + omrgc_full + ) +endif() diff --git a/runtime/gc_trace_vlhgc/CMakeLists.txt b/runtime/gc_trace_vlhgc/CMakeLists.txt index 1ea2f83afc5..1d4cbbb6be3 100644 --- a/runtime/gc_trace_vlhgc/CMakeLists.txt +++ b/runtime/gc_trace_vlhgc/CMakeLists.txt @@ -20,7 +20,7 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9gctrcvlhgc STATIC +set(gc_trace_vlhgc_sources TgcDynamicCollectionSet.cpp TgcIntelligentCompact.cpp TgcInterRegionReferences.cpp @@ -31,8 +31,22 @@ j9vm_add_library(j9gctrcvlhgc STATIC TgcWriteOnceCompactTiming.cpp ) +j9vm_add_library(j9gctrcvlhgc STATIC + ${gc_trace_vlhgc_sources} +) + target_link_libraries(j9gctrcvlhgc PRIVATE omrgc ) +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9gctrcvlhgc_full STATIC + ${gc_trace_vlhgc_sources} + ) + + target_link_libraries(j9gctrcvlhgc_full + PRIVATE + omrgc_full + ) +endif() diff --git a/runtime/gc_vlhgc/CMakeLists.txt b/runtime/gc_vlhgc/CMakeLists.txt index d887d590a35..d189e19c7c4 100644 --- a/runtime/gc_vlhgc/CMakeLists.txt +++ b/runtime/gc_vlhgc/CMakeLists.txt @@ -20,7 +20,7 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ -j9vm_add_library(j9gcvlhgc STATIC +set(gc_vlhgc_sources AllocationContextBalanced.cpp AllocationContextTarok.cpp CardListFlushTask.cpp @@ -79,8 +79,12 @@ j9vm_add_library(j9gcvlhgc STATIC WorkPacketsVLHGC.cpp WriteOnceCompactor.cpp WriteOnceFixupCardCleaner.cpp +) +j9vm_add_library(j9gcvlhgc STATIC + ${gc_vlhgc_sources} ) + target_link_libraries(j9gcvlhgc PRIVATE j9vm_interface @@ -89,3 +93,18 @@ target_link_libraries(j9gcvlhgc j9gcstructs j9gcbase ) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9gcvlhgc_full STATIC + ${gc_vlhgc_sources} + ) + + target_link_libraries(j9gcvlhgc_full + PRIVATE + j9vm_interface + + omrgc_full + j9gcstructs_full + j9gcbase_full + ) +endif() diff --git a/runtime/gcchk/CMakeLists.txt b/runtime/gcchk/CMakeLists.txt index c0a5ac1204f..d185210538e 100644 --- a/runtime/gcchk/CMakeLists.txt +++ b/runtime/gcchk/CMakeLists.txt @@ -20,9 +20,13 @@ # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception ################################################################################ +set(gcchk_sources + gcchk.cpp +) + j9vm_add_library(j9gcchk SHARED OUTPUT_NAME j9gcchk${J9VM_VERSION_SUFFIX} - gcchk.cpp + ${gcchk_sources} ) target_link_libraries(j9gcchk @@ -36,7 +40,7 @@ target_link_libraries(j9gcchk j9stackmap j9pool j9hookable - + #TODO do we just want to link against j9gc? j9gcbase j9gcstructs @@ -52,3 +56,38 @@ install( LIBRARY DESTINATION ${j9vm_SOURCE_DIR} RUNTIME DESTINATION ${j9vm_SOURCE_DIR} ) + +if(OMR_MIXED_REFERENCES_MODE_STATIC) + j9vm_add_library(j9gcchk_full SHARED + OUTPUT_NAME j9gcchk_full${J9VM_VERSION_SUFFIX} + ${gcchk_sources} + ) + + target_link_libraries(j9gcchk_full + PRIVATE + j9vm_interface + j9util + j9utilcore + j9avl + j9hashtable + j9thr + j9stackmap + j9pool + j9hookable + + #TODO do we just want to link against j9gc? + j9gcbase_full + j9gcstructs_full + j9gcstats_full + j9gccheck_full + omrgc_full + ) + + omr_add_exports(j9gcchk_full J9VMDllMain) + + install( + TARGETS j9gcchk_full + LIBRARY DESTINATION ${j9vm_SOURCE_DIR} + RUNTIME DESTINATION ${j9vm_SOURCE_DIR} + ) +endif() diff --git a/runtime/include/j9lib.h.in b/runtime/include/j9lib.h.in index 3437dfd5c42..1df44b0dcb5 100644 --- a/runtime/include/j9lib.h.in +++ b/runtime/include/j9lib.h.in @@ -42,14 +42,16 @@ extern"C"{ #define J9_CUDA4J_DLL_NAME "cuda4j29" #define J9_ZOS_IFA_SWITCH_TESTING_DLL_NAME "zostesting" #define J9_MANAGEMENT_DLL_NAME "management" -#define J9_GC_DLL_NAME "j9gc29" +#define J9_GC_DLL_NAME "j9gc29" /* Compressed references GC DLL */ +#define J9_GC_FULL_DLL_NAME "j9gc_full29" /* Full references GC DLL */ #define J9_RAS_DUMP_DLL_NAME "j9dmp29" #define J9_DYNLOAD_DLL_NAME "j9dyn29" #define J9_VERIFIER_TEST_NATIVES_DLL_NAME "bcvwhite" #define J9_IFA_DLL_NAME "j9ifa29" #define J9_CHECK_JNI_DLL_NAME "j9jnichk29" #define J9_CHECK_VM_DLL_NAME "j9vmchk29" -#define J9_CHECK_GC_DLL_NAME "j9gcchk29" +#define J9_CHECK_GC_DLL_NAME "j9gcchk29" /* Compressed references GC CHECK DLL */ +#define J9_CHECK_GC_FULL_DLL_NAME "j9gcchk_full29" /* Full references GC CHECK DLL */ #define J9_JSIG_DLL_NAME "jsig" #define J9_JVMTI_DLL_NAME "j9jvmti29" #define J9_JLM_GENERATOR_DLL_NAME "jlmagent29" @@ -88,6 +90,9 @@ extern"C"{ #ifndef J9_GC_DLL_NAME #define J9_GC_DLL_NAME "j9gc29" #endif +#ifndef J9_GC_FULL_DLL_NAME +#define J9_GC_FULL_DLL_NAME "j9gc_full29" +#endif #ifndef J9_HOOKABLE_DLL_NAME #define J9_HOOKABLE_DLL_NAME "j9hookable29" #endif diff --git a/runtime/oti/util_api.h b/runtime/oti/util_api.h index 3cea6b8c948..5ecbbb89191 100644 --- a/runtime/oti/util_api.h +++ b/runtime/oti/util_api.h @@ -1107,6 +1107,14 @@ jfloat helperCFloatRemainderFloat(jfloat a, jfloat b); #endif /* J9VM_INTERP_FLOAT_SUPPORT */ /* End File Level Build Flags */ +/** +* @brief Retrieves the load info for the appropriate +* GC DLL based on reference mode. +* @param[in] vm The Java VM. +* @return J9VMDllLoadInfo for the GC DLL selected. +*/ +J9VMDllLoadInfo *getGCDllLoadInfo(J9JavaVM *vm); + /* ---------------- j9crc32.c ---------------- */ /** diff --git a/runtime/redirector/redirector.c b/runtime/redirector/redirector.c index db5e20bd982..e7d723da809 100644 --- a/runtime/redirector/redirector.c +++ b/runtime/redirector/redirector.c @@ -614,8 +614,13 @@ chooseJVM(JavaVMInitArgs *args, char *retBuffer, size_t bufferLength) } - /* decode which VM directory to use */ + /* + * Decode which VM directory to use. + * If running in Mixed References mode, the 'default' (OPENJ9_NOCR_JVM_DIR) directory is used. + */ basePointer = OPENJ9_NOCR_JVM_DIR; + +#if !(defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS)) if ((xnocompressed != -1) && (xcompressed < xnocompressed)) { basePointer = OPENJ9_NOCR_JVM_DIR; optionUsed = xnocompressedstr; @@ -659,7 +664,7 @@ chooseJVM(JavaVMInitArgs *args, char *retBuffer, size_t bufferLength) basePointer = OPENJ9_CR_JVM_DIR; } } - } + } /* * Jazz 31002 : if -XXvm:ignoreUnrecognized is specified and that the targeted VM @@ -668,6 +673,7 @@ chooseJVM(JavaVMInitArgs *args, char *retBuffer, size_t bufferLength) if (!isPackagedWithSubdir(basePointer) && (1 == ignoreUnrecognizedEnabled)) { basePointer = OPENJ9_NOCR_JVM_DIR; } +#endif /* !(defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS)) */ /* if we didn't set the string length already, do it now for the comparison and copy */ if (0 == nameLength) { @@ -693,22 +699,30 @@ chooseJVM(JavaVMInitArgs *args, char *retBuffer, size_t bufferLength) } fprintf(stdout, "does not exist.\n"); +#if defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) + fprintf(stdout, + "This JVM package includes both the '-Xcompressedrefs' and the '-Xnocompressedrefs' " + "configurations, however the VM directory could not be found. Please download the latest " + "JVM package or build with the most recent changes and run the JVM again.\n" + ); +#else /* direct user to OpenJ9 build configurations to properly generate the requested build. */ if (0 == strcmp(OPENJ9_NOCR_JVM_DIR, basePointer)) { fprintf(stdout, "This JVM package only includes the '-Xcompressedrefs' configuration. Please run " "the VM without specifying the '-Xnocompressedrefs' option or by specifying the " "'-Xcompressedrefs' option.\nTo compile the other configuration, please run configure " - "with '--with-noncompressedrefs.\n" + "with '--with-noncompressedrefs'.\n" ); } else if (0 == strcmp(OPENJ9_CR_JVM_DIR, basePointer)) { fprintf(stdout, "This JVM package only includes the '-Xnocompressedrefs' configuration. Please run " "the VM without specifying the '-Xcompressedrefs' option or by specifying the " "'-Xnocompressedrefs' option.\nTo compile the other configuration, please run configure " - "without '--with-noncompressedrefs.\n" + "without '--with-noncompressedrefs'.\n" ); } +#endif /* defined(OMR_GC_COMPRESSED_POINTERS) && defined(OMR_GC_FULL_POINTERS) */ exit(-1); } } diff --git a/runtime/util/CMakeLists.txt b/runtime/util/CMakeLists.txt index 44688839363..3e15e229913 100644 --- a/runtime/util/CMakeLists.txt +++ b/runtime/util/CMakeLists.txt @@ -53,6 +53,7 @@ j9vm_add_library(j9util STATIC fltmath.c fltodd.c fltrem.c + gcloadinfo.c genericSignalHandler.c hshelp.c j9crc32.c diff --git a/runtime/util/gcloadinfo.c b/runtime/util/gcloadinfo.c new file mode 100644 index 00000000000..1b4da3eb0ff --- /dev/null +++ b/runtime/util/gcloadinfo.c @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2020, 2020 IBM Corp. and others + * + * This program and the accompanying materials are made available under + * the terms of the Eclipse Public License 2.0 which accompanies this + * distribution and is available at https://www.eclipse.org/legal/epl-2.0/ + * or the Apache License, Version 2.0 which accompanies this distribution and + * is available at https://www.apache.org/licenses/LICENSE-2.0. + * + * This Source Code may also be made available under the following + * Secondary Licenses when the conditions for such availability set + * forth in the Eclipse Public License, v. 2.0 are satisfied: GNU + * General Public License, version 2 with the GNU Classpath + * Exception [1] and GNU General Public License, version 2 with the + * OpenJDK Assembly Exception [2]. + * + * [1] https://www.gnu.org/software/classpath/license.html + * [2] http://openjdk.java.net/legal/assembly-exception.html + * + * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception + *******************************************************************************/ + +#include "j9.h" +#include "jvminit.h" + +/** + * Retrieves the load info for the appropriate GC DLL based on reference mode. + * + * @param vm The Java VM + * @returns J9VMDllLoadInfo for the GC DLL selected + */ +J9VMDllLoadInfo * +getGCDllLoadInfo(J9JavaVM *vm) +{ + J9VMDllLoadInfo *loadInfo = NULL; + const char *gcDLLName = J9_GC_DLL_NAME; + +#if defined(OMR_MIXED_REFERENCES_MODE_STATIC) + if (!J9JAVAVM_COMPRESS_OBJECT_REFERENCES(vm)) { + gcDLLName = J9_GC_FULL_DLL_NAME; + } +#endif /* defined(OMR_MIXED_REFERENCES_MODE_STATIC) */ + loadInfo = FIND_DLL_TABLE_ENTRY(gcDLLName); + + return loadInfo; +} diff --git a/runtime/vm/jvminit.c b/runtime/vm/jvminit.c index 799327ef9ea..8b1765bb8f2 100644 --- a/runtime/vm/jvminit.c +++ b/runtime/vm/jvminit.c @@ -260,7 +260,7 @@ static void generateMemoryOptionParseError (J9JavaVM* vm, J9VMDllLoadInfo* loadI static void loadDLL (void* dllLoadInfo, void* userDataTemp); static void registerIgnoredOptions (J9PortLibrary *portLibrary, J9VMInitArgs* j9vm_args); static UDATA protectedInitializeJavaVM (J9PortLibrary* portLibrary, void * userData); -static J9Pool *initializeDllLoadTable (J9PortLibrary *portLibrary, J9VMInitArgs* j9vm_args, UDATA verboseFlags); +static J9Pool *initializeDllLoadTable (J9PortLibrary *portLibrary, J9VMInitArgs* j9vm_args, UDATA verboseFlags, J9JavaVM *vm); #if (defined(J9VM_OPT_SIDECAR)) static IDATA checkDjavacompiler (J9PortLibrary *portLibrary, J9VMInitArgs* j9vm_args); #endif /* J9VM_OPT_SIDECAR */ @@ -1192,19 +1192,28 @@ static void loadDLL(void* dllLoadInfo, void* userDataTemp) { * Every library used by the VM should have an entry here, except for any user Xruns. */ static J9Pool * -initializeDllLoadTable(J9PortLibrary *portLibrary, J9VMInitArgs* j9vm_args, UDATA verboseFlags) +initializeDllLoadTable(J9PortLibrary *portLibrary, J9VMInitArgs* j9vm_args, UDATA verboseFlags, J9JavaVM *vm) { J9Pool *returnVal = pool_new(sizeof(J9VMDllLoadInfo), 0, 0, 0, J9_GET_CALLSITE(), OMRMEM_CATEGORY_VM, POOL_FOR_PORT(portLibrary)); IDATA i; char* testString, *options; J9VMDllLoadInfo* newEntry; char dllNameBuffer[SMALL_STRING_BUF_SIZE]; /* Plenty big enough - needs to be at least DLLNAME_LEN */ + const char *gcDLLName = J9_GC_DLL_NAME; + const char *gccheckDLLName = J9_CHECK_GC_DLL_NAME; PORT_ACCESS_FROM_PORT(portLibrary); if (NULL == returnVal) goto _error; +#if defined(OMR_MIXED_REFERENCES_MODE_STATIC) + if (!J9JAVAVM_COMPRESS_OBJECT_REFERENCES(vm)) { + gcDLLName = J9_GC_FULL_DLL_NAME; + gccheckDLLName = J9_CHECK_GC_FULL_DLL_NAME; + } +#endif /* defined(OMR_MIXED_REFERENCES_MODE_STATIC) */ + JVMINIT_VERBOSE_INIT_TRACE(verboseFlags, "\nInitializing DLL load table:\n"); #if defined(J9ZOS390) if(NULL == createLoadInfo(portLibrary, returnVal, J9_IFA_DLL_NAME, 0, NULL, verboseFlags)) @@ -1220,7 +1229,7 @@ initializeDllLoadTable(J9PortLibrary *portLibrary, J9VMInitArgs* j9vm_args, UDAT if (NULL == createLoadInfo(portLibrary, returnVal, J9_VERIFY_DLL_NAME, NOT_A_LIBRARY, (void*)&j9bcv_J9VMDllMain, verboseFlags)) goto _error; - if (NULL == createLoadInfo(portLibrary, returnVal, J9_GC_DLL_NAME, (LOAD_BY_DEFAULT | FATAL_NO_DLL), NULL, verboseFlags)) + if (NULL == createLoadInfo(portLibrary, returnVal, gcDLLName, (LOAD_BY_DEFAULT | FATAL_NO_DLL), NULL, verboseFlags)) goto _error; if (NULL == createLoadInfo(portLibrary, returnVal, J9_DYNLOAD_DLL_NAME, NOT_A_LIBRARY, (void*)&bcutil_J9VMDllMain, verboseFlags)) goto _error; @@ -1243,7 +1252,7 @@ initializeDllLoadTable(J9PortLibrary *portLibrary, J9VMInitArgs* j9vm_args, UDAT if (NULL == createLoadInfo(portLibrary, returnVal, J9_JVMTI_DLL_NAME, 0, NULL, verboseFlags)) goto _error; #endif - if (NULL == createLoadInfo(portLibrary, returnVal, J9_CHECK_GC_DLL_NAME, 0, NULL, verboseFlags)) + if (NULL == createLoadInfo(portLibrary, returnVal, gccheckDLLName, 0, NULL, verboseFlags)) goto _error; if (NULL == createLoadInfo(portLibrary, returnVal, J9_DEBUG_DLL_NAME, 0, NULL, verboseFlags)) @@ -6576,7 +6585,7 @@ protectedInitializeJavaVM(J9PortLibrary* portLibrary, void * userData) } #endif - vm->dllLoadTable = initializeDllLoadTable(portLibrary, vm->vmArgsArray, localVerboseLevel); + vm->dllLoadTable = initializeDllLoadTable(portLibrary, vm->vmArgsArray, localVerboseLevel, vm); if (NULL == vm->dllLoadTable) { goto error; } diff --git a/runtime/vm/jvminitcommon.c b/runtime/vm/jvminitcommon.c index 8aed3677ca2..d8f9a50457f 100644 --- a/runtime/vm/jvminitcommon.c +++ b/runtime/vm/jvminitcommon.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2019 IBM Corp. and others + * Copyright (c) 1991, 2020 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -107,7 +107,7 @@ safeCat(char *buffer, const char *text, IDATA length) * @returns J9VMDllLoadInfo for the dll specified or NULL on failure */ J9VMDllLoadInfo * -createLoadInfo(J9PortLibrary *portLibrary, J9Pool *aPool, char *name, U_32 flags, void *methodPointer, UDATA verboseFlags) +createLoadInfo(J9PortLibrary *portLibrary, J9Pool *aPool, const char *name, U_32 flags, void *methodPointer, UDATA verboseFlags) { PORT_ACCESS_FROM_PORT(portLibrary); diff --git a/runtime/vm/jvminitcommon.h b/runtime/vm/jvminitcommon.h index 83e2dcda90f..ea153cdec57 100644 --- a/runtime/vm/jvminitcommon.h +++ b/runtime/vm/jvminitcommon.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2017 IBM Corp. and others + * Copyright (c) 2006, 2020 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -46,7 +46,7 @@ J9VMDllLoadInfo *findDllLoadInfo(J9Pool* aPool, const char* dllName); IDATA safeCat (char* buffer, const char* text, IDATA length); void freeDllLoadTable (J9Pool* table); void freeVMArgsArray (J9PortLibrary* portLibrary, J9VMInitArgs* j9vm_args); -J9VMDllLoadInfo *createLoadInfo (J9PortLibrary* portLibrary, J9Pool* aPool, char* name, U_32 flags, void* methodPointer, UDATA verboseFlags); +J9VMDllLoadInfo *createLoadInfo (J9PortLibrary* portLibrary, J9Pool* aPool, const char* name, U_32 flags, void* methodPointer, UDATA verboseFlags); UDATA jniVersionIsValid (UDATA jniVersion); diff --git a/runtime/vm/xcheck.c b/runtime/vm/xcheck.c index 81672b785d5..cf2d5f7df5f 100644 --- a/runtime/vm/xcheck.c +++ b/runtime/vm/xcheck.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 1991, 2016 IBM Corp. and others + * Copyright (c) 1991, 2020 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this @@ -99,8 +99,16 @@ processXCheckOptions(J9JavaVM * vm, J9Pool* loadTable, J9VMInitArgs* j9vm_args) noGCIndex = OMR_MAX(noGCIndex, noneIndex); if (gcIndex > noGCIndex) { + const char *gccheckDLLName = J9_CHECK_GC_DLL_NAME; + +#if defined(OMR_MIXED_REFERENCES_MODE_STATIC) + if (!J9JAVAVM_COMPRESS_OBJECT_REFERENCES(vm)) { + gccheckDLLName = J9_CHECK_GC_FULL_DLL_NAME; + } +#endif /* defined(OMR_MIXED_REFERENCES_MODE_STATIC) */ + j9vm_args->j9Options[gcIndex].flags |= ARG_REQUIRES_LIBRARY; - entry = findDllLoadInfo(loadTable, J9_CHECK_GC_DLL_NAME); + entry = findDllLoadInfo(loadTable, gccheckDLLName); entry->loadFlags |= LOAD_BY_DEFAULT; }