RFR: 8293979: Resolve JVM_CONSTANT_Class references at CDS dump time [v4]
Ioi Lam
iklam at openjdk.org
Wed Oct 19 18:39:25 UTC 2022
> Some `JVM_CONSTANT_Class` entries are guaranteed to resolve to the same value at both CDS dump time and run time:
>
> - Classes that are resolved during `vmClasses::resolve_all()`. These classes cannot be replaced by JVMTI agents at run time.
> - Supertypes -- at run time, a class `C` can be loaded from the CDS archive only if all of `C`'s super types are also loaded from the CDS archive. Therefore, we know that a `JVM_CONSTANT_Class` reference to a supertype of `C` must resolved to the same value at both CDS dump time and run time.
>
> By doing the resolution at dump time, we can speed up run time start-up by a little bit.
>
> The `ClassPrelinker` class added by this PR will also be used in future REFs for pre-resolving other constant pool entries. The ultimate goal is to resolve `invokedynamic` and `invokehandle` so we can significantly improve the start-up time of features such as Lambda expressions and String concatenation. See [JDK-8293336](https://bugs.openjdk.org/browse/JDK-8293336)
Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
- @coleenp comments: changed to AllStatic
- Merge branch 'master' into 8293979-resolve-class-references-at-dumptime
- fixed product build
- @coleenp comments
- Merge branch 'master' into 8293979-resolve-class-references-at-dumptime
- 8293979: Resolve JVM_CONSTANT_Class references at CDS dump time
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/10330/files
- new: https://git.openjdk.org/jdk/pull/10330/files/980802d6..df53a7b4
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=10330&range=03
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=10330&range=02-03
Stats: 3391 lines in 582 files changed: 1749 ins; 122 del; 1520 mod
Patch: https://git.openjdk.org/jdk/pull/10330.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10330/head:pull/10330
PR: https://git.openjdk.org/jdk/pull/10330
More information about the hotspot-dev
mailing list