Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4130231

SpecJava v18 reports bogus timing results with JIT on.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.1.6
    • 1.2.0
    • vm-legacy
    • None
    • 1.1.6
    • generic
    • windows_nt
    • Not verified


        All the benchmarks report 0.0010 secs on Win32 with the JIT on. This happens
        with JDK1.2beta4 and JDK1.1.6

        The following seems to be the problem -

        At the end of a benchmark run a BenchmarkTime is contructed.

        BenchmarkTime time = new BenchmarkTime(System.currentTimeMillis() - startTime);

        and here's the constructor --

        public BenchmarkTime (long millis){
            if (millis <= 0)
                millis = 1;
            this.millis = millis;
        }

        it turns out millis value is 0. But, if this value is printed out
        using System.out.println before or in the constructor, the right
        value is reported.




              dviswanasunw Deepa Viswanathan (Inactive)
              dviswanasunw Deepa Viswanathan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: