RFR: 8267191 avoid repeated should be excluded

Ioi Lam iklam at openjdk.java.net
Mon May 17 17:55:46 UTC 2021


`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");

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

Commit messages:
 - fixed merge
 - Merge branch 'master' of https://github.com/openjdk/jdk into 8267191-avoid-repeated-should_be_excluded
 - 8267191: Avoid repeated SystemDictionaryShared::should_be_excluded calls

Changes: https://git.openjdk.java.net/jdk/pull/4070/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4070&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267191
  Stats: 78 lines in 2 files changed: 28 ins; 22 del; 28 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4070.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4070/head:pull/4070

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


More information about the hotspot-runtime-dev mailing list