简体   繁体   English

是否有一个旨在调试并发软件的JVM?

[英]Is there a JVM aimed at debugging concurrent software?

I've used Concurrent Pascal, a tool which helps debug concurrent algorithms because when it runs your code, it randomizes which thread to swap to at every possible step, trying out as many paths as possible. 我使用了Concurrent Pascal,这是一个帮助调试并发算法的工具,因为当它运行你的代码时,它会随机化哪个线程在每个可能的步骤交换,尝试尽可能多的路径。

Is there a JVM that can do this? 有没有JVM可以做到这一点?

There are no commercial JVMs I'm aware of that do this, but I suggest you look at tools like ConTest that try to help you in your problem domain: 没有商业JVM,我知道这样做,但我建议你看看像ConTest这样的工具,试图在你的问题领域帮助你:

ConTest on developerWorks 在developerWorks上进行ConTest

ConTest on research site 在研究现场进行ConTest

In general, because most commerical JVMs rely on the OS to do thread scheduling, it's not a natural thing for JVMs themselves to do. 一般来说,因为大多数商业JVM都依赖操作系统来进行线程调度,所以JVM自己做这件事并不自然。 There might be something out there for the green-threads versions of Jikes-RVM (which might be the older ones). 对于Jikes-RVM的绿色线程版本(可能是旧版本),可能会有一些东西。

Take a look at the Java Pathfinder (from NASA, nonetheless—and it's free). 看一下Java Pathfinder (来自NASA,但它是免费的)。 I think it should do what you need almost out of the box, that is, trying different interleavings (some assembly may be required). 我认为它应该开箱即用,即尝试不同的交错(可能需要一些组装)。

Of course, you still need to specify the verification property on your data that you're interested in, like an invariant. 当然,您仍需要在数据上指定您感兴趣的验证属性,例如不变量。 Otherwise, by default it would probably only tell you if there was a deadlock. 否则,默认情况下它可能只会告诉您是否存在死锁。 Take a look at the section "Explore Execution Alternatives". 请查看“探索执行替代方案”部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM