RFR: 8267556: Enhance class paths check during runtime

Calvin Cheung ccheung at openjdk.java.net
Tue Jun 8 00:37:39 UTC 2021


During CDS dump time, if an entry in the classpath isn't a jar file, the entry will not be recorded in the archive header. However, during runtime, it attempts to compare all the entries in the classpath against the entries from the archive header. The loading of CDS archive would fail if there exists an non-jar entry in the classpath.

The proposed patch addresses the above issue. It adds a `bool _has_non_jar_in_classpath` to indicate if a non-jar entry has been encountered during dump time in the archive header. This is to minimize the performance impact for the usual cases where there is no non-jar entry in the classpath.

- [x] mach5 tiers 1 - 4 (including the new test)

This is targeted for JDK18.

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

Commit messages:
 - 8267556: Enhance class paths check during runtime

Changes: https://git.openjdk.java.net/jdk/pull/4402/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4402&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267556
  Stats: 101 lines in 7 files changed: 95 ins; 1 del; 5 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4402.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4402/head:pull/4402

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


More information about the hotspot-runtime-dev mailing list