1 Reply Latest reply on Apr 28, 2009 1:46 PM by 807557

    Compilation Jitter despite ITC


      I'm using Initialization Time Compilation to preload and preinitialize ALL classes I'm using and precompile ALL methods my Application has. The precompile- and preinit-lists are created by the VM using -XX:+RTSJBuildCompilationList and -XX:+RTSJBuildClassInitializationList. This is done during a pre-run of my application. After that my application is started again with the currently built lists.

      At this point I don't expect any JIT any more during runtime. But for example the Thread Visualizer tool reports some Compiler acitivity (it's minimal, but it's there) when a new RealtimeThread (an own class, entered first time during this exeution) is created and started after about 3 seconds of execution time.

      Are the auto-generated initialization- and compilation-lists by the VM not complete? Or why is there still come compiler-activity during runtime?

        • 1. Re: Compilation Jitter despite ITC
          Note that getting the right lists require at least three runs of the application:

          Step 1: Generate the initial compilation list
           java -XX:+RTSJBuildCompilationList <app> <args>
          Step 2: Expand compilation list using code-coverage (if needed)
           java -XX:+RTSJBuildCompilationList -Drtsj.precompile=nhrt.precompile <app> <newargs>
          Step 3: Based on the compilation list generate the list of classes that need pre-loading & initializing
           java -XX:+RTSJBuildClassInitializationList -Drtsj.precompile=nhrt.precompile <app> <args>
          Step 4: Use both sets of lists to run the application
           java -Drtsj.precompile=nhrt.precompile -Drtsj.preinit=itc.preinit <app> <args>
          You might need to manually adjust the lists as well. Use -XX:+PrintCompilation to show which methods are getting compiled, and watch for compilations that occur after you expect.

          That said, there are some problems with ITC in 2.1 that can cause some things not to be pre-compiled. In addition sometimes the compilation activity is actually doing patching that couldn't be done at pre-init time.

          David Holmes