RFR: 8308116: jdk.test.lib.compiler.InMemoryJavaCompiler.compile does not close files
Axel Boldt-Christmas
aboldtch at openjdk.org
Tue May 16 08:13:47 UTC 2023
jdk.test.lib.compiler.InMemoryJavaCompiler.compile(String className, CharSequence sourceCode, String... options) creates a JavaFileManager but fails to close it after the CompilationTask is completed, leaving the file descriptors open until reference processing kicks in.
Graph below shows number of open file descriptors before and after this patch for a program which compiles dummy classes in a loop.
<img width="1116" alt="Before and after" src="https://github.com/openjdk/jdk/assets/1139284/1ecfb32a-735b-4765-bcca-81f67a4c9816">
Testing: GHA and Oracle CI tier1-3. Tests using jdk.test.lib.compiler.InMemoryJavaCompiler also tested locally.
-------------
Commit messages:
- Fix tests
- 8308116: jdk.test.lib.compiler.InMemoryJavaCompiler.compile does not close files
Changes: https://git.openjdk.org/jdk/pull/14001/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14001&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8308116
Stats: 57 lines in 6 files changed: 45 ins; 2 del; 10 mod
Patch: https://git.openjdk.org/jdk/pull/14001.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14001/head:pull/14001
PR: https://git.openjdk.org/jdk/pull/14001
More information about the hotspot-runtime-dev
mailing list