Timing bugs

Gary Adams gary.adams at oracle.com
Fri Nov 4 13:36:53 UTC 2011

  I've started to look at timing related bugs that have been open
for a while, but have not had sufficient priority to make it to the
top of the list of bugs to be fixed. Thought I'd start with some
low hanging fruit with simple bug fixes.

6731620: TEST_BUG: java/util/Timer/Args.java is too optimistic about the 
execution time of System.out.printf

This seems like a simply problem to avoid two calls to get the current time
and to eliminated the time to process the print statement
from the evaluation of the test elapsed time.

Replacing this sequence ;

         System.out.printf("elapsed=%d%n", System.currentTimeMillis() - start);
         check(System.currentTimeMillis() - start < 500);


         elapsed = System.currentTimeMillis() - start;
         System.out.printf("elapsed=%d%n", elapsed);
         check(elapsed < 500);

I plan to test the fix on a 300MHz linux/arm device.
I'll provide a proper webrev as soon as I have author rights
confirmed. I'm looking for reviewer and a committer,
once I get the fix tested locally.

   Gary Adams

More information about the core-libs-dev mailing list