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

some methods are deoptimized and recompiled every time they are called

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • hotspot
    • None
    • beta2
    • sparc
    • solaris_8

      Run java_g (or java fastdebug) with the following arguments:
      -Xbatch -Xcomp -XX:+PrintOpto -jar Java2Demo122.jar -runs=5 -ccthread

      After about 8100 compilations, you will see many lines of this form:
      8122 DemoSurface::createGraphics2D (145 bytes)

      (See a larger example below.)

      The problem is an uncommon trap that forces the method to be recompiled,
      but without removing the occasion for the trap. There is a class which
      the compiler thinks is unloaded, but the runtime thinks is already loaded.
      The class is java/awt/RenderingHints$Key in this case.



      8095 java.awt.Font$FontLineMetrics::getHeight (5 bytes)
      8096s java.awt.geom.GeneralPath::reset (11 bytes)
      8097 demos.Composite.ACrules::drawCompBI (467 bytes)
      8098 java.awt.Font$FontLineMetrics::getDescent (5 bytes)
      8099 DemoSurface::getSleepAmount (5 bytes)
      8100 DemoSurface::createGraphics2D (145 bytes)
      8101 DemoSurface::createGraphics2D (145 bytes)
      8102 java.awt.geom.RoundRectangle2D$Float::<init> (18 bytes)
      8103 java.awt.geom.RoundRectangle2D$Float::setRoundRect (34 bytes)
      8104 java.awt.geom.RoundRectIterator::<clinit> (533 bytes)
      8105 java.awt.geom.RoundRectIterator::<init> (104 bytes)
      8106 java.awt.geom.RoundRectangle2D$Float::getX (6 bytes)
      8107 java.awt.geom.RoundRectangle2D$Float::getY (6 bytes)
      8108 java.awt.geom.RoundRectangle2D$Float::getWidth (6 bytes)
      8109 java.awt.geom.RoundRectangle2D$Float::getHeight (6 bytes)
      8110 java.awt.geom.RoundRectangle2D$Float::getArcWidth (6 bytes)
      8111 java.awt.geom.RoundRectangle2D$Float::getArcHeight (6 bytes)
      8112 java.awt.geom.RoundRectIterator::isDone (17 bytes)
      8113 java.awt.image.IndexColorModel::<init> (319 bytes)
      8114 Java2Demo$J2DIcon::paintIcon (71 bytes)
      8115 DemoSurface::createGraphics2D (145 bytes)
      8116 DemoSurface::createGraphics2D (145 bytes)
      8117 DemoSurface::createGraphics2D (145 bytes)
      8118 DemoSurface::createGraphics2D (145 bytes)
      8119 DemoSurface::createGraphics2D (145 bytes)
      8120 DemoSurface::createGraphics2D (145 bytes)
      8121 DemoSurface::createGraphics2D (145 bytes)
      8122 DemoSurface::createGraphics2D (145 bytes)
      8123 DemoSurface::createGraphics2D (145 bytes)
      8124 DemoSurface::createGraphics2D (145 bytes)
      8125 DemoSurface::createGraphics2D (145 bytes)
      8126 DemoSurface::createGraphics2D (145 bytes)

            cclicksunw Clifford Click (Inactive)
            jrose John Rose
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: