RFR: 8330625: Compilation memory statistic: prevent tearing of the final report
Thomas Stuefe
stuefe at openjdk.org
Mon Apr 22 10:55:49 UTC 2024
Somewhat trivial change to reduce the chance of tearing the final compilation cost history report. See JBS for details.
---
The patch:
- upon end of a compilation, we print the the offending log line and account the cost in the compilation cost history table. For the latter we lock over NMTCompilationCostHistory_lock. The patch swaps these two actions such that we print after pulling the lock. That greatly reduces, albeit not completely removes, the chance of printing log lines into the final report. (I did not want to widen the scope of that lock to include the printout)
- also moves the locking of NMTCompilationCostHistory_lock up to the start of the reporting function to include printing the report header into the locking
-------------
Commit messages:
- Update compilationMemoryStatistic.cpp
- Update compilationMemoryStatistic.cpp
- Start
Changes: https://git.openjdk.org/jdk/pull/18866/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18866&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8330625
Stats: 39 lines in 1 file changed: 12 ins; 13 del; 14 mod
Patch: https://git.openjdk.org/jdk/pull/18866.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18866/head:pull/18866
PR: https://git.openjdk.org/jdk/pull/18866
More information about the hotspot-compiler-dev
mailing list