运行jcstress期间出错:VM选项'StressLCM'正在开发,仅在VM的调试版本中可用

问题描述 投票:0回答:1

我正在尝试运行jcstress 0.5,但我收到一个错误:

Error: VM option 'StressLCM' is develop and is available only in debug version of VM.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

完整日志:

Probing what VM modes are available:
 (failures are non-fatal, but may miss some interesting cases)

----- [OK] [-Xint]
----- [OK] [-XX:TieredStopAtLevel=1]
----- [OK] []
----- [N/A] [-XX:+UnlockDiagnosticVMOptions, -XX:+StressLCM, -XX:+StressGCM]
Error: VM option 'StressLCM' is develop and is available only in debug version of VM.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.


----- [OK] [-XX:-TieredCompilation]
----- [N/A] [-XX:-TieredCompilation, -XX:+UnlockDiagnosticVMOptions, -XX:+StressLCM, -XX:+StressGCM]
Error: VM option 'StressLCM' is develop and is available only in debug version of VM.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.



Initializing and probing the target VM: 
 (all failures are non-fatal, but may affect testing accuracy)

----- [OK] Unlocking diagnostic VM options
Burning up to figure out the exact CPU count....... done!

----- [OK] Trimming down the default VM heap size to 1/8-th of max RAM
----- [OK] Trimming down the number of compiler threads
----- [OK] Trimming down the number of parallel GC threads
----- [OK] Trimming down the number of concurrent GC threads
----- [OK] Trimming down the number of G1 concurrent refinement GC threads
----- [OK] Testing @Contended works on all results and infra objects
----- [OK] Unlocking Whitebox API for online de-optimization
----- [OK] Testing allocation profiling
----- [FAILED] Trying Thread.onSpinWait
Exception in thread "main" java.lang.NoSuchMethodError: java.lang.Thread.onSpinWait()V
    at org.openjdk.jcstress.vm.ThreadSpinWaitTestMain.main(ThreadSpinWaitTestMain.java:30)


  Hardware threads in use/available: 8/8, no yielding.
  Test preset mode: "default"
  Writing the test results to "jcstress-results-2019-02-05-22-08-52.bin.gz"
  Parsing results to "results/"
  Running each test matching ".*" for 1 forks, 5 iterations, 1000 ms each
  Each JVM would execute at most 5 tests in the row.
  Solo stride size will be autobalanced within [10, 10000] elements, but taking no more than 100 Mb.

Exception in thread "main" java.lang.NullPointerException
    at java.io.Reader.<init>(Reader.java:78)
    at java.io.InputStreamReader.<init>(InputStreamReader.java:72)
    at org.openjdk.jcstress.infra.runners.TestList.getTests(TestList.java:53)
    at org.openjdk.jcstress.infra.runners.TestList.tests(TestList.java:105)
    at org.openjdk.jcstress.JCStress.getTests(JCStress.java:139)
    at org.openjdk.jcstress.JCStress.run(JCStress.java:67)
    at org.openjdk.jcstress.Main.main(Main.java:60)

我用来运行测试的命令:

java -cp jars/jcstress-core-0.5.jar:jars/jopt-simple-4.6.jar org.openjdk.jcstress.Main
java classpath javac jcstress
1个回答
0
投票

您没有说出您使用的是哪个版本的Java。但是,使用Oracle的Windows JDK-8构建对我来说也是如此。但JDK-12似乎还不错。此外,你可以尝试其中一个:https://builds.shipilev.net/

© www.soinside.com 2019 - 2024. All rights reserved.