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

Checkcast-arraycopy stub for G1 is very slow

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • hs25
    • hotspot
    • gc

      Profiles from refworkload/wls_webapp_atomic indicate that the checkcast_arraycopy stub for G1 is very slow compared to parallel gc which spends almost no time in there. In detail from a vtune trace:

      3.698 weblogic.servlet.internal.ServletRequestImpl.getParameter(java.lang.String)
        ->1.755 checkcast_arraycopy
             ->1.722 BarrierSet::static_write_ref_array_post(HeapWord*, unsigned long)
             ->0.652 BarrierSet::static_write_ref_array_pre(HeapWord*, unsigned long)
             -> 0.202 G1SATBCardTableModRefBS::write_ref_array_pre(unsigned*, int, bool)

      I.e. G1 calls helper methods, while in parallel gc these are inlined.

      One idea to mitigate this is to move some checks inline into the checkcast_arraycopy, e.g. for the pre barrier the marking-active check, and for the post barrier a young gen check.

            Unassigned Unassigned
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: