RFR: 8308116: jdk.test.lib.compiler.InMemoryJavaCompiler.compile does not close files [v4]

Axel Boldt-Christmas aboldtch at openjdk.org
Mon May 22 16:09:48 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.

Axel Boldt-Christmas has updated the pull request incrementally with three additional commits since the last revision:

 - Refactor to close JavaFileManager directly
 - Revert "Feedback: Update Copyright years"
   
   This reverts commit 932ebc043f00c57873697500e6ff6a7764bbc185.
 - Revert "Fix tests"
   
   This reverts commit 3223959a1f7f9db9b202128487c66cb7109d920a.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14001/files
  - new: https://git.openjdk.org/jdk/pull/14001/files/99fde73c..78740c61

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14001&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14001&range=02-03

  Stats: 68 lines in 6 files changed: 4 ins; 52 del; 12 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