RFR for JDK-7027502: Test failures in demo/jvmti/hprof testcases, need to be othervm

Paul Sandoz paul.sandoz at oracle.com
Thu Jan 9 10:28:40 UTC 2014


On Jan 9, 2014, at 10:52 AM, Tristan Yan <tristan.yan at oracle.com> wrote:

> Can someone else give a second review on this.

In a comment the bug you state:

  "here total_turns_taken is a static variable, it could affect by other tests"

I don't quite know under what test circumstances that can happen, but if so is the following also an issue:

  52     private final static TurnChecker turn = new TurnChecker(-1);

?

FWIW an alternative to using an AtomicInteger would be for the main loop to sum up thread_turns of each Context, since read/writes are all performed in a synchronized block. 

Paul.


More information about the core-libs-dev mailing list