Object Code Accelerator Manual Abstract This manual describes how to use the Object Code Accelerator (OCA) to optimize TNS object code for HP TNS/E systems. OCA processes files for the Guardian environment. Product Version N/A Supported Release Version Updates (RVUs) This publication supports G06.27 and all subsequent G-series RVUs, and H06.03 and all subsequent H-series RVUs until otherwise indicated by its replacement publication.
Document History Part Number Product Version Published 528144-001 NA April 2005 528144-002 NA July 2005 528144-003 NA September 2005
Object Code Accelerator Manual Glossary Index What’s New in This Manual v Manual Information v New and Changed Information Figures Tables v About This Manual vi Audience vi How to Use This Manual vi Notation Conventions vii 1. Introduction How the Object Code Accelerator (OCA) Works OCA Translation Mode 1-3 OCA Resource Requirements 1-3 Cross-Platform Acceleration 1-5 1-1 2.
3. Preparing Programs for Acceleration Contents 3. Preparing Programs for Acceleration General Considerations 3-1 Run-Time Libraries 3-1 User Libraries 3-1 C Function Prototypes 3-2 Binder and Inspect Symbols Regions 3-2 Variances in Accelerated Code 3-2 Trap Handlers Using the ENV Registers 3-2 Passing Parameters in Registers 3-3 Arithmetic Left-Shift Sign Bit 3-6 Non-Standard Procedure Call or Return RP Values 3-7 Relationship Between Global and Local Data Blocks 3-10 Procedure Name Conflicts 3-11 4.
7. Debugging OCA Programs Contents STRIP 6-2 OCA and TNSVU 6-3 OCA and Accelerator 6-3 OCA and NonStop Debugging Tools OCA and EPTRACE 6-4 6-4 7. Debugging OCA Programs Differences Between Debugging TNS and Accelerated Programs Register-Exact Points 7-2 Memory-Exact Points 7-2 Nonexact Points 7-2 A Strategy for Debugging 7-2 7-1 8. Error and Warning Messages Warning Messages 8-1 Error Messages 8-4 A. Data Type Correspondence and Return Value Sizes Glossary Index Figures Figure 1-1. Figure 1-2.
Tables (continued) Contents Tables (continued) Table A-4. Table A-5. Table A-6.
What’s New in This Manual Manual Information Object Code Accelerator Manual Abstract This manual describes how to use the Object Code Accelerator (OCA) to optimize TNS object code for HP TNS/E systems. OCA processes files for the Guardian environment. Product Version N/A Supported Release Version Updates (RVUs) This publication supports G06.27 and all subsequent G-series RVUs, and H06.03 and all subsequent H-series RVUs until otherwise indicated by its replacement publication.
About This Manual OCA allows you to improve the performance of programs that run on TNS/E systems. OCA optimizes TNS programs to take advantage of the TNS/E architecture and processes TNS object files to produce accelerated object files. Most TNS object code that has been accelerated runs faster on TNS/E systems than TNS object code that has not been accelerated. Most programs written for TNS systems do not require changes to run on TNS/E systems, either with or without acceleration.
Notation Conventions About This Manual Notation Conventions Hypertext Links Blue underline is used to indicate a hypertext link within text. By clicking a passage of text with a blue underline, you are taken to the location described. For example: This requirement is described under Backup DAM Volumes and Physical Disk Drives on page 3-2. General Syntax Notation This list summarizes the notation conventions for syntax presentation in this manual. UPPERCASE LETTERS.
General Syntax Notation About This Manual { } Braces. A group of items enclosed in braces is a list from which you are required to choose one item. The items in the list can be arranged either vertically, with aligned braces on each side of the list, or horizontally, enclosed in a pair of braces and separated by vertical lines. For example: LISTOPENS PROCESS { $appl-mgr-name } { $process-name } ALLOWSU { ON | OFF } | Vertical Line.
Notation for Messages About This Manual a blank line. This spacing distinguishes items in a continuation line from items in a vertical list of selections. For example: ALTER [ / OUT file-spec / ] LINE [ , attribute-spec ]… !i and !o. In procedure calls, the !i notation follows an input parameter (one that passes data to the called procedure); the !o notation follows an output parameter (one that returns data to the calling program).
Notation for Management Programming Interfaces About This Manual lowercase italic letters. Lowercase italic letters indicate variable items whose values are displayed or returned. For example: p-register process-name [ ] Brackets. Brackets enclose items that are sometimes, but not always, displayed.
Change Bar Notation About This Manual UPPERCASE LETTERS. Uppercase letters indicate names from definition files. Type these names exactly as shown. For example: ZCOM-TKN-SUBJ-SERV lowercase letters. Words in lowercase letters are words that are part of the notation, including Data Definition Language (DDL) keywords. For example: token-type !r. The !r notation following a token or field name indicates that the token or field is required. For example: ZCOM-TKN-OBJNAME !o. token-type ZSPI-TYP-STRING.
1 Introduction OCA processes TNS object code to produce accelerated object code. On TNS/E systems, accelerated object code runs significantly faster than TNS object code. This section describes how OCA works, how to determine which programs to accelerate, and the cost in time and space to accelerate your programs. How the Object Code Accelerator (OCA) Works OCA takes as input an executable TNS object file and produces as output an accelerated object file.
How the Object Code Accelerator (OCA) Works Introduction Figure 1-2, User Program Execution Modes on TNS/E Systems, on page 1-2 shows two of the execution modes available to user programs on TNS/E systems: TNS mode and accelerated mode. • • TNS mode is the operational environment in which TNS instructions execute. On TNS/E systems, TNS instructions are implemented by millicode routines. Accelerated mode is the operational environment in which Itanium instructions generated by OCA execute.
OCA Translation Mode Introduction OCA Translation Mode You explicitly accelerate your TNS program as part of the build or install process.When you explicitly accelerate your program in this way, you are immediately alerted of any error conditions. If you do not want to accelerate a TNS object file, you can use the Binder CHANGE OCA ENABLE OFF command to disable inadvertent acceleration. See OCA and Binder on page 6-1 for further information about Binder commands that work with OCA and the Binder Manual.
OCA Resource Requirements Introduction Figure 1-4, Comparing TNS and Accelerated Object File Sizes Without a Symbols Region, on page 1-4 shows that an accelerated object file, with a symbols region, requires about 25 percent more disk storage space than the corresponding TNS object file. You can strip the symbols region from the accelerated program without affecting performance. However, accelerate the TNS object file with the symbols region and then strip the symbols region.
Cross-Platform Acceleration Introduction Cross-Platform Acceleration OCA is supported on G-series, and H-series systems, enabling you to accelerate TNS object files on the TNS/E platform for execution on the TNS/E platform. (A file with a TNS region only cannot be executed on the TNS/E platform). The TNS/R acceleration equivalent, Accelerator, is supported on G-series RVUs, enabling you to accelerate TNS object files on the TNS/R platform for execution on the TNS/R platform.
2 Preparing Your Program for TNS/E Systems Most TNS programs written for the HP NonStop operating system run on TNS/E systems without modification. Variances between TNS and TNS/E systems, however, might require modification in some programs, particularly low-level TAL programs. This section steps you through: • • • General Considerations on page 2-1, discusses hardware and software release issues that affect moving programs between any two different models of HP NonStop systems.
Preparing Your Program for TNS/E Systems Checking Segment Limits Detection Guideline • Examine source code that explicitly disables overflow traps to make sure it tests for arithmetic overflow with the $OVERFLOW function. Also look for user written trap handlers that return after an overflow. It is good coding practice always to test for overflow, not just after multiplication and division operations.
Extended Segment Size Preparing Your Program for TNS/E Systems more cases of bad addresses that are slightly too high, because of their smaller page sizes. For example, the following figure shows a TNS/E system with an extended segment of 3.5 memory pages. On TNS/E systems, a program can reference data in addresses from the end of the allocated segment until the end of the memory page (area x between %h00083800 and %h00083FFF) without an exception.
Preparing Your Program for TNS/E Systems Variances in TNS and Accelerated Code TNS/E, and the dynamic limits on flat segment sizes (due to other nearby segments) may be different on TNS/R and TNS/E. Detection Guideline • If your programs allocate selectable segments larger than 127.5 MB, or a combination of flat segments larger than the program's own 31-bit address space allows, ALLOCATESEGMENT and SEGMENT_ALLOCATE_ return error -2.
Preparing Your Program for TNS/E Systems Trap Handlers That Use the Program Counter TNS/E systems because the register stack contents are imprecise at the moment of a trap. (The register stack consists of registers R0 through R7.) • • On TNS systems, trap handlers can be declared as functions (return a value to a caller) and they can modify the register stack. On TNS/E systems, trap handlers cannot be declared as functions and they can reliably examine and change only certain registers.
Reserved Instructions Preparing Your Program for TNS/E Systems You can change the P trap variable to a valid restart point such as a cleanup point in the outer block, but do not perform arithmetic on P. For example, the results of the following operations are undefined: INT trap_p = 'L' - 2; trap_p := trap_p '+' 1; trap_p := trap_p '-' 1; ! Location of the P register ! Undefined ! Undefined Refer to Trap Handlers That Use the Register Stack on page 2-4 for guidelines on writing trap handlers.
Preparing Your Program for TNS/E Systems • • Nonprivileged References to System Global Data 16-bit address on TNS/E systems 32-bit extended address on TNS systems However, if you pass a 32-bit extended address on TNS/E systems, programs access the specified object and continue execution. This is a program error that TNS/E systems do not detect. Do not write programs that rely on this feature.
Segment Wrapping Preparing Your Program for TNS/E Systems segment. For more information on how to access the system data segment, refer to the section on privileged procedures in the TAL Reference Manual. INT cpuno = 'SG' + 0; INT .EXT xcpuno; ! SG equivalencing ! Extended pointer PROCEDURE foo; ! BEGIN IF cpuno = 1 THEN ! BEGIN ! ! Lots of code END; @xcpuno := $XADR(cpuno); IF xcpuno = 1 THEN ! ...
Odd-Byte References Preparing Your Program for TNS/E Systems s2 ':=' p FOR $LEN(s2) BYTES; p.d := %h12345678%d; p.j := 6; END; ! On TNS/E systems, ! these operations ! might wrap or trap The structure defined by P starts near the end of the user data segment and goes past the end. On TNS systems, this addressing operation wraps back to G[0], as shown by the dotted line in the following figure. On TNS/E systems, this addressing operation might wrap or trap.
Preparing Your Program for TNS/E Systems • ° ° Odd-Byte References Contextual optimizations How the instruction's result is used by later instructions The SCF attribute TNSMISALIGN (see Misalignment Handling on page 2-15) The varying behaviors and symptoms that misalignment errors cause can be confusing, for the following reasons: • • • • A source program can produce erroneous TNS object code that seems to execute correctly until you change the source program in an apparently innocent way.
Preparing Your Program for TNS/E Systems Shift Instructions With Dynamic Shift Counts Required Change • Remove odd-byte references to doublewords and quadruplewords from your programs. Recommended Changes • • • Use pointer conversions as recommended for the source code language so that TNS word instructions are never applied to odd-byte addresses. Set the system’s SCF attribute TNSMISALIGN to either FAIL or NOROUND (see Table 2-1 on page 2-15).
Preparing Your Program for TNS/E Systems Shift Instructions With Dynamic Shift Counts difference applies to both single-word (16-bit) and double-word (32-bit) shift instructions. For single-word shift operations with dynamic shift counts: • • TNS systems accept counts within the range of 0 to 255. Shift counts of 16 to 255 are treated as 16. TNS/E systems counts within the range of 0 to 31. Shift counts of 16 to 31 are treated as 16. Shift counts greater than 31 give undefined results.
Data Alignment in TNS and Accelerated Code Preparing Your Program for TNS/E Systems nbits := 35; q := p >> nbits; ! ! ! ! ! Shift value of 35-bits On TNS systems, same as p >> 16, q = -1 On TNS/E systems, same as p >> (35-32), q = -16 Data Alignment in TNS and Accelerated Code This section describes the data alignment requirements for TNS code and the OCA. It also describes how to use the Misalignment Tracing Facility diagnostic tool. On TNS systems, a word is 16 bits.
Preparing Your Program for TNS/E Systems Misalignment Tracing Facility Subsystem Control Facility (SCF) attribute MISALIGNLOG. Instructions are in the SCF Reference Manual for the Kernel Subsystem. Note. HP recommends that the MISALIGNLOG attribute be left ON (its default setting) so that any process that is subject to rounding of misaligned addresses will generate log entries, facilitating diagnosis and repair of the code.
Preparing Your Program for TNS/E Systems Misalignment Handling Misalignment Handling Misalignment handling is determined by the following SCF attributes, which are set system-wide (that is, for all processors in the node) by the persons who configure the system: • • • MISALIGNLOG TNSMISALIGN NATIVEATOMICMISALIGN (applies only to programs running in TNS/R native mode, and therefore, does not apply to the OCA) MISALIGNLOG enables or disables the tracing facility.
Preparing Your Program for TNS/E Systems Misalignment Handling The method that you choose does not apply to every misaligned address, only to those that would have been rounded down in RVUs prior to G06.17. Note. ROUND and NOROUND misalignment handling are both intended as temporary solutions, not as a substitute for changing your program to ensure that it has only aligned addresses.
3 Preparing Programs for Acceleration Most TNS programs written since the C30 RVU of the operating system can be accelerated without modification. Variances between TNS and TNS/E systems that affect accelerated code only, however, might require modification in some programs, particularly low-level TAL programs.
Preparing Programs for Acceleration C Function Prototypes C Function Prototypes The C/C++ compiler uses function prototypes to determine the return value size for calls to routines declared in separate modules or to routines declared later in the same module. If you do not specify a function protoype, the C/C++ compiler assumes the function returns an INT value. On the TNS architecture, the object code runs correctly if either the function returns an INT value or no value.
Preparing Programs for Acceleration Passing Parameters in Registers Refer to the Trap Handlers That Use the Register Stack on page 2-4 for guidelines on writing trap handlers. Detection Guideline • Examine your programs to determine if their trap handlers comply with the preceding restrictions. Find trap handlers by looking for calls to the system procedure ARMTRAP with parameters (address of label, address of data area).
Preparing Programs for Acceleration • Passing Parameters in Registers The procedure calls the Debug process. Note. The library function CLIB^EXTFNAME^TO^INTFNAME contains an uninitialized register variable in C30 versions of the HP C library released before 01DEC90. When this is the case, OCA generates incorrect code; a program might cause a run-time trap or overwrite user variables.
Preparing Programs for Acceleration CODE (LOAD L+3); CODE (STRP 7); CODE (EXIT); Passing Parameters in Registers ! Loads value on stack from data segment ! Set RP=7, imply no value returned When the PCAL instruction in the following fragment calls procedure Q, it uses the value left on the register stack.
Arithmetic Left-Shift Sign Bit Preparing Programs for Acceleration Figure 3-1. Passing Parameters in Registers Inherits Registers Procedure Alpha passes a value in register 7 to procedure Beta. Procedure Beta assumes that it inherits one register. OCA emits Warning 15 for procedure Beta. Specify "InheritsR7 Beta" to get a correctly accelerated program.
Preparing Programs for Acceleration Non-Standard Procedure Call or Return RP Values those of TNS object code, but only if an overflow occurs. It is unlikely that programs knowingly use left-shift operations that overflow. Detection Guideline • Look for arithmetic left-shift operations that overflow. Required Change • Remove arithmetic left-shift operations that overflow from your programs. Example In TNS object code, the value of I is 0, while in accelerated object code, I= %100000.
Non-Standard Procedure Call or Return RP Values Preparing Programs for Acceleration • Use the OCA RETURNVALSIZE option to specify the correct return values. • For procedures with one return value size, specify: RETURNVALSIZE procedure-name value where procedure-name is the name of the procedure, and value is the number of 16-bit words returned by the procedure. Use this option for functions whose return values cannot be declared in TAL, such as 48-bit integers.
Non-Standard Procedure Call or Return RP Values Preparing Programs for Acceleration after the RP directive, while at run time the hardware knows that a value is on the stack. Run-time view of register stack at procedure return TAL compiler view of register stack at procedure return Value R0 1 R0 Value R1 Value R1 R2 Value R2 R3 R3 VST0302.
Relationship Between Global and Local Data Blocks Preparing Programs for Acceleration }; struct TAG Foo (void); /* function returns type TAG */ struct TAG Foo (void) { struct TAG *ATagStruct; ATagStruct = (struct TAG *) malloc ( sizeof (struct TAG)); ATagStruct->I = 1; ATagStruct->L = 2; return *ATagStruct; /* by value */ } main () { struct TAG TagStruct; TagStruct = Foo(); printf ( "TagStruct is %d %ld, should be 1 2\n", TagStruct.I, TagStruct.
Procedure Name Conflicts Preparing Programs for Acceleration BEGIN INT a,b,c,d; c := 1; f[4] := c+100; b := c+3; END; ! Local variables ! Undefined on TNS/E systems If you execute this program on a TNS system or as TNS code on a TNS/E system, b = 104 at the end of the procedure. If you accelerate this program and then execute it on a TNS/E system, b = 4. Procedure Name Conflicts A program can call several procedures of the same name, as long as each of the procedures resides in a different code space.
4 Using OCA The OCA program processes TNS object code programs and produces accelerated object code programs. You can run OCA only from the Guardian environment; OCA does not support the Open System Services (OSS) environment. This section describes: • • • • • • • A Strategy for Using OCA on page 4-1 describes a strategy for using OCA. Invoking OCA on page 4-2 describes how to run OCA from the Guardian environment.
Invoking OCA Using OCA 6. Perform final testing on the accelerated program. This is a quick and simple strategy for using OCA. The following table guides you to the appropriate sections to learn how to perform more advanced OCA tasks.
OCA Command Usage Examples Using OCA Section 5, OCA Syntax and Option Summary for instructions on how to invoke OCA and a detailed description of each OCA option.
Using Obey Files Using OCA OCA outputs an accelerated object file that does not have the same file label as the input TNS object file. The file label contains the PROGID attribute that determines the ownership of an executing process for NonStop SQL/MP. OCA turns off the PROGID attribute of the accelerated object file. To set the PROGID value, use the SQL ALTER PROGRAM statement or the Safeguard security subsystem interface.
Online Help Using OCA Online Help To access the OCA online help facility, enter oca at a TACL prompt. This displays a brief summary of the OCA command syntax. The following example illustrates the help text:. Figure 4-1. OCA Online Help Example >OCA OCA - T0448H01 - 01Jan05 - (Dec 7 2004 11:27:33) Copyright Hewlett-Packard, 1988-2005 OCA Syntax Summary oca [/run-options/] input-file [, option-list ] input-file is the name of a fully bound, runnable, type-100 TNS code file.
OCA Listings Using OCA OCA Listings At each execution, OCA produces a listing that reports on the acceleration it has just performed. The following example shows a sample OCA listing: OCA - T0448H01 - 01Jan05 - (Dec 7 2004 11:27:33) Copyright Hewlett-Packard, 1988-2005 Option summary: INHERITSCC 48 TNS instruction words; 96 bytes 102 Itanium bundles; 1632 bytes 17.0 inline code expansion factor 2.12 Itanium bundles per TNS instruction TNS file name: $GOLD.MYFILES.
5 OCA Syntax and Option Summary This section provides detailed information about using OCA on the command line and how you can use additional options to specify more advanced translation functions. • • OCA Syntax on page 5-1 describes how to run OCA from the command line. OCA Options on page 5-2 details and provides examples for using options that can be placed in the [, oca-option-list] portion of the command line. Using additional oca options is not required.
OCA Options OCA Syntax and Option Summary oca-option-list is one or more oca options, which are listed and described later in Table 5-1, OCA Options, on page 5-2. Each option keyword, along with any accompanying arguments, must be separated by a comma from the next keyword. Note that you cannot use comments on the OCA command line. If you need to add comments to any OCA command line options, use an obey file. See Specifying an Obey File on page 5-4 for more information.
OCA Syntax and Option Summary Translating a System Library Table 5-1. OCA Options (page 2 of 2) Option Purpose See INHERITSCC Directs OCA to complete its translation without issuing a warning when it determines a condition code is passed into and used by the routine.
OCA Syntax and Option Summary Specifying an Output File Name UL Usage Considerations • • If you do not supply the UL option, OCA interprets any ready-to-run object file containing no main program as a user library. You can accelerate a user library explicitly without specifying the UL option. Specifying an Output File Name Use the OUTPUT_FILE option to specify an output code file name whose location is different from the input code file location.
OCA Syntax and Option Summary Determining TNS Register Usage comment is defined as any string introduced by two dashed (--) and is terminated by the end of a line. • OCA does not recognize the TACL line continuation mark &. Determining TNS Register Usage The RETURNSRn option tells OCA which TNS registers are used for implicitly passing parameters from the named procedure.
OCA Syntax and Option Summary Diagnosing and Managing Register or Condition Code Inheritance can use the INHERITSRn option to generate correct code, though it is best to modify the source code to eliminate this practice and then reaccelerate the program. Diagnosing Register or Condition Code Inheritance OCA can falsely warn of register or code condition inheritance.
OCA Syntax and Option Summary Diagnosing and Managing Register or Condition Code Inheritance be inherited from the calling procedure. These warnings appear rarely and may in fact not reflect register inheritance. Use the following options to suppress these warnings and allow OCA to complete translation. IGNORE_IRn If you determine that OCA is issuing Warning 15 falsely, use IGNORE_IRn to suppress further issuance of Warning 15 and allow OCA to complete procedure translation.
OCA Syntax and Option Summary Diagnosing and Managing Register or Condition Code Inheritance INHERITSRn where the value of n applies to each register that is inherited. Values for INHERITSR are: INHERITSR0, INHERITSR1, INHERITSR2, INHERITSR3, INHERITSR4, INHERITSR5, INHERITSR6, or INHERITSR7. proc-name is a procedure name. Procedure names are case-sensitive so specify a procedure name using the exact spelling and case as it appears in the Binder region of the object file.
6 Using OCA with Other NonStop Tools You can use OCA with other NonStop products that operate on TNS object files. • • • • • OCA and Binder on page 6-1 OCA and TNSVU on page 6-3 OCA and Accelerator on page 6-3 OCA and NonStop Debugging Tools on page 6-4 OCA and EPTRACE on page 6-4 OCA and Binder OCA only processes fully bound ready-to-run TNS object files.
Using OCA with Other NonStop Tools SHOW SHOW The SHOW command displays the current values for the attributes of an existing TNS object file. SHOW {OCA ENABLE [FROM filename] } {INFO [FROM filename] } OCA ENABLE displays whether or not OCA can accelerate the TNS object file specified in the FROM portion of this command. INFO displays the attributes for the TNS object file specified in the FROM portion of this command.
OCA and TNSVU Using OCA with Other NonStop Tools OCA and TNSVU TNSVU is an interactive tool that browses a static, type-100 TNS object file, including the TNS/E region generated by the Object Code Accelerator (OCA).
OCA and NonStop Debugging Tools Using OCA with Other NonStop Tools You can also run Accelerator on a TNS object file that has been previously accelerated for the TNS/E environment by OCA: Figure 6-2. Translating using OCA and the Accelerator TNS Compiler and Binder TNS Object Code mp TNS Object Code TNS Object Code OCA AXCEL Accelerated Object Code (Itanium) Accelerated Object Code (RISC) Accelerated Object Code vst0604.
Using OCA with Other NonStop Tools • • OCA and EPTRACE Locates particular events when you enable tracing. To report traces you must enable the tracing function using the SHOW command EPTRACE reports these event trace items: • • • • • • Current program name and PIN Time Event Type Stumble subclass Trapped program location (native IA-64 IP, TNS P and/or translated IA-64I IP). Locations within system libraries are included, but not separately counted or separately traced.
7 Debugging OCA Programs You can use either Visual Inspect or Native Inspect to debug programs accelerated by OCA. Source-level (symbolic) debugging of accelerated programs is very similar to TNS programs. However, machine-level debugging of accelerated programs is limited, and rarely necessary. When debugging accelerated programs, you do not need to be concerned about the Itanium instructions into which OCA has converted your program, nor with the algorithms by which OCA has optimized your program.
Register-Exact Points Debugging OCA Programs maintained, no change is required to run existing TNS programs on TNS/E systems and, with very few exceptions, debugging is the same. Register-Exact Points Register-exact points are locations in an accelerated program at which the values in both memory and the TNS register stack are the same as if the program were executing on a TNS system. No optimizations cross register-exact points.
A Strategy for Debugging Debugging OCA Programs When your program executes in TNS accelerated mode, the debugger allows you to set breakpoints only at exact points. Displaying memory variables provides accurate results at all exact point. You may only use Inspect debugging commands that modify memory or display registers in the TNS register stack at register-exact points.
8 Error and Warning Messages OCA issues an error or warning message when it finds a code construct that it cannot accelerate, or when it cannot understand input options or input file format. OCA does not produce an executable object file if it finds error conditions. You must resolve all error conditions to accelerate your program successfully. Note: OCA options are not case-sensitive, but procedure names are case-sensitive.
Warning Messages Error and Warning Messages declared a USE variable that was not DROPped before the procedure call. For example: PROC fred; BEGIN USE i; i:= jane; DROP i; CALL do_mine; END; Check your program to verify that inheriting a register has actually occurred. Recovery.
Warning Messages Error and Warning Messages 16 Warning 16: Procedure in file inherits condition codes. Cause. OCA assumes that procedures do not reference condition codes (the N and Z bits of the ENV register) before they perform some work (such as an arithmetic operation or call to a system procedure) that resets the condition codes. OCA’s static analysis suggests that the named procedures can inherit the condition codes from their callers.
Error Messages Error and Warning Messages Cause. The argument to OUTPUT_FILE is not a legal NonStop file name (for example, one that is too long). Effect. OCA is not able to create an output file with an illegal file name. OCA instead leaves the augmented TNS file in a temporary file whose name is displayed in the message. Recovery. Offer a valid filename as an argument to the OUTPUT_FILE option.
Error Messages Error and Warning Messages Cause. You specified a TNS OSS object file. Effect. OCA only supports native TNS object files. Recovery. Convert this file to native mode using the TNS compilers and recompile. 6 Error 6: File is built using unsupported tools. Cause. You built this file using unsupported tools. Effect. OCA cannot accelerate this file. Recovery. Rebuild this file using a later version of the compiler and Binder. 7 Error 7: File is not bound and runnable.
Error Messages Error and Warning Messages Recovery. Verify the spelling of all options and ensure that the command line contains only OCA command syntax. See Section 5, OCA Syntax and Option Summary for a listing and correct spelling of OCA syntax. Error 11: Incorrect syntax was provided on the command line. Cause. OCA is unable to interpret your input on the command line. Effect. OCA cannot respond to your request for file translation. Recovery.
Error Messages Error and Warning Messages 17 Error 17: The output file’s disk is full; translation halted. Cause. OCA must stop translation because there is insufficient space on the disk for the output file. Effect. Translation stops and OCA does not create an output file or augmented input file. Recovery. Clear sufficient disk space for the output file or augmented input file to reside. 18 Error 18: Temporary working space is full; translation halted. Cause.
Error Messages Error and Warning Messages 21 Error 21: The UL option is in effect, but file contains a main procedure. Cause. OCA detects a main procedure in the object file you specified, but you entered the UL option on the command line. Effect. OCA cannot translate a library file that contains a main procedure. Recovery. Remove the UL option from the command line and re-run OCA. 22 Error 22: The UL options and the SL options are both set. Cause.
Error Messages Error and Warning Messages 34 Error 34: A bad RETURNVALSIZE argument of value was given for procedure . Cause. The argument provided to the RETURNVALSIZE command line option was not an appropriate numerical value. Effect. OCA cannot interpret the specified arguments as a number of 16-bit words returned by the named procedure. Recovery. Specify a valid address in the RETURNVALSIZE option.
A Data Type Correspondence and Return Value Sizes The following tables contain the return value size generated by HP language compilers for each data type. Use this information when you need to specify values with the Accelerator ReturnValSize option. These tables are also useful if your programs use data from files created by programs in another language, or your programs pass parameters to programs written in callable languages.
Data Type Correspondence and Return Value Sizes Table A-1.
Data Type Correspondence and Return Value Sizes Table A-2. Integer Types, Part 2 64-Bit Integer Bit Integer of 1 to 31 Bits Decimal Integer BASIC INT(64) FIXED(0) -- -- C long long -- -- COBOL PICS9(n) COMP or PIC 9(n) COMP without P or V, 10≤n≤18 -- Numeric DISPLAY FORTRAN INTEGER*8 -- -- Pascal INT64 UNSIGNED(n), 1≤n≤16 INT(n) 1≤n≤16 DECIMAL SQL NUMERIC(10)...NUMERIC(18) PIC9(10)COMP...
Data Type Correspondence and Return Value Sizes Table A-4. Character Types Character Character String Varying Length Character String BASIC STRING STRING -- C signed char unsigned char pointer to char struct { int len; char val [n] }; COBOL Alphabetic Numeric DISPLAY Alphanumeric-Edited Alphanumeric Numeric-Edited Alphabetic Numeric DISPLAY Alphanumeric-Edited Alphanumeric Numeric-Edited 01 name. 03 len USAGE IS NATIVE-2 [1] 03 val PIC X(n).
Data Type Correspondence and Return Value Sizes Table A-6.
Glossary absolute pathname. An Open System Services (OSS) pathname that begins with a slash (/) character and is resolved beginning with the root directory. Contrast with relative pathname. accelerate. To speed up emulated execution of a TNS object file by applying the Accelerator for TNS/R system execution or the Object Code Accelerator (OCA) for TNS/E system execution before running the object file. accelerated mode. See TNS accelerated mode. accelerated object code.
alternate key Glossary alternate key. A sequence of characters other than the primary key used as an alternate index to records in a key-sequenced file. alternate-key file. A key-sequenced file that provides the relationship between alternate keys and primary keys. ancestor. The process that is notified when a named process or process pair is deleted. The ancestor is usually the process that created the named process or process pair. ANSI. The American National Standards Institute. API.
breakpoint Glossary breakpoint. An object code location at which execution will be suspended so that you can interactively examine and modify the process state. With symbolic debuggers, breakpoints are usually at source line or statement boundaries. In TNS/R or TNS/E native object code, breakpoints can be at any MIPS RISC instruction or Intel® Itanium® instruction within a statement. In a TNS object file that has not been accelerated, breakpoints can be at any TNS instruction location.
code set Glossary of that program or library. Therefore, they are read from disk but are never written back to disk. See also TNS code space. code set. Codes that map a unique numeric value to each character in a character set, using a designated number of bits to represent each character. Single-byte code sets use 7 or 8 bits to represent each character.
creator Glossary creator. The process that causes a process to be built from a program file of another process. Compare with multibyte character set and ancestor. creator access ID (CAID). A process attribute that identifies, by user ID, the user who initiated the process creation. Contrast with process access ID (PAID). current selectable segment. The selectable segment that can be accessed by a process.
duplicate key Glossary duplicate key. A sequence of characters that makes up the same value in a key field in more than one record in the same file. EDIT file. In the Guardian file system, an unstructured file with file code 101. An EDIT file can be processed by either the EDIT or PS Text Edit (TEDIT) editor. An EDIT file typically contains source program or script code, documentation, or program output. Open System Services (OSS) functions can open an EDIT file only for reading. elapsed time.
executable object file Glossary executable object file. See program file. explicit DLL. See explicit dynamic-link library (explicit DLL). explicit dynamic-link library (explicit DLL). A dynamic-link library (DLL) that is named in the libList of a client or is a native-compiled loadfile associated with a client. export. To offer a symbol definition for use by other loadfiles. A loadfile exports a symbol definition for use by other loadfiles that need a data item or function having that symbolic name.
file lock Glossary In the PC environment, file names for disk files normally have at least two parts (the disk name and the file name); for example, B:MYFILE. In the Guardian environment, disk file names include an Expand node name, volume name, subvolume name, and file identifier; for example, \NODE.$DISK.SUBVOL.MYFILE. In the Open System Services (OSS) environment, a file is identified by a pathname; for example, /usr/john/workfile. See also filename. file lock.
file type Glossary In some UNIX and NFS implementations, the term file system means the same thing as fileset. That is, a file system is a logical grouping of files that, except for the root of the file system, can be contained only by directories within the file system. See also file system. file type. A designation for a file structure. See entry-sequenced file, key-sequenced file. relative file, and unstructured file. flat segment. A type of logical segment.
Glossary HP NonStop™ Open System Services (OSS) HP NonStop™ Open System Services (OSS). The product name for the OSS environment. See also Open System Services (OSS). HP NonStop™ Kernel operating system. The former name of the operating system for HP NonStop systems. See HP NonStop™ operating system user ID. HP NonStop™ operating system user ID. A user ID within an HP NonStop system.
import Glossary import. To refer to a symbol definition from another loadfile. A loadfile imports a symbol definition when it needs a data item or function having that symbolic name. import control. The characteristic of a loadfile that determines from which other loadfiles it can import symbol definitions. The programmer sets a loadfile’s import control at link time. That import control can be localized, globalized, or semiglobalized.
Intel® Itanium® instruction region Glossary Intel® Itanium® instruction region. The region of a TNS object file that contains Itanium instructions and the tables necessary to execute the instructions in accelerated mode on a TNS/E system. The Object Code Accelerator (OCA) creates this region and writes it into the TNS object file. A TNS object file that contains an Itanium instruction region can execute in accelerated mode on TNS/E systems. Contrast with native. Intel® Itanium® instruction region loading.
KMSF Glossary Records in a key-sequenced file can be updated or deleted. Contrast with entrysequenced file and relative file. KMSF. See Kernel-Managed Swap Facility (KMSF). keyword. A character sequence recognized by a command process. LDEV. See logical device. ld utility. A utility that collects, links, and modifies code and data blocks from one or more position-independent code (PIC) object files to produce a target TNS/R native object file. See also eld utility and nld utility. legacy system.
logical page Glossary logical page. (1) 2048 contiguous bytes of memory. (2) The size of a printed page given as a number of lines. logical processor. See processor. logical segment. A single data area consisting of one or more consecutive 128-kilobyte unitary segments that is dynamically allocated by a process. The two types of logical segments are selectable segments and flat segments. See also selectable segment and flat segment. logical processor.
MIPS RISC word Glossary Accelerator-generated MIPS RISC instructions are produced by accelerating TNS object code. Native-compiled MIPS RISC instructions are produced by compiling source code with a TNS/R native compiler. MIPS RISC word. An instruction-set-defined unit of memory. A MIPS RISC word is 4 bytes (32 bits) wide, beginning on any 4-byte boundary in memory. Contrast with TNS word and word. See also Intel® Itanium® word. millicode.
native signal Glossary native signal. SeeTNS/R native signal and TNS/E native signal. nld utility. A utility that collects, links, and modifies code and data blocks from one or more object files to produce a target TNS/R native object file. See also eld utility and ld utility. node. A system of one or more processor modules. Typically, a node is linked with other nodes to form a network. node name. The portion of a file name that identifies the system through which the file can be accessed. noft utility.
noninteractive mode Glossary noninteractive mode. A mode of operation that usually involves a command file (an EDIT file that contains a series of commands). Contrast with interactive mode. object code accelerator (OCA). See TNS Object Code Accelerator (OCA). object code file. A file containing compiled machine instructions for one or more routines. This file can be an executable loadfile for a program or library or a not-yet-executable linkfile for some program module.
one-way communication Glossary one-way communication. A form of interprocess communication where the sender of a message (the requester) does not expect any data in the reply from the receiver of the message (the server). Contrast with two-way communication. open system. A system with interfaces that conform to international computing standards and therefore appear the same regardless of the system’s manufacturer.
page mode Glossary page mode. A mode of communication between a terminal and its I/O process in which the terminal stores up to a full page of data (1920 bytes) in its own memory before sending the page to the I/O process. Contrast with conversational mode. PAID. See process access ID (PAID). PARAM. An association of an ASCII value with a parameter name made by the TACL PARAM command. You can use PARAMs to pass parameter values to processes. partially qualified file name.
process control block (PCB) Glossary The process access ID is usually the same as the creator access ID but it can be different; the owner of the corresponding object file can set the object file security such that it runs with a process access ID equal to the user ID of the file owner, rather than the creator of the process. Contrast withcreator access ID (CAID). process control block (PCB). An operating system data structure that contains information about the resources and environment of a process.
program Glossary reside in different enclosures, it is sometimes called a logical processor. A processor is sometimes referred to as a central processing unit (CPU), but HP NonStop™ servers have multiple cooperating processors rather than a single CPU. (2) One or more computer chips, typically mounted on a logic board, that are designed to perform data processing or to manage a particular aspect of computer operations. program. See program file. program file.
relative pathname Glossary relative pathname. In the Open System Services (OSS) file system and Network File System (NFS), a pathname that does not begin with a slash (/) character. A relative pathname is resolved beginning with the current working directory. Contrast with absolute pathname. release version update (RVU). A collection of compatible revisions of HP NonStop operating system software products, identified by an RVU ID, and shipped and supported as a unit.
selectable segment Glossary selectable segment. A type of logical segment formerly known as an extended data segment. The data area for a selectable segment always begins with relative segment 4, and this area can be dynamically switched among several selectable segments by calls to the Guardian SEGMENT_USE_ procedure. The effect is similar to a rapid overlaying of one large data area. See also logical segment and flat segment. sequence number. See process sequence number. server.
SRL Glossary full SUT contains the current RVU of the HP NonStop operating system and all product software that has been ordered with it. A partial SUT contains a subset of products for the current RVU. SRL. See shared run-time library (SRL). startup sequence. A convention for sending and receiving certain messages while starting a new process.
System Code (SC) Glossary System Code (SC). See TNS code space. system code. A logically distinct part of the HP NonStop™ operating system that consists of operating system procedures shared by all processors. system entry-point (SEP) table. A table used on TNS systems that stores the XEP entry value for each TNS operating system procedure entry point. system generation. The process of creating an operating system to support a particular system configuration and release version update (RVU).
TNS code segment Glossary TNS code segment. One of up to 32 128-kilobyte areas of TNS object code within a TNS code space. Each segment contains the TNS instructions for up to 510 complete routines. TNS code segment identifier. A seven-bit value in which the most significant two bits encode a code space (user code, user library, system code, or system library) and the five remaining bits encode a code segment index in the range 0 through 31. TNS code segment index.
TNS library Glossary by native mode object code. See also TNS Object Code Interpreter (OCI). Contrast with TNS accelerated mode, TNS/R native mode, and TNS/E native mode. TNS library. A single, optional, TNS-compiled loadfile associated with one or more application loadfiles. If a user library has its own global or static variables, it is called a TNS shared run-time library (TNS SRL). Otherwise it is called a User Library (UL). TNS mode.
TNS State Library for TNS/E Glossary TNS State Library for TNS/E. A library of routines to access and modify the TNS state of a TNS process running on TNS/E. TNS system library. A collection of HP-supplied TNS-compiled routines available to all TNS processes. There is no per-program or per-process customization of this library. All routines are immediately available to a new process. No dynamic loading of code or creation of instance data segments is involved. See also HP NonStop™ operating system.
TNS/E native signal Glossary TNS/E native signal. A signal model available to TNS/E native processes in both the Guardian and Open System Services (OSS) environments. TNS/E native signals are used for error exception handling. TNS/E native user library. A user library available to TNS/E native processes in both the Guardian and Open System Services (OSS) environments. A TNS/E native user library is implemented as a TNS/E native dynamic-link library (DLL). TNSVU.
trap Glossary trap. A software mechanism that stops program execution and holds the cause of a processing problem. In TNS and accelerated execution modes, traps occur as the result of errors that are not related to input or output. Contrast with signal. trap handler. A location in a program where execution begins if a trap occurs. A process can specify a trap handler by a call to the Guardian ARMTRAP procedure. two-way communication.
user process Glossary user process. A process whose primary purpose is to solve a user’s problem. A user process is not essential to the availability of a processor module. A user process is created only when the user explicitly creates it. Contrast with system process. virtual memory. A range of addresses that processes use to reference real storage, where real storage consists of physical memory and disk storage. volume. A disk drive or a pair of disk drives that forms a mirrored disk. word.
Index A Bit-shift operators 2-12 Accelerated code variances with TNS code TNS code variances with Accelerated code 2-4 Accelerated mode executing in 1-2 Accelerated object file size 1-3 Accelerating progams with embedded SQL 4-3 strategy 4-1 Acceleration cross platform 1-5 Accelerator 1-5, 6-3 listings 4-6 using 4-2 using with OCA 6-3 Accelerator command listing produced by 4-6 Addition operations 2-1 Address misalignment causes of 2-13 handling 2-15/2-16 symptoms of 2-10 tracing facility for 2-13 Address
D Index D Data block relationship between global and local 3-10 Data misalignment See Address misalignment Data segment system global 2-7 user global 2-7 Debug 3-4 Debugger 2-10 Debugging differences between TNS and accelerated programs 7-1 memory-exact points 7-2 native systems 7-1 nonexact points 7-2 register-exact points 7-2 strategy 7-2 synchronization points 7-1 TNS/E systems 7-1 with Native Inspect 7-1 with Visual inspect 7-1 Debugging OCA programs 7-1 Default misalignment handling method 2-15/2-16
G Index G G segment 2-7 general considerations 2-1, 3-1 Global data block 3-10 H Help, online 4-5 I IGNORERn 5-7 IGNORE_CC 5-2, 5-7 usage considerations 5-8 IGNORE_IRn 5-2 usage considerations 5-8 Inherits register 3-4 INHERITSCC 5-3, 5-8 usage considerations 5-8 INHERITSRn 5-2, 5-7 usage considerations 5-8 INHERITSRn option 3-4 Inline code expansion 1-4 Inspect symbols region 3-2 Instruction Failure trap (trap #1) 2-15 Invoking OCA 4-2 K Kernel Managed Swap Facility Glossary-12 KMSF See Kernel Managed
P Index OCA invoking 4-2 listings 4-6 listings example 4-6 option list syntax 5-2 specifying file names 4-2 specifying options 4-2 use strategy 4-1 using 4-1 using with Accelerator 6-3 using with EPTRACE 6-4 using with Native Inspect 6-4 using with TNSVU (TNS Viewer) 6-3 using with Visual Inspect 6-4 warning messages 8-1 OCA command IGNORERn 5-7 IGNORE_CC 5-7 INHERITSRn 5-7 input-file 5-1 obey-filename 5-4 options 5-1 output-file 5-4 run-options 5-1 OCA command options IGNORE_CC 5-2 IGNORE_IRn 5-2 INHERIT
Q Index P-relative objects, passing the address of 2-6 Run-time libraries 3-1 S Q Quadruplewords 2-10 R RCPU instruction 2-6 Reduced instruction-set computing (RISC) Glossary-21 Register diagnosing inheritance 5-5 inheritance 5-5 managing inheritance 5-5 Register pointer 3-7 Register stack 2-4 Registers inheritance of 3-4 P 2-5 passing parameters in 3-4 RP 3-7 Register-exact points 7-2 Relationship between global and local data blocks 3-10 Reserved instructions 2-6 RESIZESEGMENT system procedure 2-3 R
T Index System procedures ALLOCATESEGMENT 2-3 ARMTRAP 2-5, 3-3 RESIZESEGMENT 2-3 SEG MENT_ALLOCATE_ 2-3 T TAL 1-2 bit-shift operators 2-12 CODE statement 5-5 CODE statements 3-3 DROP statements 3-3 odd-byte references 2-9 STACK statement 5-5 STACK statements 3-3 USE statement 3-4, 5-5 USE statements 3-3 $OVERFLOW function 2-2 ?RP directive 3-8 TAL data types FIXED(n) 2-10 INT(32) 2-10 INT(64) 2-10 REAL 2-10 REAL(64) 2-10 TNS machine state 7-1 TNS mode, executing in 1-2 TNS object file, size of 1-3 TNS op
V Index Usage considerations OBEY command 5-4 SL command 5-3 UL command 5-3 USE statement 3-4, 5-5 User data segment 2-7 User libraries accelerating 4-3 User library translating 5-3 Using OCA 4-1 Using SQL 4-3 Warnings 8-1 Special Characters $OVERFLOW function 2-2 ?RP directive 3-8 V Variances addresses of P-relative objects 2-6 between TNS and Accelerated code 2-4 ENV register 3-2 global and local data blocks 3-10 odd-byte references 2-9 passing parameters in registers 3-3 privileged instructions 2-6