RFR: 8311240: Eliminate usage of testcases.jar from TestMetaSpaceLog.java
Daohan Qu
dqu at openjdk.org
Thu Jul 13 11:57:10 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. ~IMHO, it is also what this issue intended to do. But now the issue name becomes sort of misleading.~
>
> 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.
Hi @lkorinth, is this the change you had in mind? :P
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14804#issuecomment-1634110439
More information about the hotspot-gc-dev
mailing list