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

c2 performance: very high compile times while running SPECjvm98 javac

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_9

      Description

      c2 is reporting very high compile times while running SPECjvm98 javac sub-test. The problem is not limited to overall time spent in compilation, but there are large outliers in the range of compile times.
       
      Mantis is 36% behind the competition on SPECjvm98 javac, and 16% behind the competition on SPECjvm98 composite score, javac is the sub-test in which we are furthest behind.

      SPECjvm98 javac is the 1.0.2 release of javac. compileClass (see below) is a big 370 line method, including several try/catches, which may be suggestive.

      The 1.0.2 javac source can be found here:
      /java/re/jdk/1.0.2/archive/ws/JDK1.0.2/src/share/sun/sun/tools/javac

      The SPECjvm98 test bits and scripts can be found here:
      /net/thirdeye.east/software/performance/jvm98/jvm98.c2perf.zip

      The script to run just the javac subtest is: runjvm98-javac.sh
      The path to the JVM in the test script along with the results variable output directory name will need to be edited.

      INSERT: ----- TIMES BELOW ARE FOR A DEBUG BUILD OF THE VM -----

      Below is a list of the top 10 highest compile times. The times below have been visually confirmed to be seconds.

      top 10 highest C2 compile times reported by -XX:+PrintCompilation -XX:+CITimeEach (debug VM)

      288 s! spec.benchmarks._213_javac.Javac::compile (1289 bytes)
      288 seconds: 49.430146 bytes/sec : 26.077204 (bytes 1289 + 0 inlined)
       74 ! spec.benchmarks._213_javac.SourceClass::compileClass (1665 bytes)
       74 seconds: 38.492589 bytes/sec : 43.255081 (bytes 1665 + 0 inlined)
      117 ! spec.benchmarks._213_javac.SourceField::check (949 bytes)
      117 seconds: 18.440095 bytes/sec : 51.463943 (bytes 949 + 0 inlined)
      299 spec.benchmarks._213_javac.Parser::parseTerm (1469 bytes)
      299 seconds: 16.102687 bytes/sec : 91.227013 (bytes 1469 + 0 inlined)
      173 ! spec.benchmarks._213_javac.Parser::parseStatement (1576 bytes)
      173 seconds: 13.819106 bytes/sec : 114.045006 (bytes 1576 + 0 inlined)
      184 ! spec.benchmarks._213_javac.BatchParser::beginClass (385 bytes)
      184 seconds: 11.601863 bytes/sec : 33.184326 (bytes 385 + 0 inlined)
        3% spec.benchmarks._213_javac.Parser::parseExpression @ 8 (1135 bytes)
        3 seconds: 11.572973 bytes/sec : 98.073334 (bytes 1135 + 0 inlined)
      215 spec.benchmarks._213_javac.Instruction::write (1380 bytes)
      215 seconds: 10.700115 bytes/sec : 128.970566 (bytes 1380 + 0 inlined)
      239 spec.benchmarks._213_javac.BinaryClass::load (493 bytes)
      239 seconds: 10.432496 bytes/sec : 47.256191 (bytes 493 + 0 inlined)
      198 ! spec.benchmarks._213_javac.MethodExpression::checkValue (1030 bytes)
      198 seconds: 10.106472 bytes/sec : 101.914886 (bytes 1030 + 0 inlined)


      Overall Compile Time Summary and Comparison:


      C1 Compile Time as reported by -XX:+CITime running java

       Total compilation time : 2.372 s
          Standard compilation : 2.370 s, Average : 0.004
          On stack replacement : 0.000 s, Average : NaN
          Native methods : 0.002 s, Average : 0.000
          Detailed C1 Timings
             Setup time: 0.123 s ( 5.3%)
             Build IR: 1.037 s (44.2%)
               Optimize: 0.086 s ( 3.7%)
               Loop Comp.: 0.033 s ( 1.4%)
             Emit LIR: 0.359 s (15.3%)
             Cache Locals: 0.122 s ( 5.2%)
             LIR Optimize: 0.224 s ( 9.5%)
             Code Emission: 0.378 s (16.1%)
             Code Installation: 0.103 s ( 4.4%)
             Instruction Nodes: 114820 nodes

        Total compiled bytecodes : 120954 bytes
          Standard compilation : 120954 bytes
          On stack replacement : 0 bytes
        Average compilation speed: 50985 bytes/s

        nmethod code size : 507348 bytes
        nmethod total size : 1229768 bytes

      C2 Compile Time as reported by -XX:+CITime running javac

        Total compilation time : 50.903 s
          Standard compilation : 49.395 s, Average : 0.117
          On stack replacement : 1.482 s, Average : 0.185
          Native methods : 0.026 s, Average : 0.004

        Total compiled bytecodes : 79767 bytes
          Standard compilation : 76544 bytes
          On stack replacement : 3223 bytes
        Average compilation speed: 4726 bytes/s

        nmethod code size : 640036 bytes
        nmethod total size : 1359828 bytes


      C2 Compile Time as reported by -XX:+CITime running mpeg

        Total compilation time : 5.253 s
          Standard compilation : 5.165 s, Average : 0.055
          On stack replacement : 0.074 s, Average : 0.018
          Native methods : 0.015 s, Average : 0.005

        Total compiled bytecodes : 15029 bytes
          Standard compilation : 14652 bytes
          On stack replacement : 377 bytes
        Average compilation speed: 3166 bytes/s

        nmethod code size : 65584 bytes
        nmethod total size : 114108 bytes


        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mpalecznsunw Michael Paleczny (Inactive)
              Reporter:
              ddkeenan David Keenan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: