Skip to content

Add new options to enable storing all classes in SCC - #19442

Merged
pshipton merged 1 commit into
eclipse-openj9:masterfrom
hangshao0:storeAll
May 9, 2024
Merged

Add new options to enable storing all classes in SCC#19442
pshipton merged 1 commit into
eclipse-openj9:masterfrom
hangshao0:storeAll

Conversation

@hangshao0

@hangshao0 hangshao0 commented May 3, 2024

Copy link
Copy Markdown
Contributor
  1. Add new options -XX:[+/-]ShareOrphans to enable/disable storing classes as orphan to SCC from SCC-unaware class loader(loader does not call SCC helper APIs). This feature is turned off by default.
  2. Add runtimeFlags2 to J9SharedClassConfig.
  3. Add a new mode into J9SharedClassCacheMode.
  4. Turn on -Xshareclasses automatically by -XX:+ShareOrphans
  5. Add test cases to make sure that classes from SCC-unaware class loader are stored into SCC and loaded in subsequent runs via byte-to-byte comparison if this feature is turned on.

Closes #19323

@hangshao0
hangshao0 requested a review from pshipton May 3, 2024 14:31
@hangshao0
hangshao0 force-pushed the storeAll branch 2 times, most recently from a0dbaca to 530c4cb Compare May 3, 2024 14:36
Comment thread runtime/nls/exel/exelib.nls Outdated
Comment thread runtime/shared/shrclssup.c Outdated
Comment thread runtime/shared/shrclssup.c Outdated
Comment thread runtime/shared_common/shrinit.cpp Outdated
@pshipton

pshipton commented May 7, 2024

Copy link
Copy Markdown
Member

Pls create a doc issue.

Why does -XX:+ShareOrphans need to be enabled in combination with -Xshareclasses? Would it make more sense to automatically enable -Xshareclasses if -XX:+ShareOrphans is enabled?

@hangshao0

Copy link
Copy Markdown
Contributor Author

Would it make more sense to automatically enable -Xshareclasses if -XX:+ShareOrphans is enabled?

I think we can let -XX:+ShareOrphans automatically turn on -Xshareclasses.

@hangshao0

Copy link
Copy Markdown
Contributor Author

Pls create a doc issue.

eclipse-openj9/openj9-docs#1330

@hangshao0
hangshao0 force-pushed the storeAll branch 6 times, most recently from 0831c6e to d78b67d Compare May 9, 2024 14:34
@hangshao0

Copy link
Copy Markdown
Contributor Author

Would it make more sense to automatically enable -Xshareclasses if -XX:+ShareOrphans is enabled?

I think we can let -XX:+ShareOrphans automatically turn on -Xshareclasses.

This change is added in. It means if we turn on -XX:+ShareOrphans by default in the future, -Xshareclasss will also be turned on.

Rebased to resolve merge conflicts. This is ready to be reviewed again.

Comment thread runtime/shared/shrclssup.c Outdated
Comment thread runtime/vm/j9vm.tdf Outdated
Comment thread runtime/vm/jvminit.c Outdated
Comment thread runtime/vm/jvminit.c Outdated
@hangshao0
hangshao0 force-pushed the storeAll branch 2 times, most recently from 9b6f286 to 4db0fdb Compare May 9, 2024 20:11
1. Add new options -XX:[+/-]ShareOrphans to enable/disable storing
classes as orphan to SCC from SCC-unaware class loader(loader does not
call SCC helper APIs). This feature is turned off by default. 
2. Add runtimeFlags2 to J9SharedClassConfig.
3. Add a new mode into J9SharedClassCacheMode.
4. Turn on -Xshareclasses automatically by -XX:+ShareOrphans
5. Add test cases to make sure that classes from SCC-unaware class
loader are stored into SCC and loaded in subsequent runs via
byte-to-byte comparison if this feature is turned on.

Closes eclipse-openj9#19323

Signed-off-by: Hang Shao <hangshao@ca.ibm.com>
@pshipton

pshipton commented May 9, 2024

Copy link
Copy Markdown
Member

jenkins test sanity amac jdk11

@pshipton
pshipton merged commit d9a1f14 into eclipse-openj9:master May 9, 2024
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.

Storing all classes to SCC for startup performance

3 participants