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

Trampoline not created for far runtime targets outside small CodeCache

    XMLWordPrintable

Details

    • b04
    • aarch64

    Backports

      Description

        MacroAssembler::trampoline_call only generates trampolines when the size of CodeCache is bigger than 128M (this is checked with far_branches):

        address MacroAssembler::trampoline_call(Address entry, CodeBuffer* cbuf) {
        ...
          if (far_branches()) {
        ...
              address stub = emit_trampoline_stub(offset(), entry.target());
              if (stub == NULL) {
                postcond(pc() == badAddress);
                return NULL; // CodeCache is full
              }
            }
          }

        MacroAssembler::trampoline_call supports relocInfo types: runtime_call_type, opt_virtual_call_type, static_call_type or virtual_call_type. Targets of opt_virtual_call_type, static_call_type or virtual_call_type are always inside CodeCache. Targets of runtime_call_type can be outside CodeCache and a distance to them can be bigger than 128M. If CodeCache size is less than 128M, a trampoline won't be created for such targets.
        If a target is outside CodeCache we should check whether the maximum possible distance to the target is below 128.

        Attachments

          Issue Links

            Activity

              People

                eastigeevich Evgeny Astigeevich
                eastigeevich Evgeny Astigeevich
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: