Integrated: 8311240: Eliminate usage of testcases.jar from TestMetaSpaceLog.java

Daohan Qu dqu at openjdk.org
Tue Aug 22 12:54:39 UTC 2023


On Fri, 7 Jul 2023 13:15:06 GMT, Daohan Qu <dqu at openjdk.org> wrote:

> This patch eliminates the usage of `testcases.jar` from `TestMetaSpaceLog.java` and removes this jar file.
> 
> As [this email](https://mail.openjdk.org/pipermail/hotspot-gc-dev/2018-September/023343.html) said, `TestMetaSpaceLog.java` (imported in [JDK-8211123](https://bugs.openjdk.org/browse/JDK-8211123)) tries to fill the metaspace, then do a full GC and check if metaspace size does shrink. It fills the metaspace by creating many new `URLClassLoader`s to load classes from an external jar file (`testcases.jar`).
> 
> Now we could use `jdk.test.lib.compiler.InMemoryJavaCompiler` and `jdk.test.lib.ByteCodeLoader` to achieve the same goal. In this way, we don't need this jar file at all and could remove it. (The similar idea has been proposed in [JDK-8211255](https://bugs.openjdk.org/browse/JDK-8211255) and also discussed in the email thread mentioned above. But that issue was closed and not fixed for some unknown reasons :() Anyway, leaving a binary file in VCS is not good.

This pull request has now been integrated.

Changeset: 6b9df037
Author:    Daohan Qu <dqu at openjdk.org>
Committer: Albert Mingkun Yang <ayang at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/6b9df037e4c3d75d0f413a2bb94d8ce6880ce2fa
Stats:     28 lines in 2 files changed: 6 ins; 16 del; 6 mod

8311240: Eliminate usage of testcases.jar from TestMetaSpaceLog.java

Reviewed-by: ayang, tschatzl

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

PR: https://git.openjdk.org/jdk/pull/14804


More information about the hotspot-gc-dev mailing list