RFR: 8348401: [IR Framework] PrintTimes should not require verbose [v4]

Christian Hagedorn chagedorn at openjdk.org
Mon Jan 27 14:42:47 UTC 2025


On Mon, 27 Jan 2025 14:13:28 GMT, Theo Weidmann <tweidmann at openjdk.org> wrote:

>> The flag -DPrintTimes=true currently only prints the measured execution time if -DVerbose=true is also used. This patch removes the dependency on -DVerbose=true. 
>> 
>> The measurements are made by the test vm (the VM spawned by the IR framework), which tries to print it to stdout. Since the stdout of the test VM is hidden unless the Verbose or ReportStdout flag are used, the printed times are not visible without these flags. 
>> 
>> This patch addresses this by using the TestFrameworkSocket, which is used by the parent jtreg VM and the test VM to communicate. By sending the prints through the TestFrameworkSocket with the parameter stdout set to true, the parent VM will print the received messages to its stdout, making it visible to the user.
>> 
>> Example command:
>> 
>> 
>> jtreg -jdk:build/fastdeb/jdk -verbose:all -vmoptions:"-DPrintTimes=true"
>> 
>> 
>> Example output:
>> 
>> 
>> Messages from Test VM
>> ---------------------
>> [PRINT_TIMES] testIntArrayRunner:             66530333 ns
>> [PRINT_TIMES] testShortArrayRunner:          108031125 ns
>> [PRINT_TIMES] testLongArrayRunner:           159549917 ns
>> [PRINT_TIMES] testByteArrayRunner:           201181042 ns
>
> Theo Weidmann has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Move description

That looks good!

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

Marked as reviewed by chagedorn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/23267#pullrequestreview-2575625831


More information about the hotspot-compiler-dev mailing list