RFR: 8351491: Add info from release file to hserr file [v3]
Thomas Stuefe
stuefe at openjdk.org
Thu Apr 3 16:15:00 UTC 2025
On Thu, 3 Apr 2025 15:47:27 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
>> The release file of the JDK image contains useful info, for example the SOURCE used to built this image e.g.
>> SOURCE=".:git:21af8c7e7405"
>> Also the MODULES list is probably useful to have.
>> Add this info (or the complete content of the release file) to the hs_err files.
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> use one time PeriodicTask
Coming to this discussion late.
IMHO this is overengineered for just a printout to the hs-err file during error dumping. We already read from proc fs. Proc can be worse (depending on what you read, a lot) than reading sequentially from a flat file.
Remember that we already run the JVM binaries from the same file system. We read debug information from those binaries during error dumping, and that causes a ton of IO; a sequential read of a tiny file is a drop in the bucket.
Also remember that we have safety fuses: Step timeouts and Step signal handling - so if this read ever turns out to be a problem, e.g by hanging, the Step would be cancelled and error reporting would continue with the next step.
I would, however, attempt to avoid malloc. Not super important, but if its easy to do I would do it. Best by using a small fixed-sized stack-allocated buffer, and just printing the file line by line.
Just my 5 cent.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24244#issuecomment-2776304991
More information about the hotspot-dev
mailing list