XPLINK

Derivation: eXtra Performance LINKage

The XPLINK runtime option controls the initialization of the XPLINK environment. XPLINK resources such as the downward-growing stack and the C/C++ run time library are committed only when it is known that an XPLINK program will receive control. If the initial program in the enclave contains at least one function that was compiled using XPLINK conventions, then XPLINK resources will be committed during Language Environment® initialization as if XPLINK(ON) had been specified. If the initial program is purely non-XPLINK, then no XPLINK resources will be committed. If it is known that an XPLINK function will be called at some point during the execution of the application, (for example, by calling a DLL function that has been compiled XPLINK), then XPLINK(ON) must be specified so the necessary XPLINK resources are available.

You cannot set this option at the system level, region level, or in the CEEBXITA assembler user exit interface. You can only specify XPLINK on application invocation (command-line interface or _CEE_RUNOPTS environment variable), or as an application default (CEEUOPT, C/C++ #pragma runopts, or PLIXOPT).

The default value for non-CICS applications is XPLINK(OFF).

XPLINK is ignored under CICS®.

Read syntax diagramSkip visual syntax diagram
Syntax

              .-OFF-.      
>>-XPLink--(--+-----+--)---------------------------------------><
              '-ON--'      

OFF
Specifies that no programs containing XPLINK-compiled functions will be run. XPLINK resources will not be committed.
ON
Specifies that at some time during the execution of an application, an XPLINK-compiled function may be called. XPLINK resources will be committed so that when this occurs, the XPLINK function can properly execute.

Usage notes

The XPLINK(ON) runtime option is provided for application compatibility. It should be specified only for applications that:
  • Have a non-XPLINK main(),
  • Use XPLINK resources during their execution (for example, calls to an XPLINK function in a DLL), and have been tested to run in an XPLINK environment (that is, they do not use any resources or subsystems that are restricted in an XPLINK environment) Blindly running a non-XPLINK application in an XPLINK environment by specifying the XPLINK(ON) runtime option could result in performance degradation or application abends.

For these reasons, the XPLINK(ON) application should only be specified for individual applications that require it. That is why you cannot set XPLINK(ON) as a system-level or region-level default.

  • If the XPLINK runtime option is not specified and the initial program contains at least one XPLINK-compiled part, then the XPLINK runtime option will be forced to (ON). No message will be issued to indicate this action.
  • When an application is running in an XPLINK environment (that is, either the XPLINK(ON) runtime option was specified, or the initial program contained at least one XPLINK compiled part), the ALL31 runtime option will be forced to ON. No AMODE 24 routines are allowed in an enclave that uses XPLINK. No message will be issued to indicate this action. If a Language Environment runtime options report is generated using the RPTOPTS runtime option, the ALL31 option will be reported as "Override" under the LAST WHERE SET column.
  • When an application is running in an XPLINK environment (that is, either the XPLINK(ON) runtime option was specified, or the initial program contained at least one XPLINK compiled part), the STACK runtime option will be forced to STACK(,,ANY). Only the third suboption is changed by this action to indicate that STACK storage can be allocated anywhere in storage. No message will be issued to indicate this action. If a Language Environment runtime options report is generated using the RPTOPTS runtime option, the STACK option will be reported as "Override" under the LAST WHERE SET column.

Performance considerations

  • When XPLINK(ON) is in effect, resources required for the execution of an XPLINK-compiled function are committed. This includes, for example, allocation of a downward-growing stack segment. If no XPLINK functions are invoked, then these are resources that are not available to an XPLINK function.
  • If the application contains C or C ++ and XPLINK(ON) is specified, then the XPLINK-compiled version of the C Runtime Library is loaded, which will run on the downward-growing stack. When non-XPLINK functions call C RTL functions in this environment, a swap from the upward-growing stack to the downward-growing stack will occur. This results in additional overhead that could cause performance degradation. Applications that make heavy use of the C RTL from non-XPLINK callers should be aware of this, and if necessary for performance reasons, either run in a pure non-XPLINK environment with XPLINK(OFF), or convert as much of the application to XPLINK as possible and run with XPLINK(ON).
  • Applications that consist only of non-XPLINK functions (for example, COBOL or PL/I) should not specify the XPLINK(ON) runtime option, as just turning this on in these applications will result in a performance degradation.