Several questions regarding AppCDS

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Several questions regarding AppCDS

Volker Simonis
Hi Jiangli, Ioi,

after AppCDS has been pushed to the open repos, I started looking at
it. However, I found very little in-deep documentation of the feature.
All I could find so far is basically the Oracle docs, blogs and videos
I've listed below (in the hope that they may be useful for others as
well).

However this still doesn't answer the following questions:

1. Is there a specification and explanation of the extended class list
syntax which is used for AppCDS with custom class loaders?

I only found the documentation in systemDictionaryShared.hpp. But that
for example mentions the "loader" keyword (as do some of the JTreg
tests) without further explanation.

2. Is there a way or tool to create this extended class list automatically?

As far as I can see, all the Jtreg tests which use the extended
syntax, generate the class list manually. I did some simple tests
where I load some classes into my own URL class loader but they don't
seem to appear in the class list generated by -XX:DumpLoadedClassList.

Any further references are highly welcome.

Thank you and best regards,
Volker

PS: I really liked your JavaOne 2016 presentation :)

Class Data Sharing
====================
https://docs.oracle.com/javase/9/vm/class-data-sharing.htm#JSJVM-GUID-7EAA3411-8CF0-4D19-BD05-DF5E1780AA91

Application Class Data Sharing
==============================
https://docs.oracle.com/javase/9/tools/java.htm#JSWOR-GUID-31503FCE-93D0-4175-9B4F-F6A738B2F4C4

JEP 310: Application Class-Data Sharing
=======================================
http://openjdk.java.net/jeps/310

Matthew Gilliard's blog
-----------------------
Fast JVM startup with JDK 9
https://mjg123.github.io/2017/10/02/JVM-startup.html

Quicker Clojure startup with AppCDS and AOT
https://mjg123.github.io/2017/10/04/AppCDS-and-Clojure.html

Leveraging AppCDS to Optimize Application Startup and Memory Footprint
in the Cloud
-----------------------------------------------------------------------------------
https://www.youtube.com/watch?v=dRw77QDSL-A
Reply | Threaded
Open this post in threaded view
|

Re: Several questions regarding AppCDS

Jiangli Zhou
Hi Volker,

Just some high level information for your questions. We are continually investigating the usage/requirement of the CDS/AppCDS support for custom class loaders and the current implementation may change when the investigation is maturing. That’s part of reason why there is no extended public documentation about the custom class loader support and external tool for generating the new class list available at the time. Ioi probably will fill in more details on this topic.

Thanks,

Jiangli

> On Nov 30, 2017, at 6:46 AM, Volker Simonis <[hidden email]> wrote:
>
> Hi Jiangli, Ioi,
>
> after AppCDS has been pushed to the open repos, I started looking at
> it. However, I found very little in-deep documentation of the feature.
> All I could find so far is basically the Oracle docs, blogs and videos
> I've listed below (in the hope that they may be useful for others as
> well).
>
> However this still doesn't answer the following questions:
>
> 1. Is there a specification and explanation of the extended class list
> syntax which is used for AppCDS with custom class loaders?
>
> I only found the documentation in systemDictionaryShared.hpp. But that
> for example mentions the "loader" keyword (as do some of the JTreg
> tests) without further explanation.
>
> 2. Is there a way or tool to create this extended class list automatically?
>
> As far as I can see, all the Jtreg tests which use the extended
> syntax, generate the class list manually. I did some simple tests
> where I load some classes into my own URL class loader but they don't
> seem to appear in the class list generated by -XX:DumpLoadedClassList.
>
> Any further references are highly welcome.
>
> Thank you and best regards,
> Volker
>
> PS: I really liked your JavaOne 2016 presentation :)
>
> Class Data Sharing
> ====================
> https://docs.oracle.com/javase/9/vm/class-data-sharing.htm#JSJVM-GUID-7EAA3411-8CF0-4D19-BD05-DF5E1780AA91
>
> Application Class Data Sharing
> ==============================
> https://docs.oracle.com/javase/9/tools/java.htm#JSWOR-GUID-31503FCE-93D0-4175-9B4F-F6A738B2F4C4
>
> JEP 310: Application Class-Data Sharing
> =======================================
> http://openjdk.java.net/jeps/310
>
> Matthew Gilliard's blog
> -----------------------
> Fast JVM startup with JDK 9
> https://mjg123.github.io/2017/10/02/JVM-startup.html
>
> Quicker Clojure startup with AppCDS and AOT
> https://mjg123.github.io/2017/10/04/AppCDS-and-Clojure.html
>
> Leveraging AppCDS to Optimize Application Startup and Memory Footprint
> in the Cloud
> -----------------------------------------------------------------------------------
> https://www.youtube.com/watch?v=dRw77QDSL-A

Reply | Threaded
Open this post in threaded view
|

Re: Several questions regarding AppCDS

Volker Simonis
Jiangli Zhou <[hidden email]> schrieb am Do. 30. Nov. 2017 um
20:27:

> Hi Volker,
>
> Just some high level information for your questions. We are continually
> investigating the usage/requirement of the CDS/AppCDS support for custom
> class loaders and the current implementation may change when the
> investigation is maturing. That’s part of reason why there is no extended
> public documentation about the custom class loader support and external
> tool for generating the new class list available at the time. Ioi probably
> will fill in more details on this topic.
>

Hi Jiangli,

thanks a lot for your answer. Without the possibility to create the
extended class list entries for classes loaded by custom class loaders
automatically it will be probably quite hard to use this feature
productively.

There's one thing I forgot to ask. Is there a way (e.g. a tool) to dump the
contents of an archive in readable form. E.g.  something like SA agent to
create class files from an archive? That could be quite helpful for
debugging.

Thank's a lot and best regards,
Volker


> Thanks,
>
> Jiangli
>
> > On Nov 30, 2017, at 6:46 AM, Volker Simonis <[hidden email]>
> wrote:
> >
> > Hi Jiangli, Ioi,
> >
> > after AppCDS has been pushed to the open repos, I started looking at
> > it. However, I found very little in-deep documentation of the feature.
> > All I could find so far is basically the Oracle docs, blogs and videos
> > I've listed below (in the hope that they may be useful for others as
> > well).
> >
> > However this still doesn't answer the following questions:
> >
> > 1. Is there a specification and explanation of the extended class list
> > syntax which is used for AppCDS with custom class loaders?
> >
> > I only found the documentation in systemDictionaryShared.hpp. But that
> > for example mentions the "loader" keyword (as do some of the JTreg
> > tests) without further explanation.
> >
> > 2. Is there a way or tool to create this extended class list
> automatically?
> >
> > As far as I can see, all the Jtreg tests which use the extended
> > syntax, generate the class list manually. I did some simple tests
> > where I load some classes into my own URL class loader but they don't
> > seem to appear in the class list generated by -XX:DumpLoadedClassList.
> >
> > Any further references are highly welcome.
> >
> > Thank you and best regards,
> > Volker
> >
> > PS: I really liked your JavaOne 2016 presentation :)
> >
> > Class Data Sharing
> > ====================
> >
> https://docs.oracle.com/javase/9/vm/class-data-sharing.htm#JSJVM-GUID-7EAA3411-8CF0-4D19-BD05-DF5E1780AA91
> >
> > Application Class Data Sharing
> > ==============================
> >
> https://docs.oracle.com/javase/9/tools/java.htm#JSWOR-GUID-31503FCE-93D0-4175-9B4F-F6A738B2F4C4
> >
> > JEP 310: Application Class-Data Sharing
> > =======================================
> > http://openjdk.java.net/jeps/310
> >
> > Matthew Gilliard's blog
> > -----------------------
> > Fast JVM startup with JDK 9
> > https://mjg123.github.io/2017/10/02/JVM-startup.html
> >
> > Quicker Clojure startup with AppCDS and AOT
> > https://mjg123.github.io/2017/10/04/AppCDS-and-Clojure.html
> >
> > Leveraging AppCDS to Optimize Application Startup and Memory Footprint
> > in the Cloud
> >
> -----------------------------------------------------------------------------------
> > https://www.youtube.com/watch?v=dRw77QDSL-A
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Several questions regarding AppCDS

Jiangli Zhou
Hi Volker,

> On Nov 30, 2017, at 2:56 PM, Volker Simonis <[hidden email]> wrote:
>
>
> Jiangli Zhou <[hidden email] <mailto:[hidden email]>> schrieb am Do. 30. Nov. 2017 um 20:27:
> Hi Volker,
>
> Just some high level information for your questions. We are continually investigating the usage/requirement of the CDS/AppCDS support for custom class loaders and the current implementation may change when the investigation is maturing. That’s part of reason why there is no extended public documentation about the custom class loader support and external tool for generating the new class list available at the time. Ioi probably will fill in more details on this topic.
>
> Hi Jiangli,
>
> thanks a lot for your answer. Without the possibility to create the extended class list entries for classes loaded by custom class loaders automatically it will be probably quite hard to use this feature productively.

Ioi will send out information regarding the experimental new class list format. Please look for his email.

>
> There's one thing I forgot to ask. Is there a way (e.g. a tool) to dump the contents of an archive in readable form. E.g.  something like SA agent to create class files from an archive? That could be quite helpful for debugging.

At runtime shared classes loaded from the mapped archive should be able to be inspected by SA agent, like the dynamically loaded classes. I think you are suggesting a static dumper utility that can be used to translate the archive content into human readable format. That sounds like a useful tool.

Best regards,
Jiangli

>
> Thank's a lot and best regards,
> Volker
>
>
> Thanks,
>
> Jiangli
>
> > On Nov 30, 2017, at 6:46 AM, Volker Simonis <[hidden email] <mailto:[hidden email]>> wrote:
> >
> > Hi Jiangli, Ioi,
> >
> > after AppCDS has been pushed to the open repos, I started looking at
> > it. However, I found very little in-deep documentation of the feature.
> > All I could find so far is basically the Oracle docs, blogs and videos
> > I've listed below (in the hope that they may be useful for others as
> > well).
> >
> > However this still doesn't answer the following questions:
> >
> > 1. Is there a specification and explanation of the extended class list
> > syntax which is used for AppCDS with custom class loaders?
> >
> > I only found the documentation in systemDictionaryShared.hpp. But that
> > for example mentions the "loader" keyword (as do some of the JTreg
> > tests) without further explanation.
> >
> > 2. Is there a way or tool to create this extended class list automatically?
> >
> > As far as I can see, all the Jtreg tests which use the extended
> > syntax, generate the class list manually. I did some simple tests
> > where I load some classes into my own URL class loader but they don't
> > seem to appear in the class list generated by -XX:DumpLoadedClassList.
> >
> > Any further references are highly welcome.
> >
> > Thank you and best regards,
> > Volker
> >
> > PS: I really liked your JavaOne 2016 presentation :)
> >
> > Class Data Sharing
> > ====================
> > https://docs.oracle.com/javase/9/vm/class-data-sharing.htm#JSJVM-GUID-7EAA3411-8CF0-4D19-BD05-DF5E1780AA91 <https://docs.oracle.com/javase/9/vm/class-data-sharing.htm#JSJVM-GUID-7EAA3411-8CF0-4D19-BD05-DF5E1780AA91>
> >
> > Application Class Data Sharing
> > ==============================
> > https://docs.oracle.com/javase/9/tools/java.htm#JSWOR-GUID-31503FCE-93D0-4175-9B4F-F6A738B2F4C4 <https://docs.oracle.com/javase/9/tools/java.htm#JSWOR-GUID-31503FCE-93D0-4175-9B4F-F6A738B2F4C4>
> >
> > JEP 310: Application Class-Data Sharing
> > =======================================
> > http://openjdk.java.net/jeps/310 <http://openjdk.java.net/jeps/310>
> >
> > Matthew Gilliard's blog
> > -----------------------
> > Fast JVM startup with JDK 9
> > https://mjg123.github.io/2017/10/02/JVM-startup.html <https://mjg123.github.io/2017/10/02/JVM-startup.html>
> >
> > Quicker Clojure startup with AppCDS and AOT
> > https://mjg123.github.io/2017/10/04/AppCDS-and-Clojure.html <https://mjg123.github.io/2017/10/04/AppCDS-and-Clojure.html>
> >
> > Leveraging AppCDS to Optimize Application Startup and Memory Footprint
> > in the Cloud
> > -----------------------------------------------------------------------------------
> > https://www.youtube.com/watch?v=dRw77QDSL-A <https://www.youtube.com/watch?v=dRw77QDSL-A>
>