RFR: 8338428: Print final VM flags for task [v3]

Leonid Mesnik lmesnik at openjdk.org
Thu Jan 16 05:07:36 UTC 2025


On Thu, 16 Jan 2025 05:03:37 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

>> Some VM flags might depend on the environment and it makes sense to log final flags so it is possible to get their value when investigating failures.
>> 
>> I added them to VMProps, so it is always dump final flags before running tests using "-XX:+PrintFlagsFinal".
>> 
>> Update:
>> There were intermittent compilation failures when I tried to use classes from testlibrary, so I rewrtite the code without them.
>
> Leonid Mesnik has updated the pull request incrementally with three additional commits since the last revision:
> 
>  - seconnd attempt
>  - Revert "updated VMProps"
>    
>    This reverts commit 6af3f1c6d72353ec5d40b9d1fde05771ef102141.
>  - Revert "The test lib is not ued"
>    
>    This reverts commit 919c870e0475597f4128b663c3f303ae56d06e1c.

This trick should work. 
When jtreg execute GetJDKProperties  VMProps to know properties to rrequires, it parse input and supress sterr. It requires too much changes to update it's output in the backward compatible way. 
So the simplest fix would be to dump whol VM output with final flags into a file.
While it is possible to add WB API for this, I would prefer to don't add code if possible to avoid this.

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

PR Comment: https://git.openjdk.org/jdk/pull/23054#issuecomment-2594545026


More information about the hotspot-dev mailing list