首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行jcstress时出错: VM选项'StressLCM‘已开发,且仅在调试版本的VM中可用

运行jcstress时出错: VM选项'StressLCM‘已开发,且仅在调试版本的VM中可用
EN

Stack Overflow用户
提问于 2019-02-06 04:15:13
回答 2查看 304关注 0票数 1

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

代码语言:javascript
复制
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.

完整日志:

代码语言:javascript
复制
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)

我用来运行测试的命令:

代码语言:javascript
复制
java -cp jars/jcstress-core-0.5.jar:jars/jopt-simple-4.6.jar org.openjdk.jcstress.Main
EN

回答 2

Stack Overflow用户

发布于 2021-10-14 06:24:00

当您尝试JDK 16/17这样的最新版本时,它应该可以正常工作。

票数 1
EN

Stack Overflow用户

发布于 2019-04-23 14:51:13

您没有说您使用的是哪个版本的Java。但对于来自Oracle的Windows JDK-8版本,同样的事情也会发生在我身上。不过,JDK-12似乎还不错。此外,您还可以尝试其中之一:https://builds.shipilev.net/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54542348

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档