RFR: 8311240: Eliminate usage of testcases.jar from TestMetaSpaceLog.java
Daohan Qu
dqu at openjdk.org
Fri Aug 4 15:25:30 UTC 2023
On Fri, 4 Aug 2023 15:03:47 GMT, Albert Mingkun Yang <ayang 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.
>
> Marked as reviewed by ayang (Reviewer).
Thanks very much for your review @albertnetymk !
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14804#issuecomment-1665781005
More information about the hotspot-gc-dev
mailing list