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

Improve CompilerOracle::has_option queries

XMLWordPrintable

      CompilerOracle::has_option and has_option_value take a const methodHandle&, but is called using a Method* in several places, which cause implicit conversions that amount to a small overhead during compilation and profiling (~methodHandle in particular is not inlined, and potentially does a non-trivial amount of work)

      In the normal case of when there is no CompilerOracle options set we can profitably avoid this overhead by first checking CompilerOracle::has_any_option(). This method should also be made inlineable.

      Relatedly, in ciMethod::has_option* we take a costly transition from native to VM to check if a method has some option. First checking has_any_option seems safe to do without the transition overhead (no need for the methodHandle).

            redestad Claes Redestad
            redestad Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: