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

Avoid resolving method_kind in AbstractInterpreter::can_be_compiled

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 10
    • hotspot
    • b21

      compilationPolicy.cpp calls AbstractInterpreter::can_be_compiled during linking and resolve steps, which is somewhat costly and affects startup:

        if (!AbstractInterpreter::can_be_compiled(m)) {
          return false;
        }

      It would seem that rather than resolving the method_kind(m) in can_be_compiled, it would suffice to switch on m->intrinsic_id():

      switch (m->intrinsic_id()) {
            case vmIntrinsics::_dsin : // fall thru
          ...

      This significantly reduces the cost of AbstractInterpreter::can_be_compiled

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

              Created:
              Updated:
              Resolved: