| simple combined listener that checks if a thread seems to do idle loops that
might starve other threads. The most classical case is a "busy wait" loop
like
for (long l=0; l<1000000; l++);
which would give us a pretty long path. Even worse, things like
while (true);
would never return if we don't break the partial order execution loop. Once
IdleFilter determines a thread is not doing anything useful (no field access,
no array element access, no method calls, huge number of back jumps), it
breaks the POR loop and increases a counter. If it encounters the same thread
doing this again consecutively, it marks the state as seen, which prunes the
whole search tree underneath it
|