Removing intrinsic of Thread.isInterrupted() (original) (raw)

Florian Weimer fweimer at redhat.com
Tue Feb 25 00:31:00 PST 2014


On 02/25/2014 02:46 AM, Yumin Qi wrote:

isum = 0L; for (int i = 0; i < NUM; i++) { start = System.currentTimeMillis(); t.isInterrupted(); finish = System.currentTimeMillis(); isum += (finish - start); }

This benchmark loop looks invalid to me. I think you have to store the result of t.isInterrupted(), perhaps to an array of booleans, and time the entire thing, not just the call itself.

-- Florian Weimer / Red Hat Product Security Team



More information about the hotspot-compiler-dev mailing list