RFR: 8330625: Compilation memory statistic: prevent tearing of the final report

Vladimir Kozlov kvn at openjdk.org
Mon Apr 22 18:03:28 UTC 2024


On Fri, 19 Apr 2024 13:50:02 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> 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

Good.

What kind of testing you do for changes in this code?

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

Marked as reviewed by kvn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/18866#pullrequestreview-2015477337


More information about the hotspot-compiler-dev mailing list