[graalvm-dev] A PR to support dynamic class loading and class serialization/deserialization in SubstrateVM
林子熠(层风)
cengfeng.lzy at alibaba-inc.com
Tue Apr 7 05:45:41 PDT 2020
Dear all,
We have committed a PR to support dynamic class loading and class
serialization/deserialization in SubstrateVM.
https://urldefense.com/v3/__https://github.com/oracle/graal/pull/2323__;!!GqivPVa7Brio!I9JJfIe3JyijYwHeZxP1gfgmWYa6h2H6FoD6rGzqiOGK40VXyMOYIMfamEmtMVLLXT6n9A$
The basic idea for supporting dynamic class loading is dumping classes
generated at run time in a beforehand run with native-image-agent to a
specified directory which is added to the classpath to build native-image.
Serialization/deserialization is basically dynamic class loading +
reflection.
This is implemented in 3 steps:
1. Intercept java.lang.ClassLoader.postDefineClass and
sun.reflect.ClassDefiner.defineClass by native-image-agent to dump the
dynamically generated class to file system.
2. Make sure the generated classes' names are fixed through Hotspot
version runtime and native-image version runtime.
3. Substitute relevant classes in SubstrateVM to load the previously
dumped classes.
More details can be found the PR.
Ziyi Lin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/graalvm-dev/attachments/20200407/52987d7a/attachment.html
More information about the GraalVM-Dev
mailing list