Skip to content
Permalink
Browse files
Launch debuggee for NSK tests with enumeratevthreads=y
  • Loading branch information
AlanBateman committed Mar 20, 2021
1 parent 590fb89 commit a981bd366607c9476280ca6d4cf99b06536c43c2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
@@ -46,7 +46,9 @@ public class SunCommandLineLauncher extends AbstractLauncher {
static private final String ARG_INIT_SUSPEND = "suspend";
static private final String ARG_QUOTE = "quote";
static private final String ARG_VM_EXEC = "vmexec";
static private final String ARG_VM_TRACK_VTHREADS = "trackvthreads";

static private final String ARG_VM_ENUMERATE_VTHREADS = "enumeratevthreads";
static private final String ARG_VM_TRACK_VTHREADS = "trackvthreads";

TransportService transportService;
Transport transport;
@@ -131,6 +133,12 @@ public String name() {
getString("sun.vm_exec"),
"java",
true);
addStringArgument(
ARG_VM_ENUMERATE_VTHREADS,
getString("sun.vm_enumerate_vthreads.label"),
getString("sun.vm_enumerate_vthreads"),
"n",
false);
addStringArgument(
ARG_VM_TRACK_VTHREADS,
getString("sun.vm_track_vthreads.label"),
@@ -163,6 +171,7 @@ static boolean hasWhitespace(String string) {
arguments)).booleanValue();
String quote = argument(ARG_QUOTE, arguments).value();
String exe = argument(ARG_VM_EXEC, arguments).value();
String enumerateVThreads = argument(ARG_VM_ENUMERATE_VTHREADS, arguments).value();
String trackVThreads = argument(ARG_VM_TRACK_VTHREADS, arguments).value();
String exePath = null;

@@ -222,6 +231,7 @@ static boolean hasWhitespace(String string) {
String xrun = "transport=" + transport().name() +
",address=" + address +
",suspend=" + (wait? 'y' : 'n') +
",enumeratevthreads=" + enumerateVThreads +
",trackvthreads=" + trackVThreads;
// Quote only if necessary in case the quote arg value is bogus
if (hasWhitespace(xrun)) {
@@ -45,6 +45,8 @@ sun.quote = Character used to combine space-delimited text into a single command
sun.quote.label = Quote
sun.vm_exec = Name of the Java VM launcher
sun.vm_exec.label = Launcher
sun.vm_enumerate_vthreads = Enumerate all virtual threads
sun.vm_enumerate_vthreads.label = Enumerate all virtual threads
sun.vm_track_vthreads = Track some or all virtual threads
sun.vm_track_vthreads.label = Track Virtual Treads
sun.description = Launches target using Sun Java VM command line and attaches to it
@@ -740,6 +740,9 @@ private Map<String,? extends Argument> setupLaunchingConnector(LaunchingConnecto
arg.setValue(argumentHandler.getLaunchExecName());
}

arg = (Connector.StringArgument) arguments.get("enumeratevthreads");
arg.setValue("y");

String vmArgs = "";

String vmUserArgs = argumentHandler.getLaunchOptions();

0 comments on commit a981bd3

Please sign in to comment.