On Thu, 25 Jul 2024 23:36:02 GMT, Shaojin Wen <d...@openjdk.org> wrote:

>> test/micro/org/openjdk/bench/java/lang/StringConcatGenerate.java line 47:
>> 
>>> 45: @Measurement(iterations = 5, time = 1000, timeUnit = 
>>> TimeUnit.MILLISECONDS)
>>> 46: @Fork(value = 3, jvmArgsAppend = 
>>> "-Djava.lang.invoke.StringConcat.highArityThreshold=0")
>>> 47: public class StringConcatGenerate extends StringConcat {
>> 
>> Adding a subclass with an overridden `@Fork` to pass a different 
>> `jvmArgsAppend` is a reasonable trick, but could be moved to a nested class 
>> within `StringConcat` to keep it in the same context. I'm not sure if this 
>> micro brings a persistent added value, though: for experimentation we can 
>> just run `StringConcat` with different 
>> `-Djava.lang.invoke.StringConcat.highArityThreshold` settings, while for 
>> continuous regression testing we're more interested in validating the 
>> default settings. Supplying the new `main` method doesn't add anything here, 
>> either, since a standalone execution wouldn't pick up the `jvmArgsAppend` 
>> value.
>
> I have removed the newly added micro benchmark. But I don't know how to add 
> jvmArgs in make test.
> 
> This will give an error
> 
> make test TEST="micro:java.lang.StringConcat.concat6String" 
> -Djava.lang.invoke.StringConcat.highArityThreshold=0

make test TEST=micro:StringConcatStartup 
MICRO="VM_OPTIONS=-Djava.lang.invoke.StringConcat.highArityThreshold=0"

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20273#discussion_r1694226342

Reply via email to