RFR: 8272854: split runtime/CommandLine/PrintTouchedMethods.java test

David Holmes dholmes at openjdk.java.net
Tue Aug 24 07:21:25 UTC 2021

On Mon, 23 Aug 2021 21:30:07 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:

> Hi all,
> could you please review this patch that extracts part of `runtime/CommandLine/PrintTouchedMethods.java` test to `runtime/CommandLine/PrintTouchedMethodsJcmd.java`?
> from JBS:
>> part of `runtime/CommandLine/PrintTouchedMethods.java` test can be done in a driver mode and ignore external flags, while another part should be executed in an othervm mode. to make execution mode efficient, the test can be split into two.
> testing: ``runtime/CommandLine/` on `{linux,windows,macos}-x64`
> -- Igor

test/hotspot/jtreg/runtime/CommandLine/PrintTouchedMethodsJcmd.java line 42:

> 40:       var pid = Long.toString(ProcessHandle.current().pid());
> 41:       var pb = new ProcessBuilder();
> 42:       pb.command(new String[] {JDKToolFinder.getJDKTool("jcmd"), pid, "VM.print_touched_methods"});

Can't you just include the desired VM flags as part of the String[] here and keep everything in one file and using driver mode?


PR: https://git.openjdk.java.net/jdk/pull/5231

More information about the hotspot-runtime-dev mailing list