Servicing multiple counters based on a single access check
A system and method for implementing a servicing instruction for a plurality of counters that includes determining a counter set based on the servicing instruction, whether access is authorized to the counter set, and a block of storage in a memory based on the service instruction. In response to the determining that the access is authorized, the system and method extracts the plurality of counters within the counter set in response to the determining that the access is authorized and storing the plurality of counters in the block of storage.
1. A method of implementing a servicing instruction for a plurality of counters, the method comprising:
determining, by a processor, a counter set based on the servicing instruction;
determining, by the processor, whether access is authorized to the counter set;
determining, by the processor, a block of storage in a memory based on the service instruction and in response to the determining that the access is authorized;
extracting, by the processor, the plurality of counters within the counter set in response to the determining that the access is authorized; and
storing, by the processor, the plurality of counters in the block of storage.
2. The method of claim 1 , wherein the service instruction includes a first operand identifying a requested number of counters and a second operand identifying an address of the block of storage.
3. The method of claim 1 , wherein the counter set is determined by a bit field of the service instruction.
4. The method of claim 1 , wherein the determining of the block of storage on a memory further comprises:
concatenating a first bit field with a second bit field to generate a number; and
adding the number to a contents of a register designated by a third bit field to generate an address of the block of storage in the memory.
5. The method of claim 1 , further comprising:
comparing a requested number of counters as identified by the servicing instruction against a number of counters corresponding to the counter set; and
outputting a condition code based on the comparing.
6. The method of claim 1 , further comprising:
identifying an error condition with respect to the servicing instruction; and
outputting an interruption to exit the method.