-
Sub-task
-
Resolution: Unresolved
-
P4
-
None
When -XX:+RecordTraining is specified for "java -XX:AOTMode=record -XX:AOTConfiguration=foo.aotconfig", the foo.aotconfig file should include TrainingData (see traningData.hpp).
Currently, foo.aotconfig is a text file (as of JEP 483, AOTConfiguration is simply an alias of the old SharedClassListFile option). However, the premain implementation of TrainingData require direct pointers to HotSpot class metadata such as InstanceKlass and Method. As a result, it's difficult to encode such data into a text file format.
Proposal:
When "-XX:AOTMode=record -XX:+RecordTraining" are specified, we will write binary data into the file specified by -XX:AOTConfiguration. The format of this data is exactly the same as the "preimage CDS archive" as implemented in Leyden EA1.
Currently, foo.aotconfig is a text file (as of JEP 483, AOTConfiguration is simply an alias of the old SharedClassListFile option). However, the premain implementation of TrainingData require direct pointers to HotSpot class metadata such as InstanceKlass and Method. As a result, it's difficult to encode such data into a text file format.
Proposal:
When "-XX:AOTMode=record -XX:+RecordTraining" are specified, we will write binary data into the file specified by -XX:AOTConfiguration. The format of this data is exactly the same as the "preimage CDS archive" as implemented in Leyden EA1.