RFR: 8267191: Avoid repeated SystemDictionaryShared::should_be_excluded calls

Coleen Phillimore coleenp at openjdk.java.net
Tue May 18 11:37:42 UTC 2021


On Mon, 17 May 2021 17:39:32 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> `SystemDictionaryShared::should_be_excluded` is called during CDS dump time to see if a class should be excluded from the archive. This function calls itself to check super types. As a result, some classes many be checked more than once.
> 
> The repeated calls slows down dumping. Also, If a class is excluded, we will see multiple warning messages like this, which is too verbose and confusing.
> 
> 
> Skipping org/eclipse/osgi/util/NLS: Signed JAR
> Skipping org/eclipse/osgi/util/NLS: Signed JAR
> Skipping org/eclipse/osgi/util/NLS: Signed JAR
> 
> 
> BTW, to make the code a little easier to read, I also changed
> 
> 
>  warn_excluded(k, "Failed verification");
>  return true;
> 
> 
> to
> 
> 
> return  warn_excluded(k, "Failed verification");

Looks good!

-------------

Marked as reviewed by coleenp (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/4070


More information about the hotspot-runtime-dev mailing list