RFR: 7903756: jcstress: Skip debugging JVM options for sub-processes [v7]

Aleksey Shipilev shade at openjdk.org
Mon Jul 8 15:50:46 UTC 2024


On Mon, 8 Jul 2024 15:05:31 GMT, Jiří Vaněk <jvanek at openjdk.org> wrote:

>> No longer passing any -agentlib to subprocesses, unless it is part of -jvmArgsPrepend, thus allowing to debug both jcstress itself or wrked vm as expected:
>> 
>> java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005  -jar tests-all/target/jcstress.jar -c 1 -jvmArgsPrepend "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5006"
>> 
>> works.
>
> Jiří Vaněk has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Enabled GHA

Only stylistic nits, otherwise good. Fix those, and once GHA is green, we can integrate.

jcstress-core/src/main/java/org/openjdk/jcstress/vm/VMSupport.java line 398:

> 396: 
> 397:     private static Config cleanArgs(Config orig) {
> 398:         List<String> l = orig.args.stream().filter(s -> !s.startsWith("-agentlib:jdwp")).collect(Collectors.toList());

Suggestion:

        List<String> l = orig.args.stream()
            .filter(s -> !s.startsWith("-agentlib:jdwp"))
            .collect(Collectors.toList());

jcstress-core/src/main/java/org/openjdk/jcstress/vm/VMSupport.java line 457:

> 455:                     .collect(Collectors.toCollection(LinkedHashSet::new));
> 456:         }
> 457:         configs = configs.stream()

Suggestion:


        // Filter out unwanted arguments.
        configs = configs.stream()

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

Marked as reviewed by shade (Committer).

PR Review: https://git.openjdk.org/jcstress/pull/150#pullrequestreview-2163733954
PR Review Comment: https://git.openjdk.org/jcstress/pull/150#discussion_r1668886170
PR Review Comment: https://git.openjdk.org/jcstress/pull/150#discussion_r1668887726


More information about the jcstress-dev mailing list