C/C++ Programmer's Guide (G06.25+)

Handling TNS Data Alignment
HP C/C++ Programmer’s Guide for NonStop Systems429301-008
23-2
Misalignment Tracing Facility
Misalignment Tracing Facility
The misalignment tracing facility is enabled or disabled on a system-wide basis (that is,
for all processors in the node). By default, it is enabled (set to ON). It can be disabled
(set to OFF) only by the persons who configure the system, using the Subsystem
Control Facility (SCF) attribute MISALIGNLOG. Instructions are in the SCF Reference
Manual for the Kernel Subsystem.
The tracing facility traces exceptions that would be rounded down on a NonStop
system running any release version update (RVU) earlier than G06.17.
The tracing facility does not count and trace every misaligned address, only those that
cause round-down exceptions. Other accesses that use misaligned addresses without
rounding them down do not cause exceptions and are not counted or traced. Also, only
a periodic sample of the counted exceptions are traced by means of their own EMS
event messages.
While a process runs, the tracing facility:
Counts the number of misaligned-address exceptions that the process causes (the
exception count)
Records the program address and code-file name of the instruction that causes the
first misaligned-address exception
Sampling
Because a process can run for a long time, the tracing facility samples the process
(that is, checks its exception data) approximately once an hour. If the process recorded
an exception since the previous sample, the tracing facility records an entry in the
Event Management Service (EMS) log. If the process ends, and any exception has
occurred since the last sample, the operating system produces a final EMS event.
The EMS event includes:
The process’s exception count
Details about one misaligned-address exception, including the program address,
data address, and relevant code-file names
TNS/E EpTAL T9248 pTAL Reference Manual
TNS/R pTAL T9248 pTAL Reference Manual
TNS TAL T9250 TAL Programmer’s Guide Data Alignment Addendum
Note. HP recommends that the SCF 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. Only if the volume of misalignment events
becomes burdensome should this attribute be turned OFF.
Product Number Manual or Addendum (continued)