RFR: 8330625: Compilation memory statistic: prevent tearing of the final report [v2]
Tobias Hartmann
thartmann at openjdk.org
Wed Apr 24 05:28:27 UTC 2024
On Tue, 23 Apr 2024 05:26:53 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
>
> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>
> print newlines around report
Looks good to me too.
-------------
Marked as reviewed by thartmann (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18866#pullrequestreview-2018855555
More information about the hotspot-compiler-dev
mailing list