RFR 8190359: Reduce the number of recorded klass dependencies
Ioi Lam
ioi.lam at oracle.com
Tue Jan 30 19:50:24 UTC 2018
Hi Harold,
Why is this needed
336 if (from_cld == to_cld ...
It seems like it's already checked by here
350 if (from == to || java_lang_ClassLoader::isAncestor(from, to)) {
It's probably explained by this
348 assert(from != to || from_cld->is_anonymous(), "sanity check");
... but I think this is a rather tricky area so either (a) more comments
might be needed in the source code, or (b) simplify the code so it
requires less explanation.
Also, I wonder if it's possible to add a new test case for this.
Thanks
- Ioi
On 1/30/18 10:38 AM, harold seigel wrote:
> Hi,
>
> Please review this RFR for JDK-11 to reduce the number of class
> dependencies recorded by the VM. The change primarily does this by
> not recording dependencies to classes that are loaded by a builtin
> class loader and are not anonymous. These classes never get unloaded,
> so no recorded dependency is needed.
>
> Additionally, the change simplifies the code that deals with when the
> classes have the same class loader and when the dependency is to a
> class loaded by a parent loader.
>
> Open Webrev:
> http://cr.openjdk.java.net/~hseigel/bug_8190359/webrev/index.html
>
> JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8190359
>
> The change was tested with JPRT, Mach 5 tier1 - tier5 tests, and
> non-colocated tonga tests. Additionally, print statements were
> temporarily added to the code and the output analyzed to check that
> dependencies were being correctly recorded or not recorded.
>
> Thanks, Harold
More information about the hotspot-runtime-dev
mailing list