Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[adoptium.incubator-dev] Some ideas about pre-initialization

Hi all,

There I have some ideas about pre-initialization:

1. Backports

As discussed with @jiangli before,
> The current general class pre-initialization work is based on JDK 11 with some backports from OpenJDK 12 & 13, particularly with the backport for https://bugs.openjdk.java.net/browse/JDK-8206009. Majority of the needed backports have already landed in OpenJDK 11. We still need to backport JDK-8206009 to jdk11u-dev-class-preprocessing.

This seems to be a good starting point, I can try to backport it. Besides, do you think there is any prerequisite patch that we must backport right now? If not, we can consider developing new features until we need to backport some patches in later development.

2. New features
1) Allow pre-initializing fields whose types are primitives
2) Remove hard-coded archivable_static_fields, accepts users inputs, either a safe fields/klass list or fields/klass that annotated with @Preserve or whatever you like
3) In HeapShared::initialize_from_archived_subgraph, find the klass in hashmap instead of an array, this had been done in upstream
4) Safety check. Checking if given input is valid
5) Allow pre-initializing lambda fields
6) More region-based GC supports(ShenandoahGC/ZGC)

IMHO, I prefer item 2) since other items require removing hard-wired code and accepting users' input as their preconditions.

Do you have any ideas about the future roadmap? I'm new to pre-initialization, anything that is not listed above can also be raised. I'm very glad to hear about your ideas/feedback, any input is appreciated!

Best Regards,
Yang

Back to the top