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

JSR 292: extend call site profiling to detect stable receiver values

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • hs25, 8, 9, 10
    • hotspot

      Some call sites, especially in dynamic languages or delegation-based systems, are not only monomorphic in type, but also have stable receiver values. In other words, the same receiver ('this') is always used at the call site. If this condition can be detected, the JIT can optimistically compile code which knows not only the type of the receiver (as with monomorphic call sites) but also the identity of the receiver, including all final (or otherwise stable) fields.

      This may be especially useful with method handles, where the JIT is able to inline the entire behavior of a method handle graph, once it is given a constant root of the graph.

      It may also be useful for programs which use "golden objects", i.e., a class with a single instance. (There are simpler ways of detecting and optimizing golden objects, however.)

            roland Roland Westrelin
            jrose John Rose
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: