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

Enable bootstrap class sharing by default on OpenJ9 Java 11 #3681

Merged
merged 2 commits into from
Nov 20, 2018

Conversation

hangshao0
Copy link
Contributor

1.Enable bootstrap class sharing by default on OpenJ9 Java 11+.
2.Shared.isSharingEnabled() returns false if -Xshareclass is
not used in CML, so that non-bootstrap class sharing is disabled by
default.
3. When bootstrap class sharing is enabled by default, set flags
J9SHR_RUNTIMEFLAG_ENABLE_NONFATAL and clear
J9SHR_RUNTIMEFLAG_ENABLE_CACHE_NON_BOOT_CLASSES and verboseFlags.
4. Add a test that ensures only bootstrap class sharing is enabled by
default.
5.Change verbosetests to check for a non-bootstrap class, as
-verbose:dynload won't show bootstrap classes loaded from the share
cache.

Doc issue eclipse-openj9/openj9-docs#110
Fixes #1646

Signed-off-by: hangshao [email protected]

@hangshao0
Copy link
Contributor Author

Mark this as WIP until #3333 is fixed

@pshipton
Copy link
Member

jenkins test sanity xlinux,plinux,zlinux,xlinuxlargeheap,aix,win,osx jdk8,jdk11

@pshipton
Copy link
Member

jenkins test sanity win32 jdk8

@pshipton
Copy link
Member

jenkins test sanity xlinux,plinux,zlinux,xlinuxlargeheap,aix,win jdk11

@pshipton
Copy link
Member

jenkins test sanity xlinux,plinux,zlinux,xlinuxlargeheap,aix,win jdk11

@pshipton
Copy link
Member

pshipton commented Nov 18, 2018

3 rounds of sanity tests have passed on all platforms except osx, which failed to run -version in the first round.
https://ci.eclipse.org/openj9/job/PullRequest-Sanity-JDK11-osx_x86-64_cmprssptrs-OpenJ9/34/

11:53:10 + build/macosx-x86_64-normal-server-release/images/jdk/bin/java -version
11:53:11 Exception in thread "main" java/lang/BootstrapMethodError: java.lang.NullPointerException
11:53:11 	at jdk/internal/loader/BuiltinClassLoader.setJimageURL (java.base@9/BuiltinClassLoader.java:253)
11:53:11 	at jdk/internal/loader/BuiltinClassLoader$LoadedModule.convertJrtToFileURL (java.base@9/BuiltinClassLoader.java:296)
11:53:11 	at jdk/internal/loader/BuiltinClassLoader$LoadedModule.<init> (java.base@9/BuiltinClassLoader.java:286)
11:53:11 	at jdk/internal/loader/BuiltinClassLoader.loadModule (java.base@9/BuiltinClassLoader.java:354)
11:53:11 	at jdk/internal/loader/BootLoader.loadModule (java.base@9/BootLoader.java:109)
11:53:11 	at jdk/internal/module/ModuleBootstrap.boot (java.base@9/ModuleBootstrap.java:216)
11:53:11 	at java/lang/ClassLoader.initializeClassLoaders (java.base@9/ClassLoader.java:217)
11:53:11 	at java/lang/Thread.initialize (java.base@9/Thread.java:422)
11:53:11 	at java/lang/Thread.<init> (java.base@9/Thread.java:153)

@pshipton
Copy link
Member

jenkins test sanity xlinux,plinux,zlinux,xlinuxlargeheap,aix,win,osx jdk11

@pshipton
Copy link
Member

https://ci.eclipse.org/openj9/job/PullRequest-Sanity-JDK11-osx_x86-64_cmprssptrs-OpenJ9/35/ failed on osx for a different, unknown, reason.

@pshipton
Copy link
Member

jenkins test sanity xlinux,plinux,zlinux,xlinuxlargeheap,aix,win,osx jdk11

@pshipton
Copy link
Member

@pshipton
Copy link
Member

@hangshao0 While trying to figure out the osx problem, and depending on all long this takes, I'm thinking we can exclude osx from enabling the shared cache by default, and enable the other platforms.

@dsouzai
Copy link
Contributor

dsouzai commented Nov 19, 2018

https://ci.eclipse.org/openj9/job/PullRequest-Sanity-JDK11-osx_x86-64_cmprssptrs-OpenJ9/36/ looks to be #3685

The other two I'd have to try out.

1.Enable bootstrap class sharing by default on OpenJ9 Java 11+.
2.Shared.isSharingEnabled() returns false if -Xshareclass is
not used in CML, so that non-bootstrap class sharing is disabled by
default.
3. When bootstrap class sharing is enabled by default, set flags
J9SHR_RUNTIMEFLAG_ENABLE_NONFATAL and clear
J9SHR_RUNTIMEFLAG_ENABLE_CACHE_NON_BOOT_CLASSES and verboseFlags.
4. Add a test that ensures only bootstrap class sharing is enabled by
default.
5.Change verbosetests to check for a non-bootstrap class, as
-verbose:dynload won't show bootstrap classes loaded from the share
cache.

Doc issue eclipse-openj9/openj9-docs#110
Fixes eclipse-openj9#1646

Signed-off-by: hangshao <[email protected]>
@hangshao0
Copy link
Contributor Author

I'm thinking we can exclude osx from enabling the shared cache by default, and enable the other platforms.

Done.

@hangshao0 hangshao0 changed the title WIP: Enable bootstrap class sharing by default on OpenJ9 Java 11 Enable bootstrap class sharing by default on OpenJ9 Java 11 Nov 20, 2018
@pshipton
Copy link
Member

jenkins test sanity osx,zlinux jdk11

@pshipton
Copy link
Member

The osx failure is again #3685

@pshipton pshipton merged commit d8b22d8 into eclipse-openj9:master Nov 20, 2018
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.

3 participants