Materialize Invocation Stack (MATINVS)
Instruction Syntax
Op Code (Hex) | Operand 1 | Operand 2 |
---|---|---|
0546 | Receiver | Process |
Operand 2: System pointer or null.
Bound Program Access |
---|
|
Warning
The following information is subject to change from release to release. Use it with caution and be prepared to adjust for changes with each new release.
Note |
---|
It is recommended that you use Materialize Invocation Attributes (MATINVAT) or Materialize Invocation Entry (MATINVE) to materialize an 8-byte invocation mark. 4-byte marks can wrap and produce unexpected results. |
Description:
The invocation stack of either the current thread, or the initial thread of another process is materialized. The materialization starts with the oldest invocation and proceeds toward the newest invocation.
Invocation stack entry attributes from the selected thread are returned in the template specified by operand 1. Operand 2 identifies the selected thread as follows. If operand 2 is either null or a system pointer to the process control space of the current process, then the invocation stack of the current thread will be materialized. If operand 2 identifies a process other than the current process, then the invocation stack of the initial thread of that process will be materialized. In this latter case the process must be the original initiator of the target process, or must have process control special authorization.
Operand 1 is a space pointer that addresses a 16-byte aligned template into which is placed the materialized data. The format of the data is:
|
The invocation entries materialized are each 128 bytes long and have the following format:
|
The number of invocation entries value specifies the number of invocation entries available to be materialized. The thread mark counter is a thread-specific counter maintained by the machine. It is used to assign invocation marks within the thread. The value is the low order 4 bytes of the current value of the thread mark counter at the time the instruction executes.
The associated program pointer is a system pointer that locates the program associated with the invocation entry.
The invocation number is a number that uniquely identifies each invocation in the invocation stack. When an invocation is allocated, the invocation number of the new invocation entry is one more than that in the calling invocation. The first invocation in the current process state has an invocation number of one.
The invocation type indicates how the associated program was invoked.
The invocation mark identifies the invocation within the thread.
If the invocation type is a non-bound program the instruction identifier field will contain the instruction number which specifies the number of the instruction last being executed when the invocation passed control to the next invocation on the stack. If the invocation type is a bound program entry or a procedure, the instruction identifier field will contain the statement identifier, which is a compiler supplied number which allows the compiler to identify the source statement associated with a particular sequence of instructions.
The suspend point is a suspend pointer which identifies the instruction last being executed when the invocation passed control to the next invocation on the stack.
The fields labeled reserved are currently reserved for future use. These fields may be altered by this instruction depending upon the particular implementation of the machine. Any values set into these fields are meaningless.
The first 4 bytes of the materialization identifies the total number of bytes provided for use by the instruction. This value is supplied as input to the instruction and is not modified by the instruction. A value of less than 8 causes the materialization length invalid (hex 3803) exception to be signaled.
The second 4 bytes of the materialization identifies the total number of bytes available to be materialized. The instruction materializes as many bytes as can be contained in the area specified as the receiver. If the byte area identified by the receiver is greater than that required to contain the information requested, the excess bytes are unchanged.
No exceptions are signaled in the event that the receiver contains insufficient area for the materialization, other than the materialization length exception described previously.
When the materialization is performed for a thread in a different process, the instruction attempts to interrogate and snapshot the invocation stack of the other thread concurrently with the ongoing execution of that thread. In this case, the interrogating thread and subject thread may have interleaving usage of the processor resource. Due to this, the accuracy and integrity of the materialization is relative to the state, static or dynamic, of the invocation stack in the subject thread over the time of the interrogation. If the invocation stack in the subject thread is in a very static state, not changing over the period of interrogation, the materialization may represent a good approximation of a snapshot of its invocation stack. To the contrary, if the invocation stack in the subject thread is in a very dynamic state, radically changing over the period of interrogation, the materialization is potentially totally inaccurate and may describe a sequence of invocations that was never an actual sequence that occurred within the thread. In addition to the above exposures to inaccuracy in attempting to take the snapshot, the ongoing status of the invocation stack of the subject thread may substantially differ from that reflected in the materialization, due to its continuing execution after completion of this instruction.
When the materialization is performed for the current thread, it does provide an accurate reflection of its invocation stack. In this case, concurrent execution of this instruction with execution of other instructions in the thread is precluded.
Authorization Required
- Process control special authorization
- For materializing a thread in a different process.
- Execute
- Contexts referenced for address resolution
Lock Enforcement
- Materialization
- Contexts referenced for address resolution
Exceptions
- 06 Addressing
- 0601 Space Addressing Violation
- 0602 Boundary Alignment
- 0603 Range
- 08 Argument/Parameter
- 0801 Parameter Reference Violation
- 0A Authorization
- 0A01 Unauthorized for Operation
- 10 Damage Encountered
- 1004 System Object Damage State
- 1044 Partial System Object Damage
- 1C Machine-Dependent
- 1C03 Machine Storage Limit Exceeded
- 20 Machine Support
- 2002 Machine Check
- 2003 Function Check
- 22 Object Access
- 2201 Object Not Found
- 2202 Object Destroyed
- 2203 Object Suspended
- 220B Object Not Available
- 24 Pointer Specification
- 2401 Pointer Does Not Exist
- 2402 Pointer Type Invalid
- 28 Process/Thread State
- 2802 Process Control Space Not Associated with a Process
- 2E Resource Control Limit
- 2E01 User Profile Storage Limit Exceeded
- 32 Scalar Specification
- 3201 Scalar Type Invalid
- 3202 Scalar Attributes Invalid
- 36 Space Management
- 3601 Space Extension/Truncation
- 38 Template Specification
- 3803 Materialization Length Invalid
- 44 Protection Violation
- 4401 Object Domain or Hardware Storage Protection Violation
- 4402 Literal Values Cannot Be Changed