Fat jar with AppCDS
Volker Simonis
volker.simonis at gmail.com
Tue Apr 24 09:42:34 UTC 2018
Hi Yumin,
your right with your observation. For applications like Tomcat or
Eclipse you can currently usually only share about 20%-30% of the
application classes, even with AppCDS.
To overcome this problem I wrote a small tool called "cl4cds" (i.e.
class list for CDS) which can be used to generate a classlist out of
the "Xlog:class+load" output. Unfortunately this is currently an
extra, off-line step which should obviously be integrated right into
HotSpot. But for the time being it allows you to take advantage of
AppCDS for custom classloaders and share a much bigger amount of
classes even for application server scenarios.
Regards,
Volker
[1] https://github.com/simonis/cl4cds
On Tue, Apr 24, 2018 at 2:49 AM, yumin qi <yumin.qi at gmail.com> wrote:
> Hi,Ioi
>
> There are some applications with fat jar, that is, like web jars, are
> loaded by its own class loaders, are not dumped when run with current mode.
> AppCDS can dump the jars in path and loaded by App class loader, but it
> does not dump the classes loaded by the class loader "in the jars", which
> are loaded in runtime.
>
> Do you have any plan to work on this issue? The classes loaded during
> runtime are NOT generated classes, they are just designed this way and
> stored in other jar files(fat).
>
> We are working on the issue, so if you have recommendation or you already
> worked on it please let me know.
>
> Thanks
> Yumin
More information about the hotspot-runtime-dev
mailing list