Integrated: 8348401: [IR Framework] PrintTimes should not require verbose

Theo Weidmann tweidmann at openjdk.org
Tue Jan 28 09:43:52 UTC 2025


On Thu, 23 Jan 2025 12:32:35 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

This pull request has now been integrated.

Changeset: 1f74caa7
Author:    Theo Weidmann <tweidmann at openjdk.org>
Committer: Christian Hagedorn <chagedorn at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/1f74caa7da9dc0bf0eb515b36791f6fd069e044d
Stats:     13 lines in 2 files changed: 10 ins; 0 del; 3 mod

8348401: [IR Framework] PrintTimes should not require verbose

Reviewed-by: kvn, chagedorn

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

PR: https://git.openjdk.org/jdk/pull/23267


More information about the hotspot-compiler-dev mailing list