HPlogo HP-UX Reference > A

ARIES(5)

HP Integrity Systems Only
HP-UX 11i Version 2: December 2007 Update
» 

Technical documentation

 » Table of Contents

 » Index

NAME

ARIES, aries — dynamically and transparently execute PA-RISC HP-UX applications on Integrity systems running HP-UX

DESCRIPTION

ARIES is a dynamic binary translator which transparently executes 32-bit and 64-bit PA-RISC HP-UX applications on Integrity systems running HP-UX. The name ARIES expands to Automatic Recompilation and Integrated Environment Simulation.

ARIES consists of the following four shared libraries:

/usr/lib/hpux32/pa_boot32.so

/usr/lib/hpux32/aries32.so

/usr/lib/hpux64/pa_boot64.so

/usr/lib/hpux64/aries64.so

aries32.so is the shared library that contains the ARIES dynamic translator for 32-bit applications. pa_boot32.so is the dynamic loader for aries32.so. Likewise, aries64.so and pa_boot64.so are the 64-bit ARIES components.

The HP-UX operating system kernel on Integrity systems recognizes PA-RISC HP-UX executables and invokes ARIES to dynamically translate and execute the application. For 32-bit PA-RISC HP-UX executables, the Integrity HP-UX kernel invokes pa_boot32.so, which loads aries32.so into memory, relocates it and sets up internal memory segments. aries32.so starts emulation at the program entry point. Likewise, pa_boot64.so and aries64.so are loaded for 64-bit PA-RISC HP-UX executables.

ARIES consists of two major sub-systems:

  • Instruction Set Architecture (ISA) emulation engine

  • Environment emulation engine

The ISA emulation engine is comprised of a fast interpreter and a dynamic translator. The interpreter emulates one instruction at a time. After a sufficient number of iterations over a PA-RISC basic block, the dynamic translator is invoked to translate the basic block into functionally equivalent IA64 native code, which is stored in translation buffer. Subsequent references to translated basic blocks do not require further interpretation or translation.

The environment emulation engine is responsible for the emulation of PA-RISC application's system calls, signal delivery, threads management. Interactions among various ARIES sub-systems are controlled and facilitated by the control system, which also keeps mapping between the PA-RISC application's basic block and the translated code block addresses.

PA-RISC HP-UX GDB DEBUGGING SUPPORT

ARIES supports debugging of PA-RISC HP-UX applications on Integrity systems running HP-UX using the PA-RISC HP-UX gdb, the GNU debugger.

On Integrity HP-UX systems, /usr/ccs/bin contains the PA-RISC gdb32 and gdb64 executables. A symbolic link named /usr/ccs/bin/gdbpa points to /usr/ccs/bin/gdb32. The Integrity HP-UX system's gdb debugger recognizes the PA-RISC executable being debugged and launches /usr/ccs/bin/gdbpa under ARIES.

Debugging PA-RISC Applications on Integrity Systems

Use the following steps to debug PA-RISC HP-UX applications on Integrity HP-UX systems using PA-RISC gdb:

1.

Set the environment variable PA_DEBUG to 1.

2.

Set the environment variable SHELL to point to a PA-RISC shell, copied from a PA-RISC HP-UX system from /usr/bin path.

3.

Add /usr/ccs/bin to the PATH environment variable.

4.

Invoke gdb as:

$ gdb PA-RISC_executable

NOTE: Make sure that the user has write permission on /tmp directory and that there is enough space to create a temporary file of one page size as obtained by sysconf(_SC_PAGE_SIZE) system call.

The rest of the debugging operations are the same as that on the PA-RISC HP-UX platform. All commands of the gdb debugger are supported subject to limitations listed under the Limitations of PA-RISC GDB Support section in this manpage.

Attaching PA-RISC GDB to PA-RISC process under ARIES

An already running PA-RISC process can be debugged on Integrity systems by attaching PA-RISC debugger gdb, using following steps:

1.

Perform the preparatory steps as described above for debugging PA-RISC application under ARIES using PA-RISC gdb.

2.

Invoke gdb as follows:

$ gdb PA-RISC_executable PA-RISC_processID

After debugging is finished, perform the following steps.

1.

Unset the environment variable PA_DEBUG.

2.

Restore the original value of the SHELL environment variable.

Limitations of PA-RISC GDB Support

The limitations of PA-RISC gdb emulation under ARIES are as follows:

1.

No support for debuggers other than PA-RISC HP-UX gdb for debugging PA-RISC applications on Integrity systems.

2.

No support for old gdb versions (of HP-UX 10.20 and earlier). However, debugging of HP-UX 10.20 applications using a HP-UX 11.0 (and newer) PA-RISC gdb is supported.

3.

PA-RISC gdb behaves differently for child processes created using fork() and vfork() system calls. ARIES emulates vfork() and fork() system calls identically. The exact behavior shown by PA-RISC gdb under ARIES may differ from that on a native PA-RISC HP-UX system.

4.

If the debugged process is blocking in a system call, any attempt to get to the gdb command prompt by pressing ctrl-C does not work. The process needs to be killed from a different shell.

5.

ARIES does not provide true emulation of MxN threads, and thus does not support debugging of PA-RISC applications that are linked with pthreads library and create threads in MxN model.

NOTE: The PA-RISC applications linked with MxN pthreads library are emulated under ARIES as traditional 1x1 threads, and thus can only be debugged under ARIES as any other non-MxN multi-threaded application. Refer to the EMULATION OF MxN THREADS UNDER ARIES section in this manpage for more information.

6.

ARIES supports debugging of 32-bit and 64-bit PA-RISC HP-UX applications using 32-bit PA-RISC HP-UX gdb. 64-bit PA-RISC HP-UX gdb is not supported under ARIES.

Generation of PA-RISC HP-UX Compatible Core File

ARIES supports creation of PA-RISC HP-UX compatible core files on Integrity systems. The size of the core file is limited by ulimit() and/or setrlimit() values. See ulimit(2) and setrlimit(2).

The PA-RISC application core file generated by ARIES will have the name as core.PA-RISC_application_name.

The PA-RISC HP-UX debugger is required to debug application core file generated by ARIES on an Integrity system. Alternately, the application's core file can be transferred to a PA-RISC system and debugged using a PA-RISC debugger. Refer to gdb help on the packcore command.

After ARIES has successfully written a core file for the PA-RISC application, it will print the following message on stderr:

[HP ARIES32/64]: Core file for 32/64-bit PA-RISC application [HP ARIES32/64]: %s saved to path/core.PA_application_name

If the resulting core file is named as core or core.pid, it will be an ARIES core file, not useful for application debugging.

The ARIES-generated PA-RISC HP-UX compatible core file is recognized by the file command on PA-RISC and Integrity HP-UX systems. See file(1).

ARIES RESOURCE CONFIGURATION (RC) FILE: PASSING OPTIONS TO ARIES

Options to ARIES are passed through a resource configuration (RC) file.

  • For 32-bit ARIES, resource configuration file name is .ariesrc.

  • For 64-bit ARIES, resource configuration file name is .aries64rc.

Refer to the ARIES RC File Search Path section in this manpage for details on location and search order for ARIES resource configuration file.

ARIES Resource Configuration File Format

The ARIES resource configuration file may contain multiple lines each with the following format:

<full-path-of-PA-RISC-application1> <aries-options> <full-path-of-PA-RISC-application2> <aries-options> # Below line specifies system wide ARIES options / <aries-options> # ARIES wild card character is '*' <PA-RISC-application3-path-with-wild-cards> <aries-options> ... ...

Refer to the Example: ARIES Resource Configuration File section in this manpage for examples on ARIES resource configuration file.

ARIES Resource Configuration File Processing Rules

1.

Application path name and ARIES options must be separated by one or more white spaces.

2.

Each non empty line must begin from first column.

3.

ARIES options may be specified for multiple applications, each beginning on a separate line.

4.

Relative paths and shell variables are not allowed.

5.

An invalid ARIES option will result in process termination with error.

6.

# in first column is treated as comment and rest of the line is ignored.

7.

* is treated as wild card character and can be used in application path name.

8.

ARIES wild card matching is based on simple text pattern match with no expansion of directory or file name.

9.

When using wild cards it is possible for multiple lines to match the current application. If this behavior is not expected, then change your ARIES resource configuration file accordingly.

10.

Application path name field must be one of following:

  • Full absolute path of PA-RISC application executable.

  • Root directory (/), ARIES options on this line will be applied to all PA-RISC processes on the system.

  • PA-RISC application path with wild cards (*).

    • There can be only one wild card in directory path and executable name each.

    • More than one wild card in either part of the pathname will result in process termination with error.

    • Valid examples are of such patterns as: */*, */foo*, */*foo, */f*o, and /opt/app/*/foo*.

    • Patterns of type /opt/all/*foo* and */*/foo which have more than one wild card in directory part or application name part are not allowed.

      NOTE: In above points foo is only an example and not an actual pattern.

ARIES RC File Search Path

ARIES searches for the resource configuration (RC) file in the following locations in the following order:

  • Root directory (/): system wide ARIES RC file

  • Application directory: all directories in the full absolute path of the PA-RISC application

  • User's home directory (value of environment variable HOME)

In regards to the ARIES RC file search, here are a few points:

1.

ARIES option processing is additive in nature. ARIES continues to search the RC file in all search paths. ARIES options found in earlier RC file matches are overwritten by option values in later RC file matches.

2.

If the value of environment variable HOME is NULL, or the path is not accessible, ARIES will ignore the user's private RC file.

3.

If ARIES cannot find or access the RC file in any of the search paths, it will continue with default values of options.

4.

The ARIES RC file search in application directories enables application vendors to ship custom ARIES RC files with ARIES options values suitable for their particular applications.

Advanced ARIES Options

Most PA-RISC applications run as expected under ARIES with the default values of options. The following ARIES options are useful for advanced users who may want to control ARIES resource management and/or to tune ARIES for their PA-RISC applications.

  • To enable or disable ARIES option flags you do not need to specify ON or OFF keywords. Such ARIES option flags have optional negation with no added at the beginning of the ARIES option name.

    For example, -mem_order will enable (turn ON) and -nomem_order will disable (turn OFF) strong memory ordering in ARIES.

  • Certain ARIES options which expect numeric values may be passed a case insensitive default keyword to reset the corresponding option value to ARIES default value.

  • ARIES options which require a numeric value in kbytes for size do not require kbytes keyword.

    For example, -ssz 8192 is valid and -ssz 8192K or -ssz 8192 kbytes are not valid, and will result in an error.

  • - is part of the ARIES option format and must be specified.

-[no]amap_smc

[Disables] enables the creation of separate address map data structure for dynamically generated code by PA-RISC application. Enabling (-amap_smc) this option flag may provide optimal performance for JVM-like applications.

The default state of this option flag is enabled (-amap_smc).

-[no]backpatch

[Disables] enables the dynamic patching of branch targets in ARIES translated code blocks.

WARNING: Disabling (-nobackpatch) this option flag will cause significant performance slowdown.

The default state of this option flag is enabled (-backpatch).

-[no]breaker

[Disables] enables the scheduling and optimization of ARIES translated code. Enabling (-breaker) this option flag is useful only for reducing the ARIES dynamic translation time although the overall performance may become slower.

The default state of this option flag is disabled (-nobreaker).

-[no]compat_core

[Disables] enables the generation of PA-RISC application core file with OS version field filled with release version of the Integrity HP-UX systems. Disabling (-nocompat_core) this option flag will result in core files which may not work with gdb from an older PA-RISC HP-UX (11i version 1 and earlier) platform. Such core files need to be debugged using gdb from PA-RISC HP-UX 11i version 2 and later.

The default state of this option flag is enabled (-compat_core).

-[no]corepid

[Disables] enables appending of the process ID to the PA-RISC application core file name. See also getpid(2).

If this option flag is enabled (-corepid), the core file name will be core.PA-RISC_application_name.PID.

The default state of this option flag is disabled (-nocorepid).

-[no]fpsr_trans

[Disables] enables the dynamic translation of PA-RISC basic blocks that access and modify the Floating Point Acess Regiser (FPSR : fr0L) frequently.

The default state of this option flag is disabled (-nofpsr_trans).

-[no]help

[Disables] enables the printing of ARIES options and their minimum, maximum, and default values on stderr. If this option flag is enabled (-help) ARIES will exit after printing the available options.

The default state of this option flag is disabled (-nohelp).

-[no]mem_fence

[Disables] enables the generation of memory fence mf instruction in translation for ordered memory operations of PA-RISC application.

WARNING: Enabling (-mem_fence) this option flag will slow down the performance of memory loads in ARIES translated code. Enable (-mem_fence) this option flag only if the PA-RISC application expecting strong memory ordering (program uses volatile variables) fails under ARIES.

NOTE: Enabling the ARIES option flag -mem_order does not automatically enable (-mem_order) this option flag.

The default state of this option flag is disabled (-nomem_fence).

-[no]mem_min

[Disables] enables the minimum memory footprint (process resident memory size) under ARIES. Enabling (-mem_min) this option flag is useful for applications that have constraints on process memory footprint. If this option flag is enabled (-mem_min), the sizes of all ARIES memory segments are set to their minimum values.

WARNING: Enabling (-mem_min) this option flag may cause performance slowdown due to increased number of ARIES translation code buffer flushes.

The default state of this option flag is disabled (-nomem_min).

-[no]mem_order

[Disables] enables the strong memory ordering in ARIES. You should enable (-mem_order) this option flag only when your PA-RISC application expecting strong memory ordering fails under ARIES. Such an application would be the one, which does not use memory ordering semantics like ,O completer in load/store instructions or volatile cast in high level code, and still expects strong memory ordering.

WARNING: Enabling (-mem_order) this option flag may cause 2x-3x performance slowdown.

The default state of this option flag is disabled (-nomem_order).

-[no]opt_fpgr

[Disables] enables the mapping of the emulated FP (Floating Point) register context on general register stack. The performance of the floating point intensive PA-RISC applications may be better if this option flag is enabled (-opt_fpgr).

The default state of this option flag is enabled (-opt_fpgr).

-[no]opt_reorder

[Disables] enables the ARIES optimizations for dynamically translated code to re-order PA-RISC state changing instructions, loads, and updates to general registers in order to achieve better scheduling of translated code.

WARNING: Do not enable (-opt_reorder) this option flag with multi-threaded applications like JVM which expect precise delivery of synchronous exceptions and register updates. Such applications may crash with core file if this option flag is enabled (-opt_reorder).

The default state of this option flag is disabled (-noopt_reorder).

-[no]pa_os_cpu

[Disables] enables the emulation of the uname() and sysconf() system calls, to return information specific to native PA-RISC HP-UX systems. See uname(2) and sysconf(2).

Enable (-pa_os_cpu) this option flag only if the PA-RISC application expects the return values of uname() and sysconf() system calls, to be specific to the values that would have been obtained if the application was running on PA-RISC HP-UX system.

The default state of this option flag is disabled (-nopa_os_cpu).

-[no]sched_trace

[Disables] enables the trace scheduling and low level optimization of ARIES translated code.

NOTE: Enabling (-sched_trace) this option flag may provide improved performance for compute intensive applications.

The default state of this option flag is disabled (-nosched_trace).

-[no]trans

[Disables] enables the dynamic translation in ARIES. Disabling (-notrans) this option flag is useful only for triaging of dynamic translator failures.

WARNING: Disabling (-notrans) this option flag will cause significant performance slowdown.

The default state of this option flag is enabled (-trans).

-[no]unsafetrans

[Disables] enables the dynamic translation of self modifying (dynamically generated) code. Disabling (-nounsafetrans) this option flag is useful only for triaging of Java-based application failures under ARIES.

WARNING: Disabling (-nounsafetrans) this option flag will cause significant performance slowdown for Java-based applications.

The default state of this option flag is enabled (-unsafetrans).

-amapsz { size | default }

Size in kbytes of the total memory area to be used for ARIES address map (AMAP) data structures, for mappings between PA-RISC basic blocks and translated code addresses.

Value32-bit ARIES64-bit ARIES
Default:16384 KB (16 MB)24576 KB (24 MB)
Max:65536 KB (64 MB)98304 KB (96 MB)
Min:8192 KB ( 8 MB)8192 KB ( 8 MB)

NOTE: To minimize the performance drop due to increased frequency of ARIES AMAP area overflow, HP recommends setting this option value at the default or maximum size.

For optimal performance, a ratio of 1:2:2 should be maintained for the values of the ARIES options: -descsz, -amapsz, and -ccsz.

-amapsz_smc { size | default }

Size in kbytes of the memory area used for ARIES address map (AMAP) data structures corresponding to dynamic translations of self modifying code of PA-RISC application. This area is part of the memory region whose size is determined by the ARIES option -amapsz.

Value32-bit ARIES64-bit ARIES
Default:2048 KB (2 MB)2048 KB (2 MB)
Max:4096 KB (4 MB)4096 KB (4 MB)
Min:512 KB512 KB

-ap_heap_ssz { size | default }

Size in kbytes of the memory area used for the ARIES private heap. This area is part of the ARIES heap whose size is determined by the ARIES option -heap_ssz. This area is used for ARIES's internal malloc() calls.

Value32-bit ARIES64-bit ARIES
Default:4096 KB (4 MB)8192 KB (8 MB)
Max:heap_ssz - 1024 KBheap_ssz - 2048 KB
Min:1024 KB (1 MB)2048 KB (2 MB)

Increase the value of this ARIES option if the ARIES error is out of memory or malloc() failed.

-aries_bssz { size | default }

Size in kbytes of the backing store area for ARIES native threads that are created for emulation of the application's threads.

Value32-bit ARIES64-bit ARIES
Default:48 KB48 KB
Max:64 KB64 KB
Min:48 KB48 KB

-aries_ssz { size | default }

Size in kbytes of the memory stack area for ARIES native threads that are created for emulation of the application's threads.

Value32-bit ARIES64-bit ARIES
Default:160 KB160 KB
Max:256 KB256 KB
Min:128 KB128 KB

-ccsz { size | default }

Size in kbytes of the ARIES translated code buffer.

Value32-bit ARIES64-bit ARIES
Default:16384 KB (16 MB)16384 KB (16 MB)
Max:65536 KB (64 MB)65536 KB (64 MB)
Min:4096 KB ( 4 MB)4096 KB ( 4 MB)

NOTE: To minimize the performance drop due to increased frequency of ARIES code cache area overflow, HP recommends setting this option value at default or maximum.

For optimal performance, a ratio of 1:2:2 should be maintained for the values of the ARIES options: -descsz, -amapsz, and -ccsz.

-core_format version

Format of the ARIES generated PA-RISC application core files. By default, ARIES generates core file with large utsname structure. Use this option to generate PA-RISC application core file in format other than the default.

The valid values for version are as follows:

v1

old core file format: with old utsname structure.

v2

new core file format: with large utsname structure. v2 is the default value.

Refer to the Generation of PA-RISC HP-UX Compatible Core File section in this manpage for details on core file formats.

-descsz { size | default }

Size in kbytes of the memory area for ARIES internal data structures (code cache descriptors) for accessing and managing translated code blocks.

Value32-bit ARIES64-bit ARIES
Default:8192 KB ( 8 MB)8192 KB ( 8 MB)
Max:32768 KB (32 MB)65536 KB (64 MB)
Min:4096 KB ( 4 MB)4096 KB ( 4 MB)

NOTE: To minimize the performance drop due to increased frequency of ARIES code cache descriptor area overflow, HP recommends setting this option value at default or maximum.

For optimal performance, a ratio of 1:2:2 should be maintained for the values of the ARIES options: -descsz, -amapsz, and -ccsz.

-exc_dynt_heap_ssz { size | default }

Size in kbytes of the memory area for shared use by dynamic translator internal memory allocation and alternate ARIES heap for memory allocation during signal handling.

Value32-bit ARIES64-bit ARIES
Default:5120 KB (5 MB)8192 KB ( 8 MB)
Max:8192 KB (8 MB)16384 KB (16 MB)
Min:5120 KB (5 MB)5120 KB ( 5 MB)

-heap_ssz { size | default }

Size in kbytes of the ARIES heap used for ARIES's own malloc() calls and to allocate space for ARIES thread creation.

The ARIES heap is divided into two parts. The first part is used as ARIES private heap whose size is determined by the option -ap_heap_ssz. The remaining area from the ARIES heap is used to allocate memory for the new threads.

Value32-bit ARIES64-bit ARIES
Default:22528 KB (22 MB)131072 KB (128 MB)
Max:variablevariable
Min:8192 KB ( 8 MB)16384 KB ( 16 MB)

The values above are shown with the default values of kernel tunable parameters, pa_maxssiz_32bit and pa_maxssiz_64bit, for 32-bit and 64-bit ARIES respectively.

With increased values of the respective kernel tunable parameters, the maximum value of ARIES heap is computed as follows:

  • 32-bit ARIES:

    Max heap_ssz=pa_maxssiz_32bit-ssz-ccsz-amapsz-descsz-exc_dynt_heap_ssz-5 MB

  • 64-bit ARIES:

    Max heap_ssz=pa_maxssiz_64bit-ssz-ccsz-amapsz-descsz-exc_dynt_heap_ssz-24 MB

-issz { size | default }

Size in kbytes of the initially allocated stack for PA-RISC applications.

Value32-bit ARIES64-bit ARIES
Default:64 KB64 KB
Max:ssz valuessz value
Min:32 KB32 KB

At process startup time, ARIES computes the minimum value of -issz by adding the sizes of argument strings, environment variable strings, and keybits structure. If the computed value is greater than -issz value, then ARIES increases this value accordingly.

-load file_name

Load the dynamically translated code from file_name at process startup time. This option can optimize ARIES time spent in dynamic translations. Refer to the option -save for storing the ARIES dynamic translations to a file.

WARNING: Using this option may cause the application to fail if the application and any of its dependent shared libraries changed from the time the translations were saved previously.

-nomore

Enable ARIES to stop further processing of options after executing this option. The processing is stopped from any ARIES RC file down through the search path.

This option enables application vendors to lock the ARIES configuration in ARIES RC files shipped as part of the application installation.

-osinc { size | default }

Chunk size in kbytes for incremental memory allocation in ARIES for PA-RISC application stack, ARIES heap, ARIES code cache, descriptors stack and AMAP regions.

Value32-bit ARIES64-bit ARIES
Default:64 KB64 KB
Max:1024 KB1024 KB
Min:4 KB4 KB

WARNING: A very low value for this option might degrade overall system performance due to too many mapped regions.

-reset_all

Reset to default values. All ARIES options processed so far from any ARIES RC file prior to this option are reset to their default values.

-save file_name

Save ARIES dynamic translations to file_name at process exit. Such saved translations may be used for later invocations of the same application using ARIES option -load.

-ssz { size | default }

Size in kbytes of the memory area for allocating PA-RISC application stack.

Value32-bit ARIES64-bit ARIES
Default:8192 KB ( 8 MB)262144 KB ( 256 MB)
Max:384000 KB (383 MB)2097152 KB (2048 MB)
Min:256 KB256 KB

The default values shown above are with the default values of the kernel tunable parameters, pa_maxssiz_32bit and pa_maxssiz_64bit, for 32-bit and 64-bit ARIES respectively.

To increase the size of PA-RISC stack beyond the default values as shown above you must increase the kernel tunable parameters, pa_maxssiz_32bit and pa_maxssiz_64bit, for 32-bit and 64-bit ARIES respectively.

Use this option to override the ARIES assumed stack size for PA-RISC application. Refer to the EMULATION OF PA-RISC APPLICATION STACK UNDER ARIES section in this manpage for more details.

-ts n

Translation threshold. The n number of times a PA-RISC basic block must be interpreted before it is considered as a candidate for dynamic translation.

This option can be used to tune the PA-RISC application performance under ARIES.

The valid range of values for n is from 0 to MAXINT (defined in /usr/include/sys/param.h).

The default value of this option is 16.

-ts_trace n

Trace scheduling threshold. The n number of times a translated block must execute before it is considered as a candidate for second pass translation with trace scheduling and optimizations.

This option can be used to tune the PA-RISC application performance under ARIES.

The valid range of values for n is from 0 to MAXINT (defined in /usr/include/sys/param.h).

The default value of this option is 1024.

NOTE: For optimal performance, a ratio of 1:2:2 should be maintained for the values of the ARIES options: -descsz, -amapsz, and -ccsz.

Example: ARIES Resource Configuration File

To execute a 32-bit PA-RISC application hello_world through ARIES using 32 MB of stack, you can place an .ariesrc file containing the following line in user's home directory or in the root (/) directory.

/user/foo/hello_world -ssz 32768

Alternatively, if the following line is specified, the stack size of 32 MB will be applied to all 32-bit PA-RISC applications invoked by the user or by all users depending on ARIES RC file being placed in user's home directory or in the root directory.

/ -ssz 32768

Sample ARIES resource configuration files are shown below. You can modify them to suit your requirements.

An example of user's private ARIES RC file, located in his/her home directory

/home/user1/bin/*app -ssz 24576 -heap_ssz 32768 /home/user1/app2* -core_format v1 -corepid /home/user1/*/app3 -reset_all -mem_order /home/user1/dll/bin/* -osinc 256 -issz 1024 -ts 10 /home/user1/app5 -pa_os_cpu /usr/bin/X11/xterm -ssz 24576 -heap_ssz 32768 -ap_heap_ssz 10240 /usr/local/bin/* -sched_trace -osinc 256 -issz 3072 -nomore */* -corepid

An example of an application specific ARIES RC file, placed in application's installation directory

/opt/App/bin/* -reset_all -corepid -ssz 32768 -ts 10 /opt/App/bin/g* -reset_all -issz 4096 -heap_ssz 65536 /opt/App/bin/ab* -reset_all -heap_ssz 32768 -ap_heap_ssz 8196 /opt/App/bin/gcov -reset_all -mem_order /opt/App/* -nomore

An example of a system wide global ARIES RC file, located in the root (/) directory

/ -corepid /usr/bin/app1 -osinc 256 -issz 1024 -ts 10 /usr/local/bin/* -core_format v1 /opt/App/*/app3 -mem_order /usr/local/*/bin/xv -ssz 24576 -heap_ssz 32768 -ap_heap_ssz 5120

ARIES MEMORY MANAGEMENT

ARIES Managed Area (AMA)

ARIES consumes a small amount of memory (called ARIES Managed AREA (AMA)) towards the end of the PA-RISC application's private data segment. AMA is reserved exclusively for ARIES use by the Integrity HP-UX operating system. The AMA size is decided by these kernel tunable parameters:

  • pa_maxssiz_32bit for 32-bit ARIES

  • pa_maxssiz_64bit for 64-bit ARIES

See pa_maxssiz(5) for more details.

The Integrity HP-UX OS passes a pointer load_info to a structure of type load_info_t defined in /usr/include/crt0.h, to ARIES. The start and end of AMA are marked by load_info->li_priv_mmf_start and load_info->li_bstore_start respectively. ARIES uses AMA to store following data:

1.

ARIES's initialized data, un-initialized data (BSS) and thread local storage (TLS).

2.

ARIES heap for internal malloc() calls and for creating ARIES threads for emulation of PA-RISC application's threads.

3.

PA-RISC application's stack.

4.

Translated code buffer (code cache region).

5.

Data structures to access and manage the translated code blocks.

6.

AMAP data structures for mapping of PA-RISC basic blocks and translated code block addresses.

7.

Memory area used by ARIES dynamic translator as heap.

Memory allocation from AMA happens dynamically on demand. A PA-RISC process running under ARIES will have larger memory footprint (resident memory) as compared to native PA-RISC system. The increase in process resident memory size depends on actual memory allocated from AMA.

Relation Between pa_maxssiz_32|64bit and ARIES Parameters

If the value of kernel tunable parameter maxssiz is much higher than its default value, any additional memory obtained by increasing the kernel tunable parameter pa_maxssiz_32/64bit will be used by ARIES to increase the size of PA-RISC application stack and it may not be possible to increase the size of ARIES parameter -heap_ssz. To achieve optimal memory utilization in such cases, HP recommends that you limit the size of PA-RISC application stack by setting ARIES option -ssz value to a reasonable value e.g. 8192 kbytes and use ARIES option -heap_ssz to increase the size of ARIES heap to be able to create more number of threads than possible with default ARIES option values.

32-bit ARIES

At process startup time, ARIES reserves space for PA-RISC application stack with its maximum size computed as:

  • max_pa_stack_size = least of the following two factors:

    1.

    Current value of kernel tunable parameter maxssiz.

    2.

    Stack size value obtained from parent process.

Total size of all memory areas in AMA should be less than or equal to kernel tunable parameter pa_maxssiz_32bit value. AMA is divided into different memory regions as:

pa_maxssiz_32bit = max_pa_stack_size + ARIES heap size (heap_ssz) + ARIES translation code buffer size (ccsz) + ARIES AMAP size (amapsz) + ARIES code cache descriptors size (descsz) + ARIES translator heap (exc_dynt_heap_ssz) + 5 MB (ARIES data etc)

Examples

1.

If a 32-bit PA-RISC application requires 128 MB stack, set the kernel tunable parameter pa_maxssiz_32bit to:

128 MB (ssz) + 22 MB (heap_ssz) + 16 MB (ccsz) + 16 MB (amapsz) + 8 MB (descsz) + 5 MB (exc_dynt_heap_ssz) + 5 MB = 200 MB

2.

If a 32-bit PA-RISC application requires 128 MB of ARIES heap, set the kernel tunable parameter pa_maxssiz_32bit to:

8 MB (ssz) + 128 MB (heap_ssz) + 16 MB (ccsz) + 16 MB (amapsz) + 8 MB (descsz) + 5 MB (exc_dynt_heap_ssz) + 5 MB = 186 MB

64-bit ARIES

64-bit ARIES follows same conventions as 32-bit ARIES for managing AMA. The AMA size is determined by kernel tunable parameter pa_maxssiz_64bit value. 64-bit ARIES has 24 MB of fixed memory area (for ARIES data etc) compared to 5 MB for 32-bit ARIES.

EMULATION OF PA-RISC APPLICATION THREADS UNDER ARIES

Calculation of the Required Size for ARIES Heap

For emulation of PA-RISC application's threads, ARIES creates its own native threads. For new threads, ARIES allocates memory for thread specific data, thread stack, and thread backing store. The memory requirement for each thread creation in ARIES is as follows:

  • 215 KBytes: For 32-bit ARIES

  • 280 KBytes: For 64-bit ARIES

ARIES divides the heap area into two parts. The first part is used for the ARIES private heap and the second part is used for allocation of new threads. Thus:

Required ARIES Heap Size = ap_heap_ssz (KB) + (number of PA-RISC application threads) * (Memory required per ARIES thread, in KB)

Maximum Number of Threads

A PA-RISC application can create a maximum of 85 threads under 32-bit ARIES and 438 threads under 64-bit ARIES with the default values of ARIES options and the kernel tunable parameters, pa_maxssiz_32bit and pa_maxssiz_64bit.

Make sure that the kernel tunable parameter max_thread_proc value is sufficiently large to create the required number of threads.

Increase the value of ARIES option -heap_ssz if your application requires more number of threads than allowed by default under ARIES.

NOTE: The free memory in AMA is not automatically used for application stack or ARIES heap. Appropriate ARIES option must be specified to change the size of particular memory area in AMA.

EMULATION OF MxN THREADS UNDER ARIES

ARIES supports PA-RISC applications which are linked with MxN pthreads library. From HP-UX 11i Version 2 (and above), the PA-RISC pthreads library delivered on Integrity systems is MxN enabled.

Due to underlying design complexities of true emulation of MxN threads under ARIES, the correctness and reliability may need to be compromised. Hence ARIES is designed to support emulation of PA-RISC HP-UX applications, linked with MxN pthreads library, in traditional 1x1 mode by forcing environment variable PTHREAD_COMPAT_MODE to 1.

The ARIES policy to emulate MxN threads as traditional 1x1 thread is not likely to change in current or future HP-UX releases.

EMULATION OF PA-RISC APPLICATION STACK UNDER ARIES

The stack allocated by the Integrity HP-UX kernel is used by ARIES as its own native stack. Stack for the PA-RISC applications is allocated by ARIES from the AMA area.

Most PA-RISC applications run as expected with default stack size set by ARIES. However, if your PA-RISC application fails with a core dump, with the following error message, then you should increase the PA-RISC application stack size by using ARIES option -ssz in the ARIES RC file.

[HP ARIES32]: ARIES Limitation [PID: xxxx] [HP ARIES32]: [HP ARIES32]: ARIES cannot proceed emulation because [HP ARIES32]: [HP ARIES32]: PID xxxx received SIGSEGV for stack growth failure. [HP ARIES32]: Possible causes - insufficient memory or swap space, or [HP ARIES32]: PA-RISC application stack size exceeded maximum available [HP ARIES32]: stack size in ARIES. [HP ARIES32]: [HP ARIES32]: Increase the value of -ssz ARIES parameter and kernel [HP ARIES32]: tunable pa_maxssiz_32bit. [HP ARIES32]: [HP ARIES32]: ARIES does not support applications which are nearly [HP ARIES32]: or completely maxed out on their data segment address [HP ARIES32]: space usage. This is because ARIES consumes small amount [HP ARIES32]: of virtual memory address space of the emulated [HP ARIES32]: application. [HP ARIES32]: [HP ARIES32]: Terminating emulation

How ARIES Sets PA-RISC Application Stack Size

At process startup time, ARIES uses following criteria to set the stack size for the PA-RISC application.

1.

ARIES option -ssz value if -ssz is specified in the ARIES RC file.

2.

The stack size value inherited from the parent process, If the ARIES option -ssz is not present in the ARIES RC file.

In most cases, the stack size value inherited from the parent process is the current value of kernel tunable parameter maxssiz, or the ulimit -s value in the shell.

For details on the maximum possible stack size under ARIES, Refer to the Relation Between pa_maxssiz_32|64bit and ARIES Parameters section in this manpage for more details.

NOTE: Stack sizes can be inherited among Integrity system native processes (32-bit and 64-bit) and emulated PA-RISC processes (32-bit and 64-bit), subjected to the limitation on available stack space under ARIES.

ARIES PERFORMANCE

For comparison purpose, the following machine configurations are assumed:

Integrity system: Model rx4640, Itanium2 4 CPU, clock speed 1500 MHz, 6 MB L3 cache, 8 GB memory

HP9000 system: Model rp4440, PA8800 2 CPU dual core, clock speed 1000 MHz, 32 MB off chip cache, 8 GB memory

The following table shows relative performance of PA-RISC applications under ARIES on an Integrity system at 1500 MHz CPU clock speed.

Application ClassCompared toCompared to
 IntegrityHP9000
 systemsystem
system  
General (mix of I/O, memory,60-70 %80-110 %
system intensive ops)  
Integer intensive45-60 %80-110 %
Floating point20-30 %40-60 %
intensive  
Java based40-70 %50-80 %
applications  
Multi threaded50-60 %70-80 %
applications  

The performance numbers shown in above table are only indicative. The actual performance of your PA-RISC application may vary depending on the application execution profile. You should benchmark your application performance under ARIES on Integrity systems before actual deployment.

The class of applications that experience good performance under ARIES:

1.

General applications, which have average mix of I/O intensive, memory intensive and system intensive operations.

2.

Integer intensive applications which spend significant time in algorithmic computations.

3.

Any category of PA-RISC applications migrated from old PA-RISC systems like N-class and earlier.

4.

Static image rendering graphics applications (no animations).

5.

Certain data base and client applications.

The class of applications that experience poor performance under ARIES:

1.

Floating point intensive applications like most scientific simulation, modeling applications. The performance slowdown is due to architectural differences between PA-RISC and Itanium(R) processor features and resources for floating point operations.

2.

Java-based applications. Unless your application has JNI code, use Integrity native JVM. Depending on execution profile, performance of Java applications varies significantly under ARIES.

3.

Multi-threaded applications that spend significant amount of time in thread synchronization operations. Thread suspension operation experiences slow performance under ARIES.

4.

PA-RISC applications which use performance libraries such as HP mlib are not good candidates to run under ARIES. It is not possible for ARIES to emulate the detailed behavior of the application for maximum emulated hardware resource utilization.

5.

OpenGL-based PA-RISC applications experience poor performance under ARIES. Such applications would execute with better performance under ARIES if they can use OpenGL display lists and send graphics data using GLX protocol mode.

6.

PA-RISC applications which frequently use volatile variables or are compiled with option +Ovolatile.

ARIES Performance Tuning

Users may find following tips useful for tuning the performance of their PA-RISC applications under ARIES:

1.

For applications which are very much loop intensive, reduce the ARIES translation threshold value (ARIES option -ts).

2.

For applications that run for a long duration and have good locality of execution (few functions account for significant portion of total execution time), you may consider enabling trace scheduling (ARIES option flag -sched_trace).

3.

If trace scheduling is enabled, you may consider fine tuning the trace scheduling threshold (ARIES option -ts_trace).

4.

For long running Java applications that have large methods, consider increasing the size of ARIES AMAP for dynamically generated code (ARIES option -amapsz_smc).

5.

For some rare applications that access and modify the Floating Point Access Register (FPSR : fr0L) register in a loop, consider enabling translations for such blocks (ARIES option flag -fpgr_trans).

6.

Some applications experience good performance if ARIES maps emulated FP register context on general registers. While others would perform well if this optimization is disabled. Consider changing the ARIES option flag -[no]opt_fpgr.

7.

Some applications may show slight performance gain if re-ordering of state changing instructions and memory loads is enabled (ARIES option flag -[no]opt_reorder).

WARNING: Some multi-threaded applications like JVM might fail with core dump if ARIES re-orders state changing PA-RISC instructions.

8.

Some applications that have large text segment size or load many shared libraries may require large code cache region size (ARIES option -descsz, -amapsz, -ccsz). For best results make sure that sizes of these parameters are in the ratio 1:2:2.

9.

Some applications that require ARIES to spend significant time in dynamic translations may work faster if translations are cached (ARIES option -load, -save). The save and load of translated code works best for statically linked applications.

WARNING: Some PA-RISC applications may not work correctly with the loading of ARIES dynamic translations cached on disk during previous executions of the same application.

ARIES SUPPORTED APPLICATIONS

  • ARIES supports emulation of all well-behaved (those applications that do not use un-documented features) PA-RISC HP-UX applications and that run fine on latest HP-UX version on PA-RISC systems.

  • ARIES supports all HP-UX Inter-Process Communication mechanisms such as semaphores, pipes, shared memory, and sockets, between Integrity native and emulated PA-RISC processes.

  • The exact signal/exception behavior of PA-RISC HP-UX applications, is supported under ARIES.

  • There is only a very small subset of the PA-RISC application domain that are not supported under ARIES.

  • To ascertain whether a particular application will run correctly under ARIES or not, determine if the application falls into one of the ARIES limitations described in the ARIES LIMITATIONS section in this manpage.

ARIES LIMITATIONS

ARIES supports emulation of all PA-RISC HP-UX applications, with the following limitations and/or exceptions:

1.

ARIES does not support PA-RISC applications that load Integrity native shared libraries. ARIES is meant only for pure PA-RISC HP-UX applications that are either statically or dynamically linked with PA-RISC libraries only.

2.

The version of ARIES at this release supports PA-RISC HP-UX applications that run fine on contemporary HP-UX release version on native PA-RISC systems.

3.

ARIES does not support privileged PA-RISC instructions. Hence, device drivers and loadable kernel modules are not supported.

4.

ARIES does not guarantee correct emulation of PA-RISC applications which make assumptions about "time taken to execute certain parts of application code and/or system calls". Such applications are theoretically non-synchronized applications, and hence, need to be corrected with proper synchronization techniques using mutex locks and/or semaphores.

5.

ARIES does not support applications that use ptrace() or profil() system calls. However, ARIES supports debugging of emulated applications using PA-RISC gdb. Refer to the PA-RISC HP-UX GDB DEBUGGING SUPPORT section in this manpage for more information.

6.

ARIES consumes a small amount of memory from the emulated application's virtual memory address space. Therefore ARIES does not support applications that are nearly or completely maxed out on their virtual address space usage in data segment.

7.

ARIES does not support applications that rely on differences between fork() and vfork() system calls. However, most applications that use the vfork() system call do use it with a purpose which is well known to the programmer. It is an extremely rare condition that a standard application would have any such reliance on the differences between fork() and vfork() system calls. See vfork(2) and fork(2) for details.

8.

ARIES returns information pertinent to a PA-RISC 2.0 processor, for certain system calls. For instance, a call made to sysconf(), with _SC_CPU_VERSION, will return CPU_PA_RISC2_0. If the application requires that it be able to determine that it is running on an Integrity system, then it should use the system() call and the Integrity native command getconf() to get the required fields. See sysconf(2), system(3S), and getconf(1) for more information.

AUTHOR

ARIES was developed by HP.